mirror of
https://github.com/floci-io/floci.git
synced 2026-11-25 14:57:54 -05:00
Athena runs Hive DDL against the Glue Data Catalog, but Floci sent every statement other than CREATE DATABASE to DuckDB: CREATE EXTERNAL TABLE, ALTER TABLE ADD PARTITION, MSCK REPAIR TABLE and SHOW PARTITIONS failed to parse, and DROP TABLE succeeded without touching Glue. AthenaHiveDdl parses CREATE EXTERNAL TABLE (columns, PARTITIONED BY, CLUSTERED BY, ROW FORMAT DELIMITED or SERDE, STORED AS, LOCATION, TBLPROPERTIES, with the SerDe parameters and input/output formats Hive stores), DROP TABLE, ALTER TABLE ADD/DROP PARTITION, MSCK REPAIR TABLE and SHOW PARTITIONS; AthenaHiveDdlExecutor applies them to Glue as Athena does: DROP TABLE keeps the data, MSCK only adds Hive-style partitions, IF [NOT] EXISTS turns duplicates and misses into no-ops, and SHOW PARTITIONS writes its rows as the query's result. A CREATE TABLE without EXTERNAL fails unless it is Iceberg or CREATE TABLE AS, which still go to the query engine. Mock mode keeps DDL result rows.