freesinger commented on code in PR #10322:
URL: https://github.com/apache/doris/pull/10322#discussion_r928228269


##########
be/src/vec/exprs/vliteral.cpp:
##########
@@ -118,6 +120,13 @@ void VLiteral::init(const TExprNode& node) {
             field = node.string_literal.value;
             break;
         }
+        case TYPE_JSON: {
+            DCHECK_EQ(node.node_type, TExprNodeType::JSON_LITERAL);
+            DCHECK(node.__isset.json_literal);
+            JsonValue value(node.json_literal.value);

Review Comment:
   I do considered sole class `JsonField` is enough here,  but I think it's 
better to keep `JsonValue` and `JsonField` two different concepts, for that 
   - `to_string` functions is needed in `JsonValue` and used in 
`VLiteral::debug_string()`
   - `JsonField` is in memory representation of `JsonValue`, they have 
different semantics in logic
   -  Consistence with implementation such as `Decimal` is good, which seems 
better for me



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