maomaodev commented on PR #7406: URL: https://github.com/apache/kyuubi/pull/7406#issuecomment-4258098397
> how does this happen for SQL cases? I thought it should be handled by `AstBuilder.cleanTableProperties`, but it doesn't seem to be? could you please summarize the whole flow of the properties propagation? 1. SQL case reference: https://github.com/apache/kyuubi/issues/6443. The simplest example is: ``` CREATE EXTERNAL TABLE kyuubi_catalog.database.table_1 ( column1 string ) LOCATION 'hdfs:///tmp/table_1'; ``` 2. In the parse phase, `AstBuilder.cleanTableProperties` is responsible for **filtering/intercepting reserved properties from TBLPROPERTIES**. For example, you cannot set reserved properties via TBLPROPERTIES (e.g., trying to use `TBLPROPERTIES ('provider'='test')` is not allowed). 3. In the physical plan phase, before `CreateTableExec` calls `catalog.createTable(...)`, it invokes `CatalogV2Util.convertTableProperties`, which **unify all properties (properties, options, serde, location, external, provider, etc.)**. The resulting map is passed as the properties argument to KSHC’s `HiveTableCatalog.createTable`. See: https://github.com/apache/spark/pull/28026 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
