[ 
https://issues.apache.org/jira/browse/IMPALA-14589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18081170#comment-18081170
 ] 

ASF subversion and git services commented on IMPALA-14589:
----------------------------------------------------------

Commit 9a2e4072c615259027814c2c26cd29c1e3e0bc7f in impala's branch 
refs/heads/master from Arnab Karmakar
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=9a2e4072c ]

IMPALA-14589: [Part 3] Add support for Iceberg V3 write-default values

This patch adds write-default support for Iceberg V3 tables.

**write-default**: Applied when WRITING new rows that don't specify a
value for a column during INSERT operations. This ensures consistent
defaults across all engines writing to the table, regardless of whether
they're inserting via Spark, Flink, or Impala.

How write-default Works:
- When INSERT omits a column, InsertStmt checks for write-default in the
  column's Iceberg schema metadata
- If present, the write-default value is parsed and used as the column's
  value in the INSERT
- If no write-default is defined, NULL is used (existing behavior)
- Write-default values are also used for partition columns when they are
  not explicitly specified in column permutation

Type Support:
**Supported Types** (with write-default):
  - Numeric: BOOLEAN, TINYINT, SMALLINT, INT, BIGINT, FLOAT, DOUBLE, DECIMAL
  - Text: STRING, VARCHAR, CHAR
  - Temporal: DATE

**Unsupported Types** (rejected with AnalysisException):
  - TIMESTAMP
  - BINARY/FIXED

Testing:
- Positive tests: Extended iceberg-v3-default-values.test with
  write-default coverage:
  * Write-default for all supported primitive types (BOOLEAN through DATE)
  * INSERT omitting columns with write-default values
  * INSERT with explicit values overrides write-default
  * INSERT with explicit NULL overrides write-default

- Negative tests:
  * Removed negative test that blocked write-default (no longer needed)
  * Test TIMESTAMP and BINARY write-default rejection

Change-Id: I3bbccaad07f8c2f1fef59950de850f43d4044c08
Reviewed-on: http://gerrit.cloudera.org:8080/24232
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Zoltan Borok-Nagy <[email protected]>


> Iceberg V3 default values
> -------------------------
>
>                 Key: IMPALA-14589
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14589
>             Project: IMPALA
>          Issue Type: New Feature
>          Components: Backend, Frontend
>            Reporter: Zoltán Borók-Nagy
>            Assignee: Arnab Karmakar
>            Priority: Major
>              Labels: impala-iceberg
>
> Implement default value support for columns.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to