[jira] [Commented] (IGNITE-5052) Implement CREATE/DROP TABLE parsing and execution
[ https://issues.apache.org/jira/browse/IGNITE-5052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16020915#comment-16020915 ] Vladimir Ozerov commented on IGNITE-5052: - [~al.psc], my comments: 1) {{H2DynamicTableSelfTest}} - invalid JavaDocs on methods 2) Please confirm that TC state is acceptable. > Implement CREATE/DROP TABLE parsing and execution > - > > Key: IGNITE-5052 > URL: https://issues.apache.org/jira/browse/IGNITE-5052 > Project: Ignite > Issue Type: Task > Components: sql >Reporter: Vladimir Ozerov >Assignee: Alexander Paschenko > Labels: important > Fix For: 2.1 > > > Convert SQL string to relevant Igntie command. This could be: > - {{createCache}} > - {{getOrCreateCache}} (for {{IF NOT EXISTS}} case) > - {{destroyCache}} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (IGNITE-5052) Implement CREATE/DROP TABLE parsing and execution
[ https://issues.apache.org/jira/browse/IGNITE-5052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16019442#comment-16019442 ] Vladimir Ozerov commented on IGNITE-5052: - [~al.psc], my comments: 1) {{GridQueryProcessor}} - call to {{GridCacheProcessor.createConfigFromTemplate}} will never fail even if template doesn't exist; in case of CREATE TABLE we need to throw an exception 2) {{GridQueryProcessor}} - do not use {{IgniteSQLException}} and {{IgniteQueryErrorCode}} in tihs class; use {{SchemaOperationException}} instead 3) {{GridQueryProcessor.dynamicTableCreate}} - please pass schema name here; it will not be used for now until schema-related refactoring is ready 4) {{GridSqlQueryParser}} - we need sensible names for "TPL" ({{PARAM_TPL_CACHE}} -> {{PARAM_CACHE_TEMPLATE}}, {{tplCache}} -> {{cacheTemplate}}) 5) {{H2DynamicTableSelfTest}} - not included into any test suite 6) {{H2DynamicTableSelfTest}} - invalid JavaDocs on methods > Implement CREATE/DROP TABLE parsing and execution > - > > Key: IGNITE-5052 > URL: https://issues.apache.org/jira/browse/IGNITE-5052 > Project: Ignite > Issue Type: Task > Components: sql >Reporter: Vladimir Ozerov >Assignee: Alexander Paschenko > Labels: important > Fix For: 2.1 > > > Convert SQL string to relevant Igntie command. This could be: > - {{createCache}} > - {{getOrCreateCache}} (for {{IF NOT EXISTS}} case) > - {{destroyCache}} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (IGNITE-5052) Implement CREATE/DROP TABLE parsing and execution
[ https://issues.apache.org/jira/browse/IGNITE-5052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16012658#comment-16012658 ] Alexander Paschenko commented on IGNITE-5052: - 1, 2, 4, 5, 6, 8, 9 - fixed. 3, 7 - WIP. 10 - need advice from Semyon and probably yourself, Vlad, I will contact both of you additionally. > Implement CREATE/DROP TABLE parsing and execution > - > > Key: IGNITE-5052 > URL: https://issues.apache.org/jira/browse/IGNITE-5052 > Project: Ignite > Issue Type: Task > Components: sql >Reporter: Vladimir Ozerov >Assignee: Alexander Paschenko > Labels: important > Fix For: 2.1 > > > Convert SQL string to relevant Igntie command. This could be: > - {{createCache}} > - {{getOrCreateCache}} (for {{IF NOT EXISTS}} case) > - {{destroyCache}} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (IGNITE-5052) Implement CREATE/DROP TABLE parsing and execution
[ https://issues.apache.org/jira/browse/IGNITE-5052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16012015#comment-16012015 ] Vladimir Ozerov commented on IGNITE-5052: - [~al.psc], my comments: 1) {{IgniteQueryErrorCode.QUERY_ENTITIES_PRESENT}} - let's remove this error code 2) {{IgniteKernal.getOrCreateCache0}} - code duplication; looks like we should call {{getOrCreateCache0()}} from {{getOrCreateCache()}} to avoid it; 3) {{GridSqlCreateTable}} - please remove {{getSql()}} body, as it is not used 4) {{GridSqlQueryParser}} - unused imports and static constants 5) {{DdlStatementsProcessor.toQueryEntity}} - {{_KEY}} and {{_VAL}} columns should raise {{PARSING}} exception, they are already agnostic to caches; also it looks like all these checks should be moved to parser, so that successfull parsing mean that we have valid model (you already did that for NOT NULL columns and extra params) 6) {{IgniteH2Indexing.dynamicTableCreate}} - call to {{ctx.cache().cache()}} at the verŠ½ beginning is wrong; see {{org.apache.ignite.internal.IgniteKernal#createCache(java.lang.String)}} and {{org.apache.ignite.internal.processors.cache.GridCacheProcessor#createConfigFromTemplate}} on how to get configuration for template 7) {{IgniteH2Indexing.dynamicTableDrop}} - let's avoid call to {{space(schemaName)}} as this method will be removed soon to allow for multiple tables from different caches in the same schema 8) {{IgniteH2Indexing}} - both {{dynamicTableCreate}} and {{dynamicTableDrop}} methods do not have anything H2-specific; we should remove it from H2, and move relevant code to {{GridQueryProcessor}} 9) {{GridQueryProcessor}} - no wildcards in imports 10) {{GridCacheProcessor}} - I would ask [~agoncharuk] or [~sboikov] to review this change > Implement CREATE/DROP TABLE parsing and execution > - > > Key: IGNITE-5052 > URL: https://issues.apache.org/jira/browse/IGNITE-5052 > Project: Ignite > Issue Type: Task > Components: sql >Reporter: Vladimir Ozerov >Assignee: Alexander Paschenko > Labels: important > Fix For: 2.1 > > > Convert SQL string to relevant Igntie command. This could be: > - {{createCache}} > - {{getOrCreateCache}} (for {{IF NOT EXISTS}} case) > - {{destroyCache}} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (IGNITE-5052) Implement CREATE/DROP TABLE parsing and execution
[ https://issues.apache.org/jira/browse/IGNITE-5052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16006786#comment-16006786 ] Alexander Paschenko commented on IGNITE-5052: - Fixed pts. 4, 5 > Implement CREATE/DROP TABLE parsing and execution > - > > Key: IGNITE-5052 > URL: https://issues.apache.org/jira/browse/IGNITE-5052 > Project: Ignite > Issue Type: Task > Components: sql >Reporter: Vladimir Ozerov >Assignee: Alexander Paschenko > Labels: important > Fix For: 2.1 > > > Convert SQL string to relevant Igntie command. This could be: > - {{createCache}} > - {{getOrCreateCache}} (for {{IF NOT EXISTS}} case) > - {{destroyCache}} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (IGNITE-5052) Implement CREATE/DROP TABLE parsing and execution
[ https://issues.apache.org/jira/browse/IGNITE-5052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16005237#comment-16005237 ] Alexander Paschenko commented on IGNITE-5052: - [~vozerov] 1, 2, 3, 6 - fixed. 4, 5 - will most likely fix tomorrow. 7 - to me, PARSING should be thrown only from parser which is reasonably agnostic to caches, etc. So I'd leave these alone. 8 - we need this no more and no less than for any other SQL statement. 9 - yes. > Implement CREATE/DROP TABLE parsing and execution > - > > Key: IGNITE-5052 > URL: https://issues.apache.org/jira/browse/IGNITE-5052 > Project: Ignite > Issue Type: Task > Components: sql >Reporter: Vladimir Ozerov >Assignee: Alexander Paschenko > Labels: important > Fix For: 2.1 > > > Convert SQL string to relevant Igntie command. This could be: > - {{createCache}} > - {{getOrCreateCache}} (for {{IF NOT EXISTS}} case) > - {{destroyCache}} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (IGNITE-5052) Implement CREATE/DROP table parsing and execution
[ https://issues.apache.org/jira/browse/IGNITE-5052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15998193#comment-15998193 ] Vladimir Ozerov commented on IGNITE-5052: - [~al.psc], my comments: 1) {{GridQueryProcessor}} - {{IgniteQueryErrorCode}} should not be used in this class; 2) {{GridQueryProcessor}} - looks like new methods should not reside here at all. This processing should be performed in H2, isn't it? 3) {{GridQueryProcessor.dynamicTableCreate}} - if template already contains another query entity, we should throw an exception, instead of clearing it silently; 4) {{GridQueryProcessor.dynamicTableCreate}} - we should hack {{GridCacheProcessor}} to allow for returning {{true}}/{{false}} on whether cache was created by this call or not. This will allow us to reliably check whether cache was created by our call or not. 5) {{GridQueryProcessor.dynamicTableCreate}} - if cache already exists, there is no need to compare anything in cache config. Just no-op or exception depending on {{ifNotExists}} flag. 6) {{IgniteQueryErrorCode}} - I would remove all new error codes and use {{PARSING}} for all those cases. 7) {{DdlStatementsProcessor.toQueryEntity}} - {{_KEY}} and {{_VAL}} handling appears to be a {{PARSING}} error to me as well, not {{UNEXPECTED_OPERATION}}. 8) {{GridSqlCreateTable.getSQL}} - looks like we do not need this. 9) {{GridSqlQueryParser.parseCreateTable}} - do we take in count {{PRIMARY KEY}} constraint defined separately from column? > Implement CREATE/DROP table parsing and execution > - > > Key: IGNITE-5052 > URL: https://issues.apache.org/jira/browse/IGNITE-5052 > Project: Ignite > Issue Type: Task > Components: SQL >Reporter: Vladimir Ozerov >Assignee: Alexander Paschenko > Labels: important > Fix For: 2.1 > > > Convert SQL string to relevant Igntie command. This could be: > - {{createCache}} > - {{getOrCreateCache}} (for {{IF NOT EXISTS}} case) > - {{destroyCache}} -- This message was sent by Atlassian JIRA (v6.3.15#6346)