cambyzju commented on code in PR #9466:
URL: https://github.com/apache/incubator-doris/pull/9466#discussion_r871919417


##########
be/src/util/array_parser.h:
##########
@@ -175,6 +202,37 @@ class ArrayParser {
             memory_copy(string_val->ptr, iterator->GetString(), 
iterator->GetStringLength());
             break;
         }
+        case TYPE_DATE:
+        case TYPE_DATETIME: {
+            DateTimeValue value;
+            value.from_date_str(iterator->GetString(), 
iterator->GetStringLength());
+            *val = 
reinterpret_cast<AnyVal*>(context->allocate(sizeof(DateTimeVal)));
+            new (*val) DateTimeVal();
+            value.to_datetime_val(static_cast<DateTimeVal*>(*val));
+            break;
+        }
+        case TYPE_DECIMALV2: {
+            *val = 
reinterpret_cast<AnyVal*>(context->allocate(sizeof(DecimalV2Val)));
+            new (*val) DecimalV2Val();
+
+            if (iterator->IsNumber()) {
+                if (iterator->IsInt() || iterator->IsUint() || 
iterator->IsInt64()) {
+                    DecimalV2Value(iterator->GetInt64(), 0)
+                            .to_decimal_val(static_cast<DecimalV2Val*>(*val));
+                } else if (iterator->IsUint64()) {
+                    DecimalV2Value(iterator->GetUint64(), 0)

Review Comment:
   Why not use GetUint64 for IsUint?



-- 
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-unsubscr...@doris.apache.org

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


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

Reply via email to