zstan commented on code in PR #6927:
URL: https://github.com/apache/ignite-3/pull/6927#discussion_r2536766142
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -293,9 +294,11 @@ public synchronized CompletableFuture<Void>
startAsync(ComponentContext componen
var storageProfileValidator = new
ClusterWideStorageProfileValidator(logicalTopologyService);
var nodeFilterValidator = new
ClusterWideNodeFilterValidator(logicalTopologyService);
+ CreateTableDefaultsView tablePropertiesView =
clusterCfg.createTable().value();
Review Comment:
done
##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/prepare/ddl/DdlSqlToCommandConverterTest.java:
##########
@@ -870,6 +870,28 @@ public void
testAlterColumnSetDefaultRejectUnsupportedDefault(String defaultExpr
() -> convert((SqlDdl) node, createContext()));
}
+ @Test
+ void createTableWithNonDefaultStalenessConfig() throws SqlParseException {
+ long staleRowsCount = DEFAULT_MIN_STALE_ROWS_COUNT / 2;
+ double staleRowsFraction = DEFAULT_STALE_ROWS_FRACTION / 2;
+
+ assert staleRowsCount != 0 && staleRowsFraction != 0.0d;
+
+ Supplier<TableStatsStalenessConfiguration> statStalenessProperties =
+ () -> new TableStatsStalenessConfiguration(staleRowsFraction,
staleRowsCount);
+ converter = new DdlSqlToCommandConverter(storageProfiles ->
completedFuture(null), filter -> completedFuture(null),
+ statStalenessProperties);
+
+ CatalogCommand cmd = convert("CREATE TABLE t (id INT PRIMARY KEY, val
INT)");
+
+ mockCatalogSchemaAndZone("TEST_ZONE");
+
+ NewTableEntry newTable = invokeAndGetFirstEntry(cmd,
NewTableEntry.class);
+
+ assertThat(newTable.descriptor().properties().minStaleRowsCount(),
is(staleRowsCount));
+ assertThat(newTable.descriptor().properties().staleRowsFraction(),
is(staleRowsFraction));
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]