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.

貢獻者指南