You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/04/29 05:09:07 UTC

[GitHub] [incubator-doris] imay commented on a change in pull request #1070: Fix bug that null value is not correctly handled when loading data

imay commented on a change in pull request #1070: Fix bug that null value is not correctly handled when loading data
URL: https://github.com/apache/incubator-doris/pull/1070#discussion_r279237705
 
 

 ##########
 File path: be/src/exec/olap_table_info.h
 ##########
 @@ -105,12 +105,21 @@ struct OlapTablePartition {
 class OlapTablePartKeyComparator {
 public:
     OlapTablePartKeyComparator(SlotDescriptor* slot_desc) : _slot_desc(slot_desc) { }
+    // return true if lhs < rhs
+    // 'nullptr' is max value, but 'null' is min value
     bool operator()(const Tuple* lhs, const Tuple* rhs) const {
         if (lhs == nullptr) {
             return false;
         } else if (rhs == nullptr) {
             return true;
         }
+
+        if (lhs->is_null(_slot_desc->null_indicator_offset())) {
+            return true;
 
 Review comment:
   if rhs->is_null() is false, this will return false

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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