xiaokang commented on code in PR #25230:
URL: https://github.com/apache/doris/pull/25230#discussion_r1353981226
##########
regression-test/suites/point_query_p0/test_point_query.groovy:
##########
@@ -188,10 +188,10 @@ suite("test_point_query") {
qe_point_select stmt
qe_point_select stmt
- // sql """
- // ALTER table ${tableName} ADD COLUMN new_column1 INT default "0";
- // """
- // qe_point_select stmt
+ sql """
+ ALTER table ${tableName} ADD COLUMN new_column1 INT default "0";
Review Comment:
why delete this SQL
##########
be/src/vec/jsonb/serialize.cpp:
##########
@@ -98,11 +102,20 @@ void JsonbSerializeUtil::jsonb_to_block(const
DataTypeSerDeSPtrs& serdes, const
}
if (filled_columns < dst.columns()) {
// fill missing slot
- for (auto& column_type_name : dst) {
+ for (int i = 0; i < dst.columns(); ++i) {
+ const auto& column_type_name = dst.get_by_position(i);
MutableColumnPtr col = column_type_name.column->assume_mutable();
if (col->size() < num_rows + 1) {
DCHECK(col->size() == num_rows);
- col->insert_default();
+ if (default_values[i].empty()) {
+ col->insert_default();
+ } else {
+ // col->insert_default();
+ ReadBuffer value(
+ reinterpret_cast<const unsigned
char*>(default_values[i].data()),
+ default_values[i].size());
+
static_cast<void>(column_type_name.type->from_string(value, col.get()));
Review Comment:
I remember that from_string is deprecated by amorynan.
##########
gensrc/thrift/Descriptors.thrift:
##########
@@ -62,6 +62,7 @@ struct TSlotDescriptor {
14: optional bool is_auto_increment = false;
// subcolumn path info list for semi structure column(variant)
15: optional list<string> column_paths
+ 16: optional string col_default_value
Review Comment:
Will it conflict with variant fields?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]