[
https://issues.apache.org/jira/browse/HIVE-29819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18113670#comment-18113670
]
Kokila N edited comment on HIVE-29819 at 9/10/26 4:15 AM:
----------------------------------------------------------
Before fix:
{code:java}
POSTHOOK: query: explain update iceberg_cow_partitioned set str_col = 'UPDATED
NULLS' where str_col is null
POSTHOOK: type: QUERY
POSTHOOK: Input: default@iceberg_cow_partitioned
POSTHOOK: Output: default@iceberg_cow_partitioned
Vertex dependency in root stage
Map 1 <- Union 2 (CONTAINS)
Reducer 4 <- Map 3 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE), Union 2 (CONTAINS)
Reducer 6 <- Map 5 (SIMPLE_EDGE)
Reducer 7 <- Map 5 (SIMPLE_EDGE), Union 2 (CONTAINS)
Stage-3
Stats Work{}
Stage-0
Move Operator
table:{"name:":"default.iceberg_cow_partitioned"}
Stage-2
Dependency Collection{}
Stage-1
Union 2
<-Map 1 [CONTAINS]
File Output Operator [FS_51]
table:{"name:":"default.iceberg_cow_partitioned"}
Select Operator [SEL_49] (rows=1 width=398)
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
TableScan [TS_48] (rows=1 width=97)
default@iceberg_cow_partitioned,iceberg_cow_partitioned,Tbl:COMPLETE,Col:PARTIAL,Output:["index","string_col","boolean_col","tinyint_col"]{code}
After fix :
{code:java}
POSTHOOK: query: explain update iceberg_cow_partitioned set str_col = 'UPDATED
NULLS' where str_col is null
POSTHOOK: type: QUERY
POSTHOOK: Input: default@iceberg_cow_partitioned
POSTHOOK: Output: default@iceberg_cow_partitioned
Vertex dependency in root stage
Map 1 <- Union 2 (CONTAINS)
Reducer 4 <- Map 3 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE), Union 2 (CONTAINS)
Reducer 6 <- Map 5 (SIMPLE_EDGE), Union 2 (CONTAINS)
Reducer 7 <- Map 5 (SIMPLE_EDGE)
Stage-3
Stats Work{}
Stage-0
Move Operator
table:{"name:":"default.iceberg_cow_partitioned"}
Stage-2
Dependency Collection{}
Stage-1
Union 2
<-Map 1 [CONTAINS] vectorized
File Output Operator [FS_63]
table:{"name:":"default.iceberg_cow_partitioned"}
Select Operator [SEL_62] (rows=1 width=398)
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
TableScan [TS_48] (rows=1 width=281)
default@iceberg_cow_partitioned,iceberg_cow_partitioned,Tbl:COMPLETE,Col:PARTIAL,Output:["index","string_col","boolean_col","tinyint_col","str_col"]
{code}
After fix , table scan of Map1 has str_col in columns list.
was (Author: JIRAUSER298458):
{code:java}
POSTHOOK: query: explain update iceberg_cow_partitioned set str_col = 'UPDATED
NULLS' where str_col is null
POSTHOOK: type: QUERY
POSTHOOK: Input: default@iceberg_cow_partitioned
POSTHOOK: Output: default@iceberg_cow_partitioned
Vertex dependency in root stage
Map 1 <- Union 2 (CONTAINS)
Reducer 4 <- Map 3 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE), Union 2 (CONTAINS)
Reducer 6 <- Map 5 (SIMPLE_EDGE)
Reducer 7 <- Map 5 (SIMPLE_EDGE), Union 2 (CONTAINS)
Stage-3
Stats Work{}
Stage-0
Move Operator
table:{"name:":"default.iceberg_cow_partitioned"}
Stage-2
Dependency Collection{}
Stage-1
Union 2
<-Map 1 [CONTAINS]
File Output Operator [FS_51]
table:{"name:":"default.iceberg_cow_partitioned"}
Select Operator [SEL_49] (rows=1 width=398)
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
TableScan [TS_48] (rows=1 width=97)
default@iceberg_cow_partitioned,iceberg_cow_partitioned,Tbl:COMPLETE,Col:PARTIAL,Output:["index","string_col","boolean_col","tinyint_col"]
Before fix: {code}
After fix :
{code:java}
POSTHOOK: query: explain update iceberg_cow_partitioned set str_col = 'UPDATED
NULLS' where str_col is null
POSTHOOK: type: QUERY
POSTHOOK: Input: default@iceberg_cow_partitioned
POSTHOOK: Output: default@iceberg_cow_partitioned
Vertex dependency in root stage
Map 1 <- Union 2 (CONTAINS)
Reducer 4 <- Map 3 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE), Union 2 (CONTAINS)
Reducer 6 <- Map 5 (SIMPLE_EDGE), Union 2 (CONTAINS)
Reducer 7 <- Map 5 (SIMPLE_EDGE)
Stage-3
Stats Work{}
Stage-0
Move Operator
table:{"name:":"default.iceberg_cow_partitioned"}
Stage-2
Dependency Collection{}
Stage-1
Union 2
<-Map 1 [CONTAINS] vectorized
File Output Operator [FS_63]
table:{"name:":"default.iceberg_cow_partitioned"}
Select Operator [SEL_62] (rows=1 width=398)
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
TableScan [TS_48] (rows=1 width=281)
default@iceberg_cow_partitioned,iceberg_cow_partitioned,Tbl:COMPLETE,Col:PARTIAL,Output:["index","string_col","boolean_col","tinyint_col","str_col"]
{code}
After fix , table scan of Map1 has str_col in columns list.
> Iceberg COW: Update query with predicate is null for partitioned column fails
> -----------------------------------------------------------------------------
>
> Key: HIVE-29819
> URL: https://issues.apache.org/jira/browse/HIVE-29819
> Project: Hive
> Issue Type: Bug
> Reporter: Kokila N
> Assignee: Kokila N
> Priority: Major
> Labels: pull-request-available
>
> Fails for both vectorization and non-vectorization, diff errrors but root
> cause is same
> *Repro Steps:*
> {code:java}
> set hive.vectorized.execution.enabled=false;
> create external table iceberg_cow_partitioned (
> index int,
> string_col string,
> boolean_col boolean,
> str_col string,
> tinyint_col int
> ) partitioned by spec(str_col, tinyint_col)
> stored by iceberg
> tblproperties ('write.update.mode'='copy-on-write');
> insert into iceberg_cow_partitioned partition (str_col, tinyint_col)
> values (1, 'a', true, null, 0);
> update iceberg_cow_partitioned set str_col = 'UPDATED NULLS' where str_col is
> null;
> select * from iceberg_cow_partitioned;{code}
> *Error during update query:*
> {code:java}
> Caused by: java.lang.RuntimeException: cannot find field str_col from
> [org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@569fe99d,
>
> org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@6a1ee058,
>
> org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@65e4492b,
>
> org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@3b974f89,
>
> org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@12ed8a67,
>
> org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@f6cb442,
>
> org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@48061995]
> at
> org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.getStandardStructFieldRef(ObjectInspectorUtils.java:554)
> at
> org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector.getStructFieldRef(UnionStructObjectInspector.java:130)
> at
> org.apache.hadoop.hive.ql.exec.ExprNodeColumnEvaluator.initialize(ExprNodeColumnEvaluator.java:57)
> at
> org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator.initialize(ExprNodeGenericFuncEvaluator.java:163)
> at
> org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator.initialize(ExprNodeGenericFuncEvaluator.java:163)
> at
> org.apache.hadoop.hive.ql.exec.FilterOperator.process(FilterOperator.java:82)
> at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:889)
> at
> org.apache.hadoop.hive.ql.exec.TableScanOperator.process(TableScanOperator.java:182)
> at
> org.apache.hadoop.hive.ql.exec.MapOperator$MapOpCtx.forward(MapOperator.java:157)
> at
> org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:559)
> ... 20 more{code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)