Skip to content

Commit

Permalink
FIX: Explicitly specify mapping mode (legacy vs recommended) for YqlT…
Browse files Browse the repository at this point in the history
…ypeTest
  • Loading branch information
nvamelichev committed Aug 9, 2024
1 parent 175f18f commit 1401369
Show file tree
Hide file tree
Showing 2 changed files with 507 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.junit.Test;
import tech.ydb.proto.ValueProtos;
import tech.ydb.yoj.databind.DbType;
import tech.ydb.yoj.databind.FieldValueType;
import tech.ydb.yoj.databind.schema.Column;
import tech.ydb.yoj.databind.schema.GlobalIndex;
import tech.ydb.yoj.databind.schema.ObjectSchema;
Expand All @@ -27,9 +28,10 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;

public class YqlTypeTest {
public class YqlTypeLegacyTest {
static {
CommonConverters.defineJsonConverter(JacksonJsonConverter.getDefault());
YqlPrimitiveType.useLegacyMappingFor(FieldValueType.values());
}

@Test
Expand Down Expand Up @@ -179,7 +181,7 @@ public void testBasicMappingAndId() {
ValueProtos.Type.PrimitiveTypeId.STRING,
ValueProtos.Type.PrimitiveTypeId.STRING,
ValueProtos.Type.PrimitiveTypeId.UTF8,
ValueProtos.Type.PrimitiveTypeId.UTF8,
ValueProtos.Type.PrimitiveTypeId.STRING,
ValueProtos.Type.PrimitiveTypeId.STRING,
ValueProtos.Type.PrimitiveTypeId.UTF8,
// columns
Expand All @@ -189,7 +191,7 @@ public void testBasicMappingAndId() {
ValueProtos.Type.PrimitiveTypeId.STRING,
ValueProtos.Type.PrimitiveTypeId.STRING,
ValueProtos.Type.PrimitiveTypeId.UTF8,
ValueProtos.Type.PrimitiveTypeId.UTF8,
ValueProtos.Type.PrimitiveTypeId.STRING,
ValueProtos.Type.PrimitiveTypeId.STRING,
ValueProtos.Type.PrimitiveTypeId.UTF8),
schema.flattenFields().stream()
Expand Down
Loading

0 comments on commit 1401369

Please sign in to comment.