This is an automated email from the ASF dual-hosted git repository.
cambyzju pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new e000330e616 [fix](short circurt) fix return default value issue
(#34186)
e000330e616 is described below
commit e000330e616c4a4c2313be48b95c43f7e4a113ad
Author: lw112 <[email protected]>
AuthorDate: Wed May 29 20:10:50 2024 +0800
[fix](short circurt) fix return default value issue (#34186)
---
.../vec/data_types/serde/data_type_nullable_serde.cpp | 10 +++++-----
.../test_compaction_uniq_keys_row_store.out | 8 ++++----
.../insert_into_table/partial_update_seq_col.out | Bin 1412 -> 1416 bytes
regression-test/data/point_query_p0/test_rowstore.out | 6 ++++++
.../test_partial_update_insert_seq_col.out | Bin 1412 -> 1416 bytes
.../partial_update/test_partial_update_seq_col.out | Bin 1411 -> 1415 bytes
.../test_partial_update_seq_col_delete.out | Bin 1526 -> 1530 bytes
.../suites/point_query_p0/test_rowstore.groovy | 9 +++++++++
8 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/be/src/vec/data_types/serde/data_type_nullable_serde.cpp
b/be/src/vec/data_types/serde/data_type_nullable_serde.cpp
index 43ee1dce5d9..254c3d74ab4 100644
--- a/be/src/vec/data_types/serde/data_type_nullable_serde.cpp
+++ b/be/src/vec/data_types/serde/data_type_nullable_serde.cpp
@@ -238,13 +238,13 @@ void DataTypeNullableSerDe::write_one_cell_to_jsonb(const
IColumn& column, Jsonb
Arena* mem_pool, int32_t
col_id,
int row_num) const {
auto& nullable_col = assert_cast<const ColumnNullable&>(column);
+ result.writeKey(col_id);
if (nullable_col.is_null_at(row_num)) {
- // do not insert to jsonb
- return;
+ result.writeNull();
+ } else {
+
nested_serde->write_one_cell_to_jsonb(nullable_col.get_nested_column(), result,
mem_pool,
+ col_id, row_num);
}
- result.writeKey(col_id);
- nested_serde->write_one_cell_to_jsonb(nullable_col.get_nested_column(),
result, mem_pool,
- col_id, row_num);
}
void DataTypeNullableSerDe::read_one_cell_from_jsonb(IColumn& column, const
JsonbValue* arg) const {
diff --git
a/regression-test/data/compaction/test_compaction_uniq_keys_row_store.out
b/regression-test/data/compaction/test_compaction_uniq_keys_row_store.out
index cedf0dbe9bd..7c163c62d33 100644
--- a/regression-test/data/compaction/test_compaction_uniq_keys_row_store.out
+++ b/regression-test/data/compaction/test_compaction_uniq_keys_row_store.out
@@ -18,10 +18,10 @@
3 2017-10-01 2017-10-01 2017-10-01T11:11:11.026
2017-10-01T11:11:11.016 Beijing 10 1 2020-01-04T00:00
2020-01-04T00:00 2017-10-01T11:11:11.110 2017-10-01T11:11:11.150111
2020-01-04T00:00 1 33 21
-- !point_select --
-3 2017-10-01 2017-10-01 2017-10-01T11:11:11.027
2017-10-01T11:11:11.017 Beijing 10 1 1970-01-01T00:00
1970-01-01T00:00 1970-01-01T00:00:00.111 1970-01-01T00:00
2020-01-05T00:00 1 34 20
+3 2017-10-01 2017-10-01 2017-10-01T11:11:11.027
2017-10-01T11:11:11.017 Beijing 10 1 \N \N \N \N
2020-01-05T00:00 1 34 20
-- !point_select --
-4 2017-10-01 2017-10-01 2017-10-01T11:11:11.028
2017-10-01T11:11:11.018 Beijing 10 1 1970-01-01T00:00
1970-01-01T00:00 1970-01-01T00:00:00.111 1970-01-01T00:00
2020-01-05T00:00 1 34 20
+4 2017-10-01 2017-10-01 2017-10-01T11:11:11.028
2017-10-01T11:11:11.018 Beijing 10 1 \N \N \N \N
2020-01-05T00:00 1 34 20
-- !point_select --
1 2017-10-01 2017-10-01 2017-10-01T11:11:11.021
2017-10-01T11:11:11.011 Beijing 10 1 2020-01-01T00:00
2020-01-01T00:00 2017-10-01T11:11:11.170 2017-10-01T11:11:11.110111
2020-01-01T00:00 1 30 20
@@ -42,8 +42,8 @@
3 2017-10-01 2017-10-01 2017-10-01T11:11:11.026
2017-10-01T11:11:11.016 Beijing 10 1 2020-01-04T00:00
2020-01-04T00:00 2017-10-01T11:11:11.110 2017-10-01T11:11:11.150111
2020-01-04T00:00 1 33 21
-- !point_select --
-3 2017-10-01 2017-10-01 2017-10-01T11:11:11.027
2017-10-01T11:11:11.017 Beijing 10 1 1970-01-01T00:00
1970-01-01T00:00 1970-01-01T00:00:00.111 1970-01-01T00:00
2020-01-05T00:00 1 34 20
+3 2017-10-01 2017-10-01 2017-10-01T11:11:11.027
2017-10-01T11:11:11.017 Beijing 10 1 \N \N \N \N
2020-01-05T00:00 1 34 20
-- !point_select --
-4 2017-10-01 2017-10-01 2017-10-01T11:11:11.028
2017-10-01T11:11:11.018 Beijing 10 1 1970-01-01T00:00
1970-01-01T00:00 1970-01-01T00:00:00.111 1970-01-01T00:00
2020-01-05T00:00 1 34 20
+4 2017-10-01 2017-10-01 2017-10-01T11:11:11.028
2017-10-01T11:11:11.018 Beijing 10 1 \N \N \N \N
2020-01-05T00:00 1 34 20
diff --git
a/regression-test/data/nereids_p0/insert_into_table/partial_update_seq_col.out
b/regression-test/data/nereids_p0/insert_into_table/partial_update_seq_col.out
index e836839c72b..269eab9708f 100644
Binary files
a/regression-test/data/nereids_p0/insert_into_table/partial_update_seq_col.out
and
b/regression-test/data/nereids_p0/insert_into_table/partial_update_seq_col.out
differ
diff --git a/regression-test/data/point_query_p0/test_rowstore.out
b/regression-test/data/point_query_p0/test_rowstore.out
index b50caf238c3..8675c7e9d8f 100644
--- a/regression-test/data/point_query_p0/test_rowstore.out
+++ b/regression-test/data/point_query_p0/test_rowstore.out
@@ -5,3 +5,9 @@
-- !sql --
1 abc 1111919.123456789190000000 123
+-- !sql --
+1 abc 1111919.123456789190000000 123 1970-01-01T00:00:00.111
+
+-- !sql --
+2 def 1111919.123456789190000000 456 \N
+
diff --git
a/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_insert_seq_col.out
b/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_insert_seq_col.out
index e836839c72b..269eab9708f 100644
Binary files
a/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_insert_seq_col.out
and
b/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_insert_seq_col.out
differ
diff --git
a/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_seq_col.out
b/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_seq_col.out
index f4dde3a0f7a..b1153b70d66 100644
Binary files
a/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_seq_col.out
and
b/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_seq_col.out
differ
diff --git
a/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_seq_col_delete.out
b/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_seq_col_delete.out
index fe5746c41b7..afa7ccfc9bb 100644
Binary files
a/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_seq_col_delete.out
and
b/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_seq_col_delete.out
differ
diff --git a/regression-test/suites/point_query_p0/test_rowstore.groovy
b/regression-test/suites/point_query_p0/test_rowstore.groovy
index 7838df2dd5a..61b8d378ce9 100644
--- a/regression-test/suites/point_query_p0/test_rowstore.groovy
+++ b/regression-test/suites/point_query_p0/test_rowstore.groovy
@@ -48,4 +48,13 @@ suite("test_rowstore", "p0") {
ALTER table ${tableName} ADD COLUMN new_column1 INT default "123";
"""
qt_sql """select * from ${tableName} where k1 = 1"""
+
+ sql """
+ ALTER table ${tableName} ADD COLUMN new_column2 DATETIMEV2(3) DEFAULT
"1970-01-01 00:00:00.111";
+ """
+ sleep(1000)
+ qt_sql """select * from ${tableName} where k1 = 1"""
+
+ sql """insert into ${tableName} values (2, 'def', 1111919.12345678919,
456, NULL)"""
+ qt_sql """select * from ${tableName} where k1 = 2"""
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]