[jira] [Comment Edited] (IGNITE-10784) SQL: Create a view with list of existing tables
[ https://issues.apache.org/jira/browse/IGNITE-10784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16744875#comment-16744875 ] Pavel Kuznetsov edited comment on IGNITE-10784 at 1/17/19 10:30 AM: [~vozerov], I've updated PR according your comments. was (Author: pkouznet): [~vozerov] Updated according your comments. > SQL: Create a view with list of existing tables > --- > > Key: IGNITE-10784 > URL: https://issues.apache.org/jira/browse/IGNITE-10784 > Project: Ignite > Issue Type: Task > Components: sql >Reporter: Vladimir Ozerov >Assignee: Pavel Kuznetsov >Priority: Major > Fix For: 2.8 > > > We need to create a system view of currently available SQL tables. > Minimal required information: > 1) Schema name > 2) Table name > 3) Owning cache name > 4) Owning cache ID > Other info to consider: > 1) Affinity column name > 2) Key/value aliases > 3) Key/value type names > 4) Analyse other vendors (e.g. MySQL, Postgresql) and see if any other useful > information could be exposed (taking in count that a lot of engine properties > are already exposed through {{CACHES}} view) > Starting point: {{SqlSystemView}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (IGNITE-10784) SQL: Create a view with list of existing tables
[ https://issues.apache.org/jira/browse/IGNITE-10784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16740199#comment-16740199 ] Vladimir Ozerov edited comment on IGNITE-10784 at 1/11/19 9:22 AM: --- [~pkouznet], my comments: # It is not clear what is the reason of adding locking to {{GridH2Table.getColumns}} method? # {{SqlSystemViewTables}} - no need to define separate constants for every field name. # Naming: {{mngr}} -> {{mgr}} # Some column renames are needed: {{OWNING_CACHE_NAME}} -> {{CACHE_NAME}}, {{OWNING_CACHE_ID}} -> {{CACHE_ID}}, {{TABLE_SCHEMA}} -> {{SCHEMA_NAME}} # Why do we need to use {{ctx.cache().publicCacheNames()}}, while {{SchemaManager}} already has all tables? # {{SqlSystemViewTables.getRowCount}} - same thing. Why don't just call {{SchemaManager.dataTables.size()}}? # Key and value aliases should be {{null}} if they are not set # There is no need to iterate over columns to find key/val alias. Instead, you can get key or val alias ID from {{GridH2RowDescriptor}} and dereference that column directly. # Test coverage needs to be improved a bit - we need more queries with conditions on different columns. was (Author: vozerov): [~pkouznet], my comments: # It is not clear what is the reason of adding locking to {{GridH2Table.getColumns}} method? # {{SqlSystemViewTables}} - no need to define separate constants for every field name. # Naming: {{mngr}} -> {{mgr}} # Some column renames are needed: {{OWNING_CACHE_NAME}} -> {{CACHE_NAME}}, {{OWNING_CACHE_ID}} -> {{CACHE_ID}}, {{TABLE_SCHEMA}} -> {{SCHEMA_NAME}} # Why do we need to use {{ctx.cache().publicCacheNames()}}, while {{SchemaManager}} already has all tables? # {{SqlSystemViewTables.getRowCount}} - same things. We don't just call {{SchemaManager.dataTables.size()}}? # Key and value aliases should be {{null}} if they are not set # There is no need to iterate over columns to find key/val alias. Instead, you can get key or val alias ID from {{GridH2RowDescriptor}} and dereference that column directly. # Test coverage needs to be improved a bit - we need more queries with conditions on different columns. > SQL: Create a view with list of existing tables > --- > > Key: IGNITE-10784 > URL: https://issues.apache.org/jira/browse/IGNITE-10784 > Project: Ignite > Issue Type: Task > Components: sql >Reporter: Vladimir Ozerov >Assignee: Pavel Kuznetsov >Priority: Major > Fix For: 2.8 > > > We need to create a system view of currently available SQL tables. > Minimal required information: > 1) Schema name > 2) Table name > 3) Owning cache name > 4) Owning cache ID > Other info to consider: > 1) Affinity column name > 2) Key/value aliases > 3) Key/value type names > 4) Analyse other vendors (e.g. MySQL, Postgresql) and see if any other useful > information could be exposed (taking in count that a lot of engine properties > are already exposed through {{CACHES}} view) > Starting point: {{SqlSystemView}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (IGNITE-10784) SQL: Create a view with list of existing tables
[ https://issues.apache.org/jira/browse/IGNITE-10784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16728692#comment-16728692 ] Pavel Kuznetsov edited comment on IGNITE-10784 at 12/25/18 12:35 PM: - Lets add also "constant" fields : CATALOG_NAME ("IGNITE"), TABLE_TYPE ("TABLE") It is also good to have TABLE_ROWS field, I should think, if we can do this without scan query every time (size of pk index?). was (Author: pkouznet): Lets add also "constant" fields : CATALOG_NAME ("IGNITE"), TABLE_TYPE ("TABLE") It is also good to have TABLE_ROWS field, should think, if we can do without scan (size of pk index?). > SQL: Create a view with list of existing tables > --- > > Key: IGNITE-10784 > URL: https://issues.apache.org/jira/browse/IGNITE-10784 > Project: Ignite > Issue Type: Task > Components: sql >Reporter: Vladimir Ozerov >Assignee: Pavel Kuznetsov >Priority: Major > Fix For: 2.8 > > > We need to create a system view of currently available SQL tables. > Minimal required information: > 1) Schema name > 2) Table name > 3) Owning cache name > 4) Owning cache ID > Other info to consider: > 1) Affinity column name > 2) Key/value aliases > 3) Key/value type names > 4) Analyse other vendors (e.g. MySQL, Postgresql) and see if any other useful > information could be exposed (taking in count that a lot of engine properties > are already exposed through {{CACHES}} view) > Starting point: {{SqlSystemView}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (IGNITE-10784) SQL: Create a view with list of existing tables
[ https://issues.apache.org/jira/browse/IGNITE-10784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16728651#comment-16728651 ] Pavel Kuznetsov edited comment on IGNITE-10784 at 12/25/18 12:33 PM: - maybe we should duplicate atomic mode or introduce new column "mvcc enabled". Upd: I mean column with boolean type, which is true if owning cache has atomicity mode == TRANSACTIONAL_SNAPSHOT was (Author: pkouznet): maybe we should duplicate atomic mode or introduce new column "mvcc enabled". > SQL: Create a view with list of existing tables > --- > > Key: IGNITE-10784 > URL: https://issues.apache.org/jira/browse/IGNITE-10784 > Project: Ignite > Issue Type: Task > Components: sql >Reporter: Vladimir Ozerov >Assignee: Pavel Kuznetsov >Priority: Major > Fix For: 2.8 > > > We need to create a system view of currently available SQL tables. > Minimal required information: > 1) Schema name > 2) Table name > 3) Owning cache name > 4) Owning cache ID > Other info to consider: > 1) Affinity column name > 2) Key/value aliases > 3) Key/value type names > 4) Analyse other vendors (e.g. MySQL, Postgresql) and see if any other useful > information could be exposed (taking in count that a lot of engine properties > are already exposed through {{CACHES}} view) > Starting point: {{SqlSystemView}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (IGNITE-10784) SQL: Create a view with list of existing tables
[ https://issues.apache.org/jira/browse/IGNITE-10784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16728522#comment-16728522 ] Pavel Kuznetsov edited comment on IGNITE-10784 at 12/25/18 9:55 AM: MySQL has approximate table size. was (Author: pkouznet): MySQL has approximate table table size. > SQL: Create a view with list of existing tables > --- > > Key: IGNITE-10784 > URL: https://issues.apache.org/jira/browse/IGNITE-10784 > Project: Ignite > Issue Type: Task > Components: sql >Reporter: Vladimir Ozerov >Assignee: Pavel Kuznetsov >Priority: Major > Fix For: 2.8 > > > We need to create a system view of currently available SQL tables. > Minimal required information: > 1) Schema name > 2) Table name > 3) Owning cache name > 4) Owning cache ID > Other info to consider: > 1) Affinity column name > 2) Key/value aliases > 3) Key/value type names > 4) Analyse other vendors (e.g. MySQL, Postgresql) and see if any other useful > information could be exposed (taking in count that a lot of engine properties > are already exposed through {{CACHES}} view) > Starting point: {{SqlSystemView}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)