deniskuzZ commented on code in PR #6794:
URL: https://github.com/apache/hive/pull/6794#discussion_r4217674627


##########
ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java:
##########
@@ -149,6 +150,9 @@ public class FileSinkOperator extends 
TerminalOperator<FileSinkDesc> implements
   private transient String counterGroup;
   private transient BiFunction<Object[], ObjectInspector[], Integer> hashFunc;
   public static final String TOTAL_TABLE_ROWS_WRITTEN = 
"TOTAL_TABLE_ROWS_WRITTEN";
+  private transient long affectedRowCount;
+  private transient boolean allWritersProvideAffectedRows;

Review Comment:
   All writers of one FileSinkOperator come from the same output format (line 
973), so the “mixed writers” case can’t happen.
   ````
   private transient long affectedRowCount = -1;
   
   private void recordAffectedRows(RecordWriter writer) {
     if (writer instanceof AffectedRowsProvidingRecordWriter w) {
       affectedRowCount = Math.max(affectedRowCount, 0) + w.getAffectedRows();
     }
   }
   
   // closeOp
   row_count.set(conf.isDeleteOfSplitUpdate() ? 0
       : affectedRowCount >= 0 ? affectedRowCount : numRows);
   ````



-- 
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]

Reply via email to