Hello Zoltan Borok-Nagy, Peter Rozsa, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    https://gerrit.cloudera.org/25191

to look at the new patch set (#3).

Change subject: IMPALA-15617: Fix ALTER COLUMN DROP DEFAULT on TIMESTAMP and 
BINARY columns
......................................................................

IMPALA-15617: Fix ALTER COLUMN DROP DEFAULT on TIMESTAMP and BINARY columns

ALTER TABLE ... ALTER COLUMN ... DROP DEFAULT failed during analysis on
TIMESTAMP columns of Kudu and Iceberg V3 tables, and on BINARY columns
of Iceberg V3 tables, even when the column had no default. This made it
impossible to remove such defaults from Impala. SET DEFAULT NULL and
CREATE TABLE with DEFAULT NULL failed the same way on Kudu TIMESTAMP
columns.

DROP DEFAULT is analyzed as a NULL default. ColumnDef tried to convert
it to Unix time micros for TIMESTAMP columns, which fails for NULL, and
AlterTableAlterColStmt validated the type as if a default was being
set. ColumnDef now skips the TIMESTAMP conversion for NULL, and
AlterTableAlterColStmt validates the type only for SET DEFAULT.

Testing:
- FE: AnalyzeDDLTest and AnalyzeKuduDDLTest cover DROP DEFAULT and
  DEFAULT NULL on Kudu TIMESTAMP columns.
- E2E: kudu_alter.test and kudu_hms_alter.test cover DROP DEFAULT and
  SET DEFAULT NULL on a Kudu TIMESTAMP column, and
  iceberg-v3-default-values.test covers DROP DEFAULT on Iceberg
  TIMESTAMP and BINARY columns with write-defaults set outside Impala.

Change-Id: Ibd358f91dd203261a6cc7f409a4121a4ccda93a8
Assisted-by: Composer 2.5 (Cursor)
---
M fe/src/main/java/org/apache/impala/analysis/AlterTableAlterColStmt.java
M fe/src/main/java/org/apache/impala/analysis/ColumnDef.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeKuduDDLTest.java
M 
testdata/workloads/functional-query/queries/QueryTest/iceberg-v3-default-values.test
M testdata/workloads/functional-query/queries/QueryTest/kudu_alter.test
M testdata/workloads/functional-query/queries/QueryTest/kudu_hms_alter.test
7 files changed, 64 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/91/25191/3
--
To view, visit https://gerrit.cloudera.org/25191
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibd358f91dd203261a6cc7f409a4121a4ccda93a8
Gerrit-Change-Number: 25191
Gerrit-PatchSet: 3
Gerrit-Owner: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>

Reply via email to