morningman commented on a change in pull request #5980:
URL: https://github.com/apache/incubator-doris/pull/5980#discussion_r653178455



##########
File path: fe/fe-core/src/main/java/org/apache/doris/analysis/ColumnDef.java
##########
@@ -206,6 +206,12 @@ public void analyze(boolean isOlap) throws 
AnalysisException {
             defaultValue = DefaultValue.BITMAP_EMPTY_DEFAULT_VALUE;
         }
 
+        if (type.getPrimitiveType() == PrimitiveType.ARRAY) {
+            if (defaultValue.isSet && defaultValue != 
DefaultValue.NULL_DEFAULT_VALUE) {
+                throw new AnalysisException("Array type column default value 
just support null");

Review comment:
       ```suggestion
                   throw new AnalysisException("Array type column default value 
only support null");
   ```

##########
File path: be/src/exprs/expr_context.cpp
##########
@@ -373,10 +373,19 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) {
         _result.decimalv2_val = DecimalV2Value::from_decimal_val(v);
         return &_result.decimalv2_val;
     }
+    case TYPE_ARRAY: {
+        doris_udf::CollectionVal v = e->get_array_val(this, row);
+        if (v.is_null) {
+            return NULL;
+        }
+
+        _result.array_val = CollectionValue::from_collection_val(v);
+        return &_result.array_val;
+    }
 #if 0
     case TYPE_ARRAY:

Review comment:
       Remove this

##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Table.java
##########
@@ -294,6 +296,7 @@ public void write(DataOutput out) throws IOException {
         int columnCount = fullSchema.size();
         out.writeInt(columnCount);
         for (Column column : fullSchema) {
+            String json = GsonUtils.GSON.toJson(column);

Review comment:
       seems not used?




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