trinodb/trino

Restrict drop column operations for hive tables

开放

#20,807 创建于 2024年2月22日

 (4 条评论) (0 个反应) (0 位负责人)Java (2,678 个派生)batch import
good first issuehive

仓库指标

星标
 (9,113 个星标)
PR 合并指标
 (平均合并 5天 9小时) (30 天内合并 306 个 PR)

描述

As per the Hive docs - https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterTable/Partition/Column

REPLACE COLUMNS removes all existing columns and adds the new set of columns. This can be done only for tables with a native SerDe (DynamicSerDe, MetadataTypedColumnsetSerDe, LazySimpleSerDe and ColumnarSerDe). Refer to Hive SerDe for more information. REPLACE COLUMNS can also be used to drop columns. For example, "ALTER TABLE test_change REPLACE COLUMNS (a int, b int);" will remove column 'c' from test_change's schema.

But we try to run replace columns operation for all the file formats which provides inconsistent behavior both from Trino's hive connector and querying hive directly.

贡献者指南