From 8efc0fcac9088fcec501d40abf862d0330a997bd Mon Sep 17 00:00:00 2001 From: Alexander Lavrukov Date: Thu, 5 Dec 2024 11:59:40 +0300 Subject: [PATCH 1/2] Less usages of schema.getName() --- .../tech/ydb/yoj/databind/schema/Schema.java | 6 +++++ .../yoj/repository/test/inmemory/Columns.java | 2 +- .../test/inmemory/InMemoryTable.java | 9 ++++--- .../repository/ydb/bulk/BulkMapperImpl.java | 7 ++++-- .../ydb/merge/ByEntityYqlQueriesMerger.java | 20 ++++------------ .../ydb/readtable/EntityIdKeyMapper.java | 7 ++++-- .../ydb/statement/DeleteAllStatement.java | 2 +- .../ydb/statement/FindAllYqlStatement.java | 2 +- .../ydb/statement/FindInStatement.java | 24 ++++++++++--------- .../ydb/statement/ResultSetReader.java | 2 +- .../ydb/statement/YqlStatement.java | 13 ++++------ .../yoj/repository/ydb/table/YdbTable.java | 8 +++---- .../yoj/repository/ydb/yql/YqlPredicate.java | 8 +++++-- .../ydb/yoj/repository/ydb/yql/YqlView.java | 5 ++-- .../yoj/repository/db/TableDescriptor.java | 8 +++++++ 15 files changed, 70 insertions(+), 53 deletions(-) diff --git a/databind/src/main/java/tech/ydb/yoj/databind/schema/Schema.java b/databind/src/main/java/tech/ydb/yoj/databind/schema/Schema.java index 530a823c..48d47689 100644 --- a/databind/src/main/java/tech/ydb/yoj/databind/schema/Schema.java +++ b/databind/src/main/java/tech/ydb/yoj/databind/schema/Schema.java @@ -131,6 +131,10 @@ protected Schema(Schema schema, String subSchemaFieldPath) { this.changefeeds = schema.changefeeds; } + public String getTypeName() { + return getType().getSimpleName(); + } + private void validateFieldNames() { flattenFields().stream().collect(toMap(JavaField::getName, Function.identity(), ((x, y) -> { throw new IllegalArgumentException("fields with same name `%s` detected: `{%s}` and `{%s}`" @@ -268,6 +272,7 @@ public final NamingStrategy getNamingStrategy() { } /** + * DEPRECATED: old method, use correct instance of {@link TableDescriptor} * Returns the name of the table for data binding. *

* If the {@link Table} annotation is present, the field {@code name} should be used to @@ -275,6 +280,7 @@ public final NamingStrategy getNamingStrategy() { * * @return the table name for data binding */ + @Deprecated public final String getName() { return staticName; } diff --git a/repository-inmemory/src/main/java/tech/ydb/yoj/repository/test/inmemory/Columns.java b/repository-inmemory/src/main/java/tech/ydb/yoj/repository/test/inmemory/Columns.java index 99f594c2..c87c9a10 100644 --- a/repository-inmemory/src/main/java/tech/ydb/yoj/repository/test/inmemory/Columns.java +++ b/repository-inmemory/src/main/java/tech/ydb/yoj/repository/test/inmemory/Columns.java @@ -49,7 +49,7 @@ public T toSchema(Schema schema) { } catch (ConversionException e) { throw e; } catch (Exception e) { - String message = format("Could not convert %s: %s", schema.getName(), e.getMessage()); + String message = format("Could not convert %s: %s", schema.getTypeName(), e.getMessage()); throw new ConversionException(message, e); } } diff --git a/repository-inmemory/src/main/java/tech/ydb/yoj/repository/test/inmemory/InMemoryTable.java b/repository-inmemory/src/main/java/tech/ydb/yoj/repository/test/inmemory/InMemoryTable.java index 9c682ffd..47b4e308 100644 --- a/repository-inmemory/src/main/java/tech/ydb/yoj/repository/test/inmemory/InMemoryTable.java +++ b/repository-inmemory/src/main/java/tech/ydb/yoj/repository/test/inmemory/InMemoryTable.java @@ -13,6 +13,7 @@ import tech.ydb.yoj.repository.db.EntitySchema; import tech.ydb.yoj.repository.db.Range; import tech.ydb.yoj.repository.db.Table; +import tech.ydb.yoj.repository.db.TableDescriptor; import tech.ydb.yoj.repository.db.ViewSchema; import tech.ydb.yoj.repository.db.cache.FirstLevelCache; import tech.ydb.yoj.repository.db.exception.IllegalTransactionIsolationLevelException; @@ -34,11 +35,13 @@ public class InMemoryTable> implements Table { private final Class type; private final EntitySchema schema; + private final TableDescriptor tableDescriptor; private final InMemoryRepositoryTransaction transaction; public InMemoryTable(DbMemory memory) { this.type = memory.type(); this.schema = EntitySchema.of(type); + this.tableDescriptor = TableDescriptor.from(schema); this.transaction = memory.transaction(); } @@ -330,7 +333,7 @@ public List find( .filter(i -> i.getIndexName().equals(indexName)) .findAny() .orElseThrow(() -> new IllegalArgumentException( - "Entity `%s` doesn't have index `%s`".formatted(schema.getName(), indexName) + "Table `%s` doesn't have index `%s`".formatted(tableDescriptor.toDebugString(), indexName) )); Set indexKeys = Set.copyOf(globalIndex.getFieldNames()); @@ -338,8 +341,8 @@ public List find( Preconditions.checkArgument( missingInIndexKeys.isEmpty(), - "Index `%s` of entity `%s` doesn't contain key(s): [%s]".formatted( - indexName, schema.getName(), String.join(", ", missingInIndexKeys) + "Index `%s` of table `%s` doesn't contain key(s): [%s]".formatted( + indexName, tableDescriptor.toDebugString(), String.join(", ", missingInIndexKeys) ) ); Preconditions.checkArgument( diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/bulk/BulkMapperImpl.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/bulk/BulkMapperImpl.java index dd5d43d0..d12f59b9 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/bulk/BulkMapperImpl.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/bulk/BulkMapperImpl.java @@ -5,21 +5,24 @@ import tech.ydb.yoj.databind.schema.Schema; import tech.ydb.yoj.repository.db.Entity; import tech.ydb.yoj.repository.db.EntitySchema; +import tech.ydb.yoj.repository.db.TableDescriptor; import tech.ydb.yoj.repository.ydb.yql.YqlType; import java.util.HashMap; import java.util.Map; public final class BulkMapperImpl> implements BulkMapper { + private final TableDescriptor tableDescriptor; private final EntitySchema srcSchema; - public BulkMapperImpl(EntitySchema srcSchema) { + public BulkMapperImpl(TableDescriptor tableDescriptor, EntitySchema srcSchema) { + this.tableDescriptor = tableDescriptor; this.srcSchema = srcSchema; } @Override public String getTableName(String tableSpace) { - return tableSpace + srcSchema.getName(); + return tableSpace + tableDescriptor.tableName(); } @Override diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/merge/ByEntityYqlQueriesMerger.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/merge/ByEntityYqlQueriesMerger.java index 1c799723..b6d2bc2d 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/merge/ByEntityYqlQueriesMerger.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/merge/ByEntityYqlQueriesMerger.java @@ -1,6 +1,5 @@ package tech.ydb.yoj.repository.ydb.merge; -import lombok.NonNull; import lombok.Value; import lombok.With; import org.slf4j.Logger; @@ -36,7 +35,7 @@ public class ByEntityYqlQueriesMerger implements YqlQueriesMerger { Statement.QueryType.DELETE_ALL)); private static final Map transitionMap = createTransitionMap(); - private final Map states = new HashMap<>(); + private final Map, TableState> states = new HashMap<>(); private final RepositoryCache cache; ByEntityYqlQueriesMerger(RepositoryCache cache) { @@ -48,7 +47,8 @@ public void onNext(YdbRepository.Query query) { Statement.QueryType queryType = query.getStatement().getQueryType(); check(SUPPORTED_QUERY_TYPES.contains(queryType), "Unsupported query type: " + queryType); - TableState tableState = states.computeIfAbsent(new TableMetadata(getEntityClass(query), getTableName(query)), __ -> new TableState()); + TableDescriptor tableDescriptor = convertQueryToYqlStatement(query).getTableDescriptor(); + TableState tableState = states.computeIfAbsent(tableDescriptor, __ -> new TableState()); if (queryType == Statement.QueryType.DELETE_ALL) { tableState.entityStates.clear(); tableState.deleteAll = query; @@ -193,10 +193,6 @@ private static Class getEntityClass(YdbRepository.Query query) { return convertQueryToYqlStatement(query).getInSchemaType(); } - private static String getTableName(YdbRepository.Query query) { - return convertQueryToYqlStatement(query).getTableName(); - } - private static YqlStatement convertQueryToYqlStatement(YdbRepository.Query query) { return (YqlStatement) query.getStatement(); } @@ -251,14 +247,8 @@ public boolean isEmpty() { @Value private static class TransitionKey { - private MergingState state; - private Statement.QueryType nextQueryType; - } - - @Value - private static class TableMetadata { - private @NonNull Class entityClass; - private @NonNull String tableName; + MergingState state; + Statement.QueryType nextQueryType; } private enum MergingState { diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/readtable/EntityIdKeyMapper.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/readtable/EntityIdKeyMapper.java index d9a3ea37..93c7f344 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/readtable/EntityIdKeyMapper.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/readtable/EntityIdKeyMapper.java @@ -6,6 +6,7 @@ import tech.ydb.yoj.repository.db.Entity; import tech.ydb.yoj.repository.db.EntityIdSchema; import tech.ydb.yoj.repository.db.EntitySchema; +import tech.ydb.yoj.repository.db.TableDescriptor; import tech.ydb.yoj.repository.ydb.statement.ResultSetReader; import tech.ydb.yoj.repository.ydb.yql.YqlType; @@ -14,11 +15,13 @@ import java.util.Map; public final class EntityIdKeyMapper, ID extends Entity.Id, RESULT> implements ReadTableMapper { + private final TableDescriptor tableDescriptor; private final EntitySchema srcSchema; private final Schema dstSchema; private final ResultSetReader resultSetReader; - public EntityIdKeyMapper(EntitySchema srcSchema, Schema dstSchema) { + public EntityIdKeyMapper(TableDescriptor tableDescriptor, EntitySchema srcSchema, Schema dstSchema) { + this.tableDescriptor = tableDescriptor; this.srcSchema = srcSchema; this.dstSchema = dstSchema; this.resultSetReader = new ResultSetReader<>(dstSchema); @@ -45,7 +48,7 @@ public List getColumns() { @Override public String getTableName(String tableSpace) { - return tableSpace + srcSchema.getName(); + return tableSpace + tableDescriptor.tableName(); } @Override diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/DeleteAllStatement.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/DeleteAllStatement.java index e7a1b47a..de76005b 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/DeleteAllStatement.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/DeleteAllStatement.java @@ -21,6 +21,6 @@ public QueryType getQueryType() { @Override public String toDebugString(PARAMS params) { - return "deleteAll(" + schema.getName() + ")"; + return "deleteAll(" + tableDescriptor.toDebugString() + ")"; } } diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/FindAllYqlStatement.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/FindAllYqlStatement.java index e4a19a50..3afe9954 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/FindAllYqlStatement.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/FindAllYqlStatement.java @@ -28,6 +28,6 @@ public QueryType getQueryType() { @Override public String toDebugString(PARAMS params) { - return "findAll(" + schema.getName() + ")"; + return "findAll(" + tableDescriptor.toDebugString() + ")"; } } diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/FindInStatement.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/FindInStatement.java index 55bf091e..b550e5a2 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/FindInStatement.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/FindInStatement.java @@ -156,7 +156,7 @@ public static , RESULT> FindInStatement, T, RESULT @Nullable Integer limit ) { Schema keySchema = getKeySchemaFromValues(keys); - Set keyFields = collectKeyFieldsFromKeys(schema, indexName, keySchema, keys); + Set keyFields = collectKeyFieldsFromKeys(tableDescriptor, schema, indexName, keySchema, keys); return new FindInStatement<>( tableDescriptor, schema, resultSchema, keySchema, keyFields, indexName, filter, orderBy, limit @@ -219,11 +219,13 @@ private static Schema getKeySchemaFromValues(Iterable keys) { return ObjectSchema.of((Class) key.getClass()); } - private static Set collectKeyFieldsFromKeys( - Schema entitySchema, + private static , K> Set collectKeyFieldsFromKeys( + TableDescriptor tableDescriptor, + Schema entitySchema, String indexName, - Schema keySchema, - Iterable keys) { + Schema keySchema, + Iterable keys + ) { Set> nonNullFieldsSet = Streams.stream(keys) .map(key -> nonNullKeyFieldNames(keySchema, key)) .collect(toUnmodifiableSet()); @@ -238,7 +240,7 @@ private static Set collectKeyFieldsFromKeys( .filter(index -> indexName.equals(index.getIndexName())) .findAny() .orElseThrow(() -> new IllegalArgumentException( - "Entity `%s` doesn't have index `%s`".formatted(entitySchema.getName(), indexName) + "Table `%s` doesn't have index `%s`".formatted(tableDescriptor.toDebugString(), indexName) )); // 2. all key fields are index key fields @@ -247,8 +249,8 @@ private static Set collectKeyFieldsFromKeys( Preconditions.checkArgument( missingInIndexKeys.isEmpty(), - "Index `%s` of entity `%s` doesn't contain key(s): [%s]".formatted( - indexName, entitySchema.getName(), String.join(", ", missingInIndexKeys) + "Index `%s` of table `%s` doesn't contain key(s): [%s]".formatted( + indexName, tableDescriptor.toDebugString(), String.join(", ", missingInIndexKeys) ) ); @@ -268,8 +270,8 @@ private static Set collectKeyFieldsFromKeys( Preconditions.checkArgument( entityFieldType.equals(keyFieldType.getValue()), - "Entity `%s` has column `%s` of type `%s`, but corresponding key field is `%s`".formatted( - entitySchema.getName(), keyFieldType.getKey(), entityFieldType, keyFieldType.getValue() + "Table `%s` has column `%s` of type `%s`, but corresponding key field is `%s`".formatted( + tableDescriptor.toDebugString(), keyFieldType.getKey(), entityFieldType, keyFieldType.getValue() ) ); } @@ -316,7 +318,7 @@ private void validateOrderByFields() { Preconditions.checkArgument( missingColumns.isEmpty(), "Result schema of '%s' does not contain field(s): [%s] by which the result is ordered: %s".formatted( - resultSchema.getType().getSimpleName(), String.join(", ", missingColumns), orderBy + resultSchema.getTypeName(), String.join(", ", missingColumns), orderBy ) ); } diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/ResultSetReader.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/ResultSetReader.java index 6411a05b..528d450b 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/ResultSetReader.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/ResultSetReader.java @@ -36,7 +36,7 @@ public RESULT readResult(List columnList, ValueProtos.Value return resultSchema.newInstance(cells); } catch (Exception e) { throw new ConversionException( - format("Could not convert %s%s: %s", resultSchema.getName(), id(cells), e.getMessage()), + format("Could not convert %s%s: %s", resultSchema.getTypeName(), id(cells), e.getMessage()), e ); } diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/YqlStatement.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/YqlStatement.java index 3f5c5115..333a49e7 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/YqlStatement.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/statement/YqlStatement.java @@ -2,7 +2,7 @@ import com.google.common.base.Preconditions; import com.google.protobuf.NullValue; -import lombok.NonNull; +import lombok.Getter; import tech.ydb.proto.ValueProtos; import tech.ydb.yoj.databind.schema.Schema; import tech.ydb.yoj.repository.db.Entity; @@ -38,7 +38,8 @@ public abstract class YqlStatement, RESULT protected final EntitySchema schema; protected final Schema resultSchema; protected final ResultSetReader resultSetReader; - protected final String tableName; + @Getter + protected final TableDescriptor tableDescriptor; public YqlStatement( TableDescriptor tableDescriptor, EntitySchema schema, Schema resultSchema @@ -46,7 +47,7 @@ public YqlStatement( this.schema = schema; this.resultSchema = resultSchema; this.resultSetReader = new ResultSetReader<>(resultSchema); - this.tableName = tableDescriptor.tableName(); + this.tableDescriptor = tableDescriptor; } @Override @@ -136,10 +137,6 @@ public Class getInSchemaType() { return schema.getType(); } - public @NonNull String getTableName() { - return tableName; - } - protected Collection getParams() { return emptyList(); } @@ -164,7 +161,7 @@ protected String nameEqVars() { } protected String table(String tablespace) { - return escape(tablespace + tableName); + return escape(tablespace + tableDescriptor.tableName()); } protected String escape(String value) { diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/table/YdbTable.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/table/YdbTable.java index 405f38f2..ba253df8 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/table/YdbTable.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/table/YdbTable.java @@ -201,13 +201,13 @@ public void deleteAll() { @Override public void bulkUpsert(List input, BulkParams params) { - var mapper = new BulkMapperImpl<>(schema); + var mapper = new BulkMapperImpl<>(tableDescriptor, schema); executor.bulkUpsert(mapper, input, params); } @Override public > Stream readTable(ReadTableParams params) { - ReadTableMapper mapper = new EntityIdKeyMapper<>(schema, schema); + ReadTableMapper mapper = new EntityIdKeyMapper<>(tableDescriptor, schema, schema); return readTableStream(mapper, params) .map(T::postLoad); } @@ -215,14 +215,14 @@ public > Stream readTable(ReadTableParams params) @Override public > Stream readTableIds(ReadTableParams params) { EntityIdSchema idSchema = schema.getIdSchema(); - ReadTableMapper mapper = new EntityIdKeyMapper<>(schema, idSchema); + ReadTableMapper mapper = new EntityIdKeyMapper<>(tableDescriptor, schema, idSchema); return readTableStream(mapper, params); } @Override public , ID extends Id> Stream readTable(Class viewClass, ReadTableParams params) { ViewSchema viewSchema = ViewSchema.of(viewClass); - ReadTableMapper mapper = new EntityIdKeyMapper<>(schema, viewSchema); + ReadTableMapper mapper = new EntityIdKeyMapper<>(tableDescriptor, schema, viewSchema); return readTableStream(mapper, params); } diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/yql/YqlPredicate.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/yql/YqlPredicate.java index ccd62cdd..dbb8996d 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/yql/YqlPredicate.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/yql/YqlPredicate.java @@ -369,7 +369,9 @@ public > String toYql(@NonNull EntitySchema schema) { return field.flatten() .map(this::fieldToYql) .reduce(rel::combine) - .orElseThrow(() -> new IllegalStateException("No DB fields found for " + fieldPath + " in " + schema.getName())); + .orElseThrow(() -> new IllegalStateException( + "No DB fields found for " + fieldPath + " in " + schema.getTypeName() + )); } private String fieldToYql(EntitySchema.JavaField field) { @@ -711,7 +713,9 @@ public > String toYql(@NonNull EntitySchema schema) { return schema.getField(fieldPath).flatten() .map(dbField -> format("`%s` %s", dbField.getName(), type.yql)) .reduce(type::combine) - .orElseThrow(() -> new IllegalStateException("No DB fields found for " + fieldPath + " in " + schema.getName())); + .orElseThrow(() -> new IllegalStateException( + "No DB fields found for " + fieldPath + " in " + schema.getTypeName() + )); } @Override diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/yql/YqlView.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/yql/YqlView.java index 191e2bd5..1e9acd49 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/yql/YqlView.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/yql/YqlView.java @@ -81,8 +81,9 @@ public > String toYql(@NonNull EntitySchema schema) { } } - throw new IllegalStateException(String.format("Unable to find index [%s] in table [%s]", - index, schema.getName())); + throw new IllegalStateException( + "Unable to find index [%s] in table [%s]".formatted(index, schema.getTypeName()) + ); } @Override diff --git a/repository/src/main/java/tech/ydb/yoj/repository/db/TableDescriptor.java b/repository/src/main/java/tech/ydb/yoj/repository/db/TableDescriptor.java index 608b65a0..1dd8326e 100644 --- a/repository/src/main/java/tech/ydb/yoj/repository/db/TableDescriptor.java +++ b/repository/src/main/java/tech/ydb/yoj/repository/db/TableDescriptor.java @@ -7,4 +7,12 @@ public record TableDescriptor>( public static > TableDescriptor from(EntitySchema schema) { return new TableDescriptor<>(schema.getType(), schema.getName()); } + + public String toDebugString() { + String entityName = entityType.getSimpleName(); + if (entityName.equals(tableName)) { + return entityName; + } + return "%s[%s]".formatted(entityName, tableName); + } } From 1d83776bb66c6b2ac39b8adb4e0d754c0e068f52 Mon Sep 17 00:00:00 2001 From: Alexander Lavrukov Date: Fri, 6 Dec 2024 10:58:52 +0300 Subject: [PATCH 2/2] Review fixes: change table -> entity in exception message --- .../src/main/java/tech/ydb/yoj/repository/ydb/yql/YqlView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/yql/YqlView.java b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/yql/YqlView.java index 1e9acd49..c92ee8c6 100644 --- a/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/yql/YqlView.java +++ b/repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/yql/YqlView.java @@ -82,7 +82,7 @@ public > String toYql(@NonNull EntitySchema schema) { } throw new IllegalStateException( - "Unable to find index [%s] in table [%s]".formatted(index, schema.getTypeName()) + "Unable to find index [%s] for entity [%s]".formatted(index, schema.getTypeName()) ); }