korlov42 commented on code in PR #783:
URL: https://github.com/apache/ignite-3/pull/783#discussion_r855384217
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/ddl/DdlSqlToCommandConverter.java:
##########
@@ -134,12 +163,23 @@ private CreateTableCommand
convertCreateTable(IgniteSqlCreateTable createTblNode
createTblCmd.schemaName(deriveSchemaName(createTblNode.name(), ctx));
createTblCmd.tableName(deriveObjectName(createTblNode.name(), ctx,
"tableName"));
createTblCmd.ifTableExists(createTblNode.ifNotExists());
+ createTblCmd.dataStorage(driveDataStorage(createTblNode.engineName(),
ctx));
if (createTblNode.createOptionList() != null) {
- for (SqlNode optNode : createTblNode.createOptionList().getList())
{
- IgniteSqlCreateTableOption opt = (IgniteSqlCreateTableOption)
optNode;
+ for (SqlNode optionNode :
createTblNode.createOptionList().getList()) {
+ IgniteSqlCreateTableOption option =
(IgniteSqlCreateTableOption) optionNode;
+
+ assert option.key().isSimple() : option.key();
+
+ String optionKey = option.key().getSimple();
- tblOptionProcessors.getOrDefault(opt.key(),
UNSUPPORTED_OPTION_PROCESSOR).process(opt, ctx, createTblCmd);
+ if (tableOptionInfos.containsKey(optionKey)) {
+ processTableOption(tableOptionInfos.get(optionKey),
option, ctx, createTblCmd);
+ } else if
(dataStorageOptionInfos.get(createTblCmd.dataStorage()).containsKey(optionKey))
{
Review Comment:
Ok
--
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]