Aggarwal-Raghav commented on code in PR #6701:
URL: https://github.com/apache/hive/pull/6701#discussion_r3895446633
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java:
##########
@@ -640,6 +641,7 @@ protected void initializeOp(Configuration hconf) throws
HiveException {
jc = new JobConf(hconf);
setWriteOperation(jc, getConf().getTableInfo().getTableName(),
getConf().getWriteOperation());
+ setStatementOperation(jc, getConf().getTableInfo().getTableName(),
getConf().getStatementOperation());
Review Comment:
Hey @kasakrisz ,
`StatementOperation` represents the top-level intent during query
compilation. For example: If a MERGE query is fired from Beeline, then
`StatementOperation = MERGE`.
During Query execution, if the table is configured with
`write.merge.mode=COW`and `write.delete.mode=MOR`, then MERGE query is splitted
into INSERT and DELETE Branch (`writeOperation = DELETE`) and its incorrectly
picking `write.delete.mode` instead of `write.merge.mode.`
The aim of this PR is to pass the top-level query operation
(StatementOperation) from the compilation layer down to the execution layer so
it honor correct iceberg table property.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]