You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/07/25 10:13:56 UTC
[doris] branch master updated: [RegressionTest][Array] Fix the bug of regression of array test: (#11173)
This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 a9fc078b55 [RegressionTest][Array] Fix the bug of regression of array test: (#11173)
a9fc078b55 is described below
commit a9fc078b552ec64c0d7f03c277885c1a0e1a0a26
Author: HappenLee <ha...@hotmail.com>
AuthorDate: Mon Jul 25 18:13:49 2022 +0800
[RegressionTest][Array] Fix the bug of regression of array test: (#11173)
1. [] do not have a proper array nested type, cause BE coredump
2. [abc] or ['abc'] load by vectorized load get error result
Co-authored-by: lihaopeng <li...@baidu.com>
---
be/src/vec/data_types/data_type_array.cpp | 7 +++++++
fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/be/src/vec/data_types/data_type_array.cpp b/be/src/vec/data_types/data_type_array.cpp
index 4c459ed4b8..c2ba3b2ec1 100644
--- a/be/src/vec/data_types/data_type_array.cpp
+++ b/be/src/vec/data_types/data_type_array.cpp
@@ -168,7 +168,14 @@ Status DataTypeArray::from_string(ReadBuffer& rb, IColumn* column) const {
temp_char = rb.position() + nested_str_len;
}
+ // dispose the case of ["123"] or ['123']
ReadBuffer read_buffer(rb.position(), nested_str_len);
+ auto begin_char = *rb.position();
+ auto end_char = *(rb.position() + nested_str_len - 1);
+ if (begin_char == end_char && (begin_char == '"' || begin_char == '\'')) {
+ read_buffer = ReadBuffer(rb.position() + 1, nested_str_len - 2);
+ }
+
auto st = nested->from_string(read_buffer, &nested_column);
if (!st.ok()) {
// we should do revert if error
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
index f5a3e9a1cd..ecf7ac5350 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
@@ -149,8 +149,8 @@ public abstract class Type {
supportedTypes.add(QUANTILE_STATE);
arraySubTypes = Lists.newArrayList();
- arraySubTypes.addAll(integerTypes);
arraySubTypes.add(BOOLEAN);
+ arraySubTypes.addAll(integerTypes);
arraySubTypes.add(FLOAT);
arraySubTypes.add(DOUBLE);
arraySubTypes.add(DECIMALV2);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org