From 46bfae36b1da69b2bd74728c78241f876b396629 Mon Sep 17 00:00:00 2001 From: Alexandr Gorshenin Date: Wed, 10 Jun 2026 11:27:21 +0100 Subject: [PATCH 1/8] Next snapshot version v2.3.34 --- auth-providers/oauth2-provider/pom.xml | 2 +- bom/pom.xml | 2 +- common/pom.xml | 2 +- coordination/pom.xml | 2 +- core/pom.xml | 2 +- export/pom.xml | 2 +- pom.xml | 2 +- query/pom.xml | 2 +- scheme/pom.xml | 2 +- table/pom.xml | 2 +- tests/common/pom.xml | 2 +- tests/junit4-support/pom.xml | 2 +- tests/junit5-support/pom.xml | 2 +- topic/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/auth-providers/oauth2-provider/pom.xml b/auth-providers/oauth2-provider/pom.xml index 89fb42284..536bd644e 100644 --- a/auth-providers/oauth2-provider/pom.xml +++ b/auth-providers/oauth2-provider/pom.xml @@ -5,7 +5,7 @@ tech.ydb ydb-sdk-parent - 2.3.33 + 2.3.34-SNAPSHOT ../../pom.xml diff --git a/bom/pom.xml b/bom/pom.xml index 009d4d06f..1f0517fa2 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -6,7 +6,7 @@ 4.0.0 tech.ydb - 2.3.33 + 2.3.34-SNAPSHOT ydb-sdk-bom Java SDK Bill of Materials Java SDK Bill of Materials (BOM) diff --git a/common/pom.xml b/common/pom.xml index 631a0bbb4..9d5d64928 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.33 + 2.3.34-SNAPSHOT ydb-sdk-common diff --git a/coordination/pom.xml b/coordination/pom.xml index feb1bf648..72e9e64de 100644 --- a/coordination/pom.xml +++ b/coordination/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.33 + 2.3.34-SNAPSHOT ydb-sdk-coordination diff --git a/core/pom.xml b/core/pom.xml index 75552cbbf..5965a7ba4 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.33 + 2.3.34-SNAPSHOT ydb-sdk-core diff --git a/export/pom.xml b/export/pom.xml index edeb9c641..58fbaba90 100644 --- a/export/pom.xml +++ b/export/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.33 + 2.3.34-SNAPSHOT ydb-sdk-export diff --git a/pom.xml b/pom.xml index 53a6cc580..7a739a4f3 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.33 + 2.3.34-SNAPSHOT Java SDK for YDB Java SDK for YDB diff --git a/query/pom.xml b/query/pom.xml index 69c0d3ba9..71f554691 100644 --- a/query/pom.xml +++ b/query/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.33 + 2.3.34-SNAPSHOT ydb-sdk-query diff --git a/scheme/pom.xml b/scheme/pom.xml index 0f8dc6ea4..2325a6697 100644 --- a/scheme/pom.xml +++ b/scheme/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.33 + 2.3.34-SNAPSHOT ydb-sdk-scheme diff --git a/table/pom.xml b/table/pom.xml index ed72760a4..8f9041161 100644 --- a/table/pom.xml +++ b/table/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.33 + 2.3.34-SNAPSHOT ydb-sdk-table diff --git a/tests/common/pom.xml b/tests/common/pom.xml index 56164306c..58df67441 100644 --- a/tests/common/pom.xml +++ b/tests/common/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.33 + 2.3.34-SNAPSHOT ../../pom.xml diff --git a/tests/junit4-support/pom.xml b/tests/junit4-support/pom.xml index c10b3c93c..8d8dbea5c 100644 --- a/tests/junit4-support/pom.xml +++ b/tests/junit4-support/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.33 + 2.3.34-SNAPSHOT ../../pom.xml diff --git a/tests/junit5-support/pom.xml b/tests/junit5-support/pom.xml index dddb489f6..65e34b6d5 100644 --- a/tests/junit5-support/pom.xml +++ b/tests/junit5-support/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.33 + 2.3.34-SNAPSHOT ../../pom.xml diff --git a/topic/pom.xml b/topic/pom.xml index 7e81406fa..4da8c3bf9 100644 --- a/topic/pom.xml +++ b/topic/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.33 + 2.3.34-SNAPSHOT ydb-sdk-topic From 13ec17beca95b700b2c5f1a743bce57a176d3006 Mon Sep 17 00:00:00 2001 From: Alexandr Gorshenin Date: Wed, 10 Jun 2026 11:44:32 +0100 Subject: [PATCH 2/8] Updated QueryIntegrationTest.testNoTxStatement --- .../test/java/tech/ydb/query/impl/QueryIntegrationTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/query/src/test/java/tech/ydb/query/impl/QueryIntegrationTest.java b/query/src/test/java/tech/ydb/query/impl/QueryIntegrationTest.java index cd0aa08ec..077bfb495 100644 --- a/query/src/test/java/tech/ydb/query/impl/QueryIntegrationTest.java +++ b/query/src/test/java/tech/ydb/query/impl/QueryIntegrationTest.java @@ -598,8 +598,7 @@ public void testNoTxStatement() { Assert.assertFalse(result.isSuccess()); Assert.assertEquals(StatusCode.PRECONDITION_FAILED, result.getStatus().getCode()); Issue issue = Issue.of(2012, -// "Constraint violated. Table: `" + ydbTransport.getDatabase() + "/" + TEST_TABLE + "`.", - "Conflict with existing key.", + "Constraint violated. Table: `" + ydbTransport.getDatabase() + "/" + TEST_TABLE + "`.", Issue.Severity.ERROR ); Assert.assertArrayEquals(new Issue[] { issue }, result.getStatus().getIssues()); From 642ecd165fae72d53b00e3e94a9d3ab55c706d32 Mon Sep 17 00:00:00 2001 From: Alexandr Gorshenin Date: Wed, 10 Jun 2026 11:45:49 +0100 Subject: [PATCH 3/8] Fixed StoragePool mapping for CreateTable --- .../java/tech/ydb/table/impl/BaseSession.java | 25 ++++++++++--------- .../ydb/table/impl/pool/FutureHelper.java | 2 -- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/table/src/main/java/tech/ydb/table/impl/BaseSession.java b/table/src/main/java/tech/ydb/table/impl/BaseSession.java index 4a8d6023e..96db96dbc 100644 --- a/table/src/main/java/tech/ydb/table/impl/BaseSession.java +++ b/table/src/main/java/tech/ydb/table/impl/BaseSession.java @@ -348,23 +348,26 @@ private static YdbTable.TableIndex buildIndex(TableIndex index) { } private static YdbTable.ColumnFamily buildColumnFamily(ColumnFamily family) { - YdbTable.ColumnFamily.Compression compression; + YdbTable.ColumnFamily.Builder builder = YdbTable.ColumnFamily.newBuilder() + .setName(family.getName()); switch (family.getCompression()) { case COMPRESSION_NONE: - compression = YdbTable.ColumnFamily.Compression.COMPRESSION_NONE; + builder = builder.setCompression(YdbTable.ColumnFamily.Compression.COMPRESSION_NONE); break; case COMPRESSION_LZ4: - compression = YdbTable.ColumnFamily.Compression.COMPRESSION_LZ4; + builder = builder.setCompression(YdbTable.ColumnFamily.Compression.COMPRESSION_LZ4); break; default: - compression = YdbTable.ColumnFamily.Compression.COMPRESSION_UNSPECIFIED; + // Nothing + break; } - return YdbTable.ColumnFamily.newBuilder() - .setCompression(compression) - .setData(YdbTable.StoragePool.newBuilder().setMedia(family.getData().getMedia())) - .setName(family.getName()) - .build(); + StoragePool data = family.getData(); + if (data != null && data.getMedia() != null && !data.getMedia().isEmpty()) { + builder.setData(YdbTable.StoragePool.newBuilder().setMedia(family.getData().getMedia())); + } + + return builder.build(); } private static YdbTable.TtlSettings buildTtlSettings(TableTtl ttl) { @@ -441,9 +444,7 @@ public CompletableFuture createTable( } for (ColumnFamily family : description.getColumnFamilies()) { - if (!"default".equals(family.getName())) { - request.addColumnFamilies(buildColumnFamily(family)); - } + request.addColumnFamilies(buildColumnFamily(family)); } for (TableColumn column : description.getColumns()) { diff --git a/table/src/test/java/tech/ydb/table/impl/pool/FutureHelper.java b/table/src/test/java/tech/ydb/table/impl/pool/FutureHelper.java index 131889a52..62ea4fb7a 100644 --- a/table/src/test/java/tech/ydb/table/impl/pool/FutureHelper.java +++ b/table/src/test/java/tech/ydb/table/impl/pool/FutureHelper.java @@ -69,6 +69,4 @@ private void futureHasException(CompletableFuture future, String message) { Assert.assertNotNull("Test interrupted", ex); } } - - } From 6074cf22e7a5437887c057a28bb19a2ae4f7b471 Mon Sep 17 00:00:00 2001 From: Alexandr Gorshenin Date: Wed, 10 Jun 2026 12:03:39 +0100 Subject: [PATCH 4/8] Added test for copy table via describeTable/createTable --- .../java/tech/ydb/table/impl/BaseSession.java | 22 ++++---- .../table/integration/DescribeTableTest.java | 56 +++++++++++++++++++ 2 files changed, 68 insertions(+), 10 deletions(-) diff --git a/table/src/main/java/tech/ydb/table/impl/BaseSession.java b/table/src/main/java/tech/ydb/table/impl/BaseSession.java index 96db96dbc..bd4cf9acf 100644 --- a/table/src/main/java/tech/ydb/table/impl/BaseSession.java +++ b/table/src/main/java/tech/ydb/table/impl/BaseSession.java @@ -350,16 +350,18 @@ private static YdbTable.TableIndex buildIndex(TableIndex index) { private static YdbTable.ColumnFamily buildColumnFamily(ColumnFamily family) { YdbTable.ColumnFamily.Builder builder = YdbTable.ColumnFamily.newBuilder() .setName(family.getName()); - switch (family.getCompression()) { - case COMPRESSION_NONE: - builder = builder.setCompression(YdbTable.ColumnFamily.Compression.COMPRESSION_NONE); - break; - case COMPRESSION_LZ4: - builder = builder.setCompression(YdbTable.ColumnFamily.Compression.COMPRESSION_LZ4); - break; - default: - // Nothing - break; + if (family.getCompression() != null) { + switch (family.getCompression()) { + case COMPRESSION_NONE: + builder = builder.setCompression(YdbTable.ColumnFamily.Compression.COMPRESSION_NONE); + break; + case COMPRESSION_LZ4: + builder = builder.setCompression(YdbTable.ColumnFamily.Compression.COMPRESSION_LZ4); + break; + default: + // Nothing + break; + } } StoragePool data = family.getData(); diff --git a/table/src/test/java/tech/ydb/table/integration/DescribeTableTest.java b/table/src/test/java/tech/ydb/table/integration/DescribeTableTest.java index 4d6680425..ac306042c 100644 --- a/table/src/test/java/tech/ydb/table/integration/DescribeTableTest.java +++ b/table/src/test/java/tech/ydb/table/integration/DescribeTableTest.java @@ -1,5 +1,6 @@ package tech.ydb.table.integration; +import org.junit.After; import org.junit.Assert; import org.junit.ClassRule; import org.junit.Test; @@ -8,8 +9,12 @@ import tech.ydb.core.Status; import tech.ydb.core.StatusCode; import tech.ydb.table.SessionRetryContext; +import tech.ydb.table.description.ColumnFamily; +import tech.ydb.table.description.TableDescription; import tech.ydb.table.impl.SimpleTableClient; import tech.ydb.table.rpc.grpc.GrpcTableRpc; +import tech.ydb.table.values.PrimitiveType; +import tech.ydb.table.values.PrimitiveValue; import tech.ydb.test.junit4.GrpcTransportRule; /** @@ -17,12 +22,25 @@ * @author Aleksandr Gorshenin */ public class DescribeTableTest { + private static final String TABLE_NAME = "table_describe_test"; + private static final String TABLE_COPY_NAME = "table_describe_test_copy"; + @ClassRule public static final GrpcTransportRule YDB_TRANSPORT = new GrpcTransportRule(); + private static final SessionRetryContext CTX = SessionRetryContext.create(SimpleTableClient.newClient( GrpcTableRpc.useTransport(YDB_TRANSPORT) ).build()).build(); + private final String tablePath = YDB_TRANSPORT.getDatabase() + "/" + TABLE_NAME; + private final String tableCopyPath = YDB_TRANSPORT.getDatabase() + "/" + TABLE_COPY_NAME; + + @After + public void dropTable() { + CTX.supplyStatus(session -> session.dropTable(tablePath)).join(); + CTX.supplyStatus(session -> session.dropTable(tableCopyPath)).join(); + } + @Test public void wrongTypeTest() { String databasePath = YDB_TRANSPORT.getDatabase(); @@ -36,4 +54,42 @@ public void wrongTypeTest() { Assert.assertEquals("Entry " + entryName + " with type DIRECTORY is not a table", issues[0].getMessage()); Assert.assertEquals(Issue.Severity.ERROR, issues[0].getSeverity()); } + + @Test + public void copyTableTest() { + TableDescription createTable = TableDescription.newBuilder() + .addNonnullColumn("id", PrimitiveType.Int8) + .addNonnullColumn("version", PrimitiveType.Uint32) + .addNullableColumn("value", PrimitiveType.Text, PrimitiveValue.newText("123")) + .addColumnFamily(new ColumnFamily("default", null, ColumnFamily.Compression.COMPRESSION_LZ4)) + .addColumnFamily(new ColumnFamily("raw", null, null)) + .setPrimaryKeys("id", "version") + .build(); + + CTX.supplyStatus(session -> session.createTable(tablePath, createTable)).join() + .expectSuccess("cannot create table " + tablePath); + + TableDescription tableDesc = CTX.supplyResult(session -> session.describeTable(tablePath)).join().getValue(); + + Assert.assertEquals(2, tableDesc.getColumnFamilies().size()); + Assert.assertEquals(ColumnFamily.Compression.COMPRESSION_LZ4, findFamily(tableDesc, "default").getCompression()); + Assert.assertEquals(ColumnFamily.Compression.COMPRESSION_NONE, findFamily(tableDesc, "raw").getCompression()); + + CTX.supplyStatus(session -> session.createTable(tableCopyPath, tableDesc)).join() + .expectSuccess("cannot create table " + tableCopyPath); + + TableDescription copyDesc = CTX.supplyResult(session -> session.describeTable(tableCopyPath)).join().getValue(); + Assert.assertEquals(2, copyDesc.getColumnFamilies().size()); + Assert.assertEquals(ColumnFamily.Compression.COMPRESSION_LZ4, findFamily(copyDesc, "default").getCompression()); + Assert.assertEquals(ColumnFamily.Compression.COMPRESSION_NONE, findFamily(copyDesc, "raw").getCompression()); + } + + private ColumnFamily findFamily(TableDescription desc, String name) { + for (ColumnFamily family : desc.getColumnFamilies()) { + if (name.equals(family.getName())) { + return family; + } + } + throw new AssertionError("Expected column family with name " + name); + } } From 6f81fe65bb2ee918314ad7a6ccb7ba926f5ca238 Mon Sep 17 00:00:00 2001 From: Alexandr Gorshenin Date: Wed, 27 May 2026 16:10:08 +0100 Subject: [PATCH 5/8] Backport: added method to customize x-build-info --- .../ydb/core/grpc/GrpcTransportBuilder.java | 27 ++++++++++++++++--- .../java/tech/ydb/core/grpc/YdbHeaders.java | 2 +- .../impl/pool/DefaultChannelFactoryTest.java | 15 +++++++++++ .../ydb/core/impl/pool/EndpointPoolTest.java | 1 - .../core/impl/pool/PriorityPickerTest.java | 1 - .../core/{timer => impl/pool}/TestTicker.java | 2 +- 6 files changed, 41 insertions(+), 7 deletions(-) rename core/src/test/java/tech/ydb/core/{timer => impl/pool}/TestTicker.java (92%) diff --git a/core/src/main/java/tech/ydb/core/grpc/GrpcTransportBuilder.java b/core/src/main/java/tech/ydb/core/grpc/GrpcTransportBuilder.java index 1e270a684..aae108bfd 100644 --- a/core/src/main/java/tech/ydb/core/grpc/GrpcTransportBuilder.java +++ b/core/src/main/java/tech/ydb/core/grpc/GrpcTransportBuilder.java @@ -77,6 +77,9 @@ public enum InitMode { private final List>> channelInitializers = new ArrayList<>(); private Supplier schedulerFactory = YdbSchedulerFactory::createScheduler; private String localDc; + private String buildInfo = Version.getVersion().map(version -> "ydb-java-sdk/" + version) + .orElse(Version.UNKNOWN_VERSION); + private BalancingSettings balancingSettings; private Executor callExecutor = MoreExecutors.directExecutor(); private AuthRpcProvider authProvider = NopAuthProvider.INSTANCE; @@ -123,10 +126,13 @@ public String getDatabase() { return database; } + @Deprecated public String getVersionString() { - return Version.getVersion() - .map(version -> "ydb-java-sdk/" + version) - .orElse(Version.UNKNOWN_VERSION); + return getBuildInfo(); + } + + public String getBuildInfo() { + return buildInfo; } public String getApplicationName() { @@ -408,6 +414,21 @@ public GrpcTransportBuilder withScheduler(ScheduledExecutorService scheduler) { return this; } + /** + * Appends an extra build info string to the SDK build info reported to the server via the + * {@code x-ydb-sdk-build-info} header. The provided value is concatenated to the existing build info using + * a semicolon separator and is typically used to identify higher-level libraries or integrations built on top + * of the SDK (for example, {@code "ydb-jdbc-driver/2.4.0"}). + * + * @param extraBuildInfo additional build info to append to the SDK build info + * @return this builder instance + */ + public GrpcTransportBuilder withExtraBuildInfo(String extraBuildInfo) { + Objects.requireNonNull(extraBuildInfo, "extraBuildInfo is null"); + this.buildInfo = this.buildInfo + ";" + extraBuildInfo; + return this; + } + /** * use {@link GrpcTransportBuilder#withGrpcRetry(boolean) } instead * @return this diff --git a/core/src/main/java/tech/ydb/core/grpc/YdbHeaders.java b/core/src/main/java/tech/ydb/core/grpc/YdbHeaders.java index 4208aaab4..0a617c2c7 100644 --- a/core/src/main/java/tech/ydb/core/grpc/YdbHeaders.java +++ b/core/src/main/java/tech/ydb/core/grpc/YdbHeaders.java @@ -35,7 +35,7 @@ private YdbHeaders() { } public static ClientInterceptor createMetadataInterceptor(GrpcTransportBuilder builder) { Metadata extraHeaders = new Metadata(); extraHeaders.put(YdbHeaders.DATABASE, builder.getDatabase()); - extraHeaders.put(YdbHeaders.BUILD_INFO, builder.getVersionString()); + extraHeaders.put(YdbHeaders.BUILD_INFO, builder.getBuildInfo()); String appName = builder.getApplicationName(); if (appName != null) { extraHeaders.put(YdbHeaders.APPLICATION_NAME, appName); diff --git a/core/src/test/java/tech/ydb/core/impl/pool/DefaultChannelFactoryTest.java b/core/src/test/java/tech/ydb/core/impl/pool/DefaultChannelFactoryTest.java index cad1ac1ef..6b2b0af26 100644 --- a/core/src/test/java/tech/ydb/core/impl/pool/DefaultChannelFactoryTest.java +++ b/core/src/test/java/tech/ydb/core/impl/pool/DefaultChannelFactoryTest.java @@ -159,6 +159,21 @@ public void customHeadersTest() { Assert.assertEquals("client-hostname", metadata.get(YdbHeaders.CLIENT_PROCESS_ID)); } + @Test + public void customBuildInfoTest() { + GrpcTransportBuilder builder = GrpcTransport.forHost(MOCKED_HOST, MOCKED_PORT, "/Root") + .withExtraBuildInfo("driver/1.0.0") + .withExtraBuildInfo("test-app/1.0.0"); + ManagedChannelFactory factory = ChannelFactoryLoader.load().buildFactory(builder); + + Assert.assertSame(channelMock, factory.newManagedChannel(MOCKED_HOST, MOCKED_PORT, null)); + channelStaticMock.verify(FOR_ADDRESS, Mockito.times(1)); + + String version = "ydb-java-sdk/" + Version.getVersion().get(); + Metadata metadata = metadataCapture.getValue(); + Assert.assertEquals(version + ";driver/1.0.0;test-app/1.0.0", metadata.get(YdbHeaders.BUILD_INFO)); + } + @Test public void customChannelInitializer() { GrpcTransportBuilder builder = GrpcTransport.forHost(MOCKED_HOST, MOCKED_PORT, "/Root") diff --git a/core/src/test/java/tech/ydb/core/impl/pool/EndpointPoolTest.java b/core/src/test/java/tech/ydb/core/impl/pool/EndpointPoolTest.java index f34ab1b96..979040033 100644 --- a/core/src/test/java/tech/ydb/core/impl/pool/EndpointPoolTest.java +++ b/core/src/test/java/tech/ydb/core/impl/pool/EndpointPoolTest.java @@ -24,7 +24,6 @@ import tech.ydb.core.UnexpectedResultException; import tech.ydb.core.grpc.BalancingSettings; import tech.ydb.core.grpc.GrpcRequestSettings; -import tech.ydb.core.timer.TestTicker; /** * @author Aleksandr Gorshenin diff --git a/core/src/test/java/tech/ydb/core/impl/pool/PriorityPickerTest.java b/core/src/test/java/tech/ydb/core/impl/pool/PriorityPickerTest.java index e6d00b660..b1da65ad4 100644 --- a/core/src/test/java/tech/ydb/core/impl/pool/PriorityPickerTest.java +++ b/core/src/test/java/tech/ydb/core/impl/pool/PriorityPickerTest.java @@ -13,7 +13,6 @@ import org.junit.Test; import tech.ydb.core.grpc.BalancingSettings; -import tech.ydb.core.timer.TestTicker; /** * @author Kirill diff --git a/core/src/test/java/tech/ydb/core/timer/TestTicker.java b/core/src/test/java/tech/ydb/core/impl/pool/TestTicker.java similarity index 92% rename from core/src/test/java/tech/ydb/core/timer/TestTicker.java rename to core/src/test/java/tech/ydb/core/impl/pool/TestTicker.java index 619850b22..5da23beba 100644 --- a/core/src/test/java/tech/ydb/core/timer/TestTicker.java +++ b/core/src/test/java/tech/ydb/core/impl/pool/TestTicker.java @@ -1,4 +1,4 @@ -package tech.ydb.core.timer; +package tech.ydb.core.impl.pool; import java.util.Arrays; import java.util.Iterator; From 8ba2b71aebb20cefbb4e3b6ec816ac43d4404bf7 Mon Sep 17 00:00:00 2001 From: Alexandr Gorshenin Date: Wed, 10 Jun 2026 14:45:13 +0100 Subject: [PATCH 6/8] Small test on Compression validation --- .../tech/ydb/table/impl/BaseSessionTest.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 table/src/test/java/tech/ydb/table/impl/BaseSessionTest.java diff --git a/table/src/test/java/tech/ydb/table/impl/BaseSessionTest.java b/table/src/test/java/tech/ydb/table/impl/BaseSessionTest.java new file mode 100644 index 000000000..b25d9293e --- /dev/null +++ b/table/src/test/java/tech/ydb/table/impl/BaseSessionTest.java @@ -0,0 +1,29 @@ +package tech.ydb.table.impl; + +import org.junit.Assert; + +import tech.ydb.table.description.ColumnFamily; + +/** + * + * @author Aleksandr Gorshenin {@literal } + */ +public class BaseSessionTest { + + /** + * Verifies that the {@link ColumnFamily.Compression} enum declares exactly the expected constants: + * {@code COMPRESSION_NONE} and {@code COMPRESSION_LZ4}. + *

+ * This check matters because the values are used when mapping to and from the protobuf representation. Any change + * to the enum would break this test and signals that + * {@link BaseSession#buildColumnFamily(tech.ydb.table.description.ColumnFamily)} and + * {@link BaseSession#mapDescribeTable(tech.ydb.core.Result, tech.ydb.table.settings.DescribeTableSettings)} + * need to be updated as well. + */ + public void columnFamilyTest() { + Assert.assertArrayEquals(new ColumnFamily.Compression[] { + ColumnFamily.Compression.COMPRESSION_NONE, + ColumnFamily.Compression.COMPRESSION_LZ4 + }, ColumnFamily.Compression.values()); + } +} From d646605fc931ce0b824ed8eb4532d4101abbb99e Mon Sep 17 00:00:00 2001 From: Alexandr Gorshenin Date: Wed, 10 Jun 2026 16:27:10 +0100 Subject: [PATCH 7/8] Next release version v2.3.34 --- CHANGELOG.md | 4 ++++ README.md | 2 +- auth-providers/oauth2-provider/pom.xml | 2 +- bom/pom.xml | 2 +- common/pom.xml | 2 +- coordination/pom.xml | 2 +- core/pom.xml | 2 +- export/pom.xml | 2 +- pom.xml | 2 +- query/pom.xml | 2 +- scheme/pom.xml | 2 +- table/pom.xml | 2 +- tests/common/pom.xml | 2 +- tests/junit4-support/pom.xml | 2 +- tests/junit5-support/pom.xml | 2 +- topic/pom.xml | 2 +- 16 files changed, 19 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66c79b18a..cbe01218d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.3.34 ## +* Table: Fixed StoragePool mapping for CreateTable +* Core: Added method to customize x-build-info + ## 2.3.33 ## * Topic: Fixed race between decoder and function that publishes messages to user diff --git a/README.md b/README.md index 7c9e809d3..abe09683e 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Firstly you can import YDB Java BOM to specify correct versions of SDK modules. tech.ydb ydb-sdk-bom - 2.3.32 + 2.3.34 pom import diff --git a/auth-providers/oauth2-provider/pom.xml b/auth-providers/oauth2-provider/pom.xml index 536bd644e..6ee154111 100644 --- a/auth-providers/oauth2-provider/pom.xml +++ b/auth-providers/oauth2-provider/pom.xml @@ -5,7 +5,7 @@ tech.ydb ydb-sdk-parent - 2.3.34-SNAPSHOT + 2.3.34 ../../pom.xml diff --git a/bom/pom.xml b/bom/pom.xml index 1f0517fa2..96a619dda 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -6,7 +6,7 @@ 4.0.0 tech.ydb - 2.3.34-SNAPSHOT + 2.3.34 ydb-sdk-bom Java SDK Bill of Materials Java SDK Bill of Materials (BOM) diff --git a/common/pom.xml b/common/pom.xml index 9d5d64928..e70c2e643 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.34-SNAPSHOT + 2.3.34 ydb-sdk-common diff --git a/coordination/pom.xml b/coordination/pom.xml index 72e9e64de..20f19c3fa 100644 --- a/coordination/pom.xml +++ b/coordination/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.34-SNAPSHOT + 2.3.34 ydb-sdk-coordination diff --git a/core/pom.xml b/core/pom.xml index 5965a7ba4..4052d32ec 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.34-SNAPSHOT + 2.3.34 ydb-sdk-core diff --git a/export/pom.xml b/export/pom.xml index 58fbaba90..33ac919d7 100644 --- a/export/pom.xml +++ b/export/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.34-SNAPSHOT + 2.3.34 ydb-sdk-export diff --git a/pom.xml b/pom.xml index 7a739a4f3..8b7472ec0 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.34-SNAPSHOT + 2.3.34 Java SDK for YDB Java SDK for YDB diff --git a/query/pom.xml b/query/pom.xml index 71f554691..a7190848f 100644 --- a/query/pom.xml +++ b/query/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.34-SNAPSHOT + 2.3.34 ydb-sdk-query diff --git a/scheme/pom.xml b/scheme/pom.xml index 2325a6697..4b0fd57ae 100644 --- a/scheme/pom.xml +++ b/scheme/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.34-SNAPSHOT + 2.3.34 ydb-sdk-scheme diff --git a/table/pom.xml b/table/pom.xml index 8f9041161..b6045831a 100644 --- a/table/pom.xml +++ b/table/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.34-SNAPSHOT + 2.3.34 ydb-sdk-table diff --git a/tests/common/pom.xml b/tests/common/pom.xml index 58df67441..5e59eee89 100644 --- a/tests/common/pom.xml +++ b/tests/common/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.34-SNAPSHOT + 2.3.34 ../../pom.xml diff --git a/tests/junit4-support/pom.xml b/tests/junit4-support/pom.xml index 8d8dbea5c..d6f63d658 100644 --- a/tests/junit4-support/pom.xml +++ b/tests/junit4-support/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.34-SNAPSHOT + 2.3.34 ../../pom.xml diff --git a/tests/junit5-support/pom.xml b/tests/junit5-support/pom.xml index 65e34b6d5..d6f913fa8 100644 --- a/tests/junit5-support/pom.xml +++ b/tests/junit5-support/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.34-SNAPSHOT + 2.3.34 ../../pom.xml diff --git a/topic/pom.xml b/topic/pom.xml index 4da8c3bf9..72f0a3ec2 100644 --- a/topic/pom.xml +++ b/topic/pom.xml @@ -8,7 +8,7 @@ tech.ydb ydb-sdk-parent - 2.3.34-SNAPSHOT + 2.3.34 ydb-sdk-topic From 179b1d165403c70be46df7edd759b016df980eb7 Mon Sep 17 00:00:00 2001 From: Alexandr Gorshenin Date: Thu, 11 Jun 2026 10:25:14 +0100 Subject: [PATCH 8/8] Fixes by copilot --- table/src/main/java/tech/ydb/table/impl/BaseSession.java | 2 +- table/src/test/java/tech/ydb/table/impl/BaseSessionTest.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/table/src/main/java/tech/ydb/table/impl/BaseSession.java b/table/src/main/java/tech/ydb/table/impl/BaseSession.java index ddc26b52b..4ddba5159 100644 --- a/table/src/main/java/tech/ydb/table/impl/BaseSession.java +++ b/table/src/main/java/tech/ydb/table/impl/BaseSession.java @@ -366,7 +366,7 @@ private static YdbTable.ColumnFamily buildColumnFamily(ColumnFamily family) { StoragePool data = family.getData(); if (data != null && data.getMedia() != null && !data.getMedia().isEmpty()) { - builder.setData(YdbTable.StoragePool.newBuilder().setMedia(family.getData().getMedia())); + builder.setData(YdbTable.StoragePool.newBuilder().setMedia(data.getMedia())); } return builder.build(); diff --git a/table/src/test/java/tech/ydb/table/impl/BaseSessionTest.java b/table/src/test/java/tech/ydb/table/impl/BaseSessionTest.java index b25d9293e..6b8ea28a6 100644 --- a/table/src/test/java/tech/ydb/table/impl/BaseSessionTest.java +++ b/table/src/test/java/tech/ydb/table/impl/BaseSessionTest.java @@ -1,6 +1,7 @@ package tech.ydb.table.impl; import org.junit.Assert; +import org.junit.Test; import tech.ydb.table.description.ColumnFamily; @@ -20,6 +21,7 @@ public class BaseSessionTest { * {@link BaseSession#mapDescribeTable(tech.ydb.core.Result, tech.ydb.table.settings.DescribeTableSettings)} * need to be updated as well. */ + @Test public void columnFamilyTest() { Assert.assertArrayEquals(new ColumnFamily.Compression[] { ColumnFamily.Compression.COMPRESSION_NONE,