cambyzju commented on code in PR #9582: URL: https://github.com/apache/incubator-doris/pull/9582#discussion_r873300713
########## be/src/vec/exprs/vliteral.cpp: ########## @@ -109,8 +109,33 @@ void VLiteral::init(const TExprNode& node) { case TYPE_DECIMALV2: { DCHECK_EQ(node.node_type, TExprNodeType::DECIMAL_LITERAL); DCHECK(node.__isset.decimal_literal); - DecimalV2Value value(node.decimal_literal.value); - field = DecimalField<Decimal128>(value.value(), value.scale()); + if (config::enable_engine_decimalv3) { + DataTypePtr type_ptr = create_decimal(node.type.types[0].scalar_type.precision, + node.type.types[0].scalar_type.scale); + WhichDataType which(type_ptr->get_type_id()); Review Comment: WhichDataType(const DataTypePtr& data_type) support DataTypePtr as input argument. -- 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