fx19880617 commented on issue #6298: URL: https://github.com/apache/incubator-pinot/issues/6298#issuecomment-752394089
> @fx19880617 Here is my initial analysis, correct me if I'm wrong. > Calcite does not support `SHOW (databases | tables)` kind of SQL, below are the available implementations; therefore `DESCRIBE TABLE <table_name>` should work. To list all tables will have to go with `SELECT table_name FROM information_schema.TABLES;` and to list all schema then `SELECT table_name FROM information_schema.SCHEMATA;` > > ``` > SqlAlter > SqlBasicCall > SqlCase > SqlCreate > SqlDdl > SqlDelete > SqlDescribeSchema > SqlDescribeTable > SqlDrop > SqlExplain > SqlInsert > SqlJoin > SqlMatchRecognize > SqlMerge > SqlOrderBy > SqlSelect > SqlSetOption > SqlSnapshot > SqlUpdate > SqlWindow > SqlWith > SqlWithItem > ``` For queries like `SHOW TABLES xxx`, since it's fairly simple syntax, I feel we can just parse the query then show the results. Since calcite supports SqlDescribeTable, then we can use it for table describe query. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
