korlov42 commented on code in PR #783:
URL: https://github.com/apache/ignite-3/pull/783#discussion_r855209620


##########
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:
   @agura, does it make sense to allow a syntax like this:
   `CREATE TABLE my_t (id int primary key, val int) WITH 
specific_storage_engine_propkey=specific_storage_engine_propval`
   
   This will render a different results depends on what is the actual value of 
`defaultStroageEngine` configuration property. In my opinion, it's more safe to 
require the engine to be specified either by ENGINE clause or  current 
execution context.



-- 
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]

Reply via email to