You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Aaron2Ti (via GitHub)" <gi...@apache.org> on 2023/04/02 17:01:49 UTC

[GitHub] [doris] Aaron2Ti commented on a diff in pull request #18318: Support aggregate type of REPLACE_IF_NULL

Aaron2Ti commented on code in PR #18318:
URL: https://github.com/apache/doris/pull/18318#discussion_r1155344625


##########
fe/spark-dpp/src/main/java/org/apache/doris/load/loadv2/dpp/SparkRDDAggregator.java:
##########
@@ -240,11 +242,19 @@ Object update(Object dst, Object src) {
     }
 }
 
+class ReplaceIfNullAggregator extends SparkRDDAggregator<Object> {
+
+    @Override
+    Object update(Object dst, Object src) {
+        return dst == null ? src : dst;
+    }
+}
+
 class ReplaceIfNotNullAggregator extends SparkRDDAggregator<Object> {
 
     @Override
     Object update(Object dst, Object src) {
-        return src == null ? dst : src;
+        return dst != null ? src : dst;

Review Comment:
   hi @wangbo 
   could you please help double review logic of this change please
   Regards



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org