You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/12/14 05:58:56 UTC

[doris] branch branch-1.2-lts updated (c99d35a49b -> b970188b5f)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a change to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


    from c99d35a49b [Enhancement](profile)  enhance column predicates display on profile (#14664)
     new 06d02b29d3 [Bug](predicate) fix ccore dump on varchar with in list predicate (#14881)
     new 9768a4d52e [fix](schemachange) fix the schema change that causes the be core dump. (#14804)
     new 569e6ed57e [fix](aggregate) agg table and unique table get different result when… (#14822)
     new 45e5fa0db8 [Improvement](multi-catalog) add show create catalog stmt (#14938)
     new 1fd9e552c9 [Bug](predicate) fix undefined behavior on in list predicate #14961
     new ed597bae3b [Bugfix](Jsonb) fix jsonb load in unique key model (#14958)
     new 449006808c [fix](statistics) fix CpuTimeMS in audit log when enable_vectorized_engine=true. (#14853)
     new 3b28fbcd8d [Exec](Profile) Register to Fetch Result time and Write Result time in FE to debug (#14832)
     new 0a54885a7c [Improvement](multi catalog)Add comment to external hms table show create table output. (#14861)
     new f9fa2d4f2e [fix](csv-reader) fix be crash when reading invalid value (#14951)
     new f0c6f7bb14 [fix](fe-meta) NPE in DataProperty when upgrading to 1.2.x (#14976)
     new b970188b5f [Bug](DictoryColumn) reverse the _codes.size() replace _reserve_size (#14984)

The 12 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 be/src/exec/text_converter.hpp                     | 10 ++-
 be/src/olap/bitmap_filter_predicate.h              |  3 +-
 be/src/olap/bloom_filter_predicate.h               |  8 ++-
 be/src/olap/comparison_predicate.h                 | 15 +++--
 be/src/olap/generic_iterators.cpp                  | 13 ++--
 be/src/olap/in_list_predicate.h                    | 14 ++--
 be/src/runtime/primitive_type.h                    |  3 +
 be/src/vec/columns/column_dictionary.h             |  7 +-
 be/src/vec/core/block.cpp                          | 12 ++++
 be/src/vec/core/block.h                            |  2 +
 be/src/vec/exec/scan/new_olap_scan_node.cpp        |  1 +
 be/src/vec/exec/scan/scanner_scheduler.cpp         |  6 +-
 be/src/vec/exec/scan/vscan_node.cpp                |  1 +
 be/src/vec/exec/scan/vscan_node.h                  |  1 +
 be/src/vec/exec/scan/vscanner.cpp                  |  1 +
 be/src/vec/exec/scan/vscanner.h                    | 10 +++
 be/src/vec/utils/template_helpers.hpp              |  4 +-
 .../Create/CREATE-CATALOG.md                       |  4 +-
 .../Show-Statements/SHOW-CREATE-CATALOG.md}        | 23 ++++---
 docs/sidebars.json                                 |  1 +
 .../Create/CREATE-CATALOG.md                       |  4 +-
 .../SHOW-CREATE-CATALOG.md}                        | 22 ++++---
 fe/fe-core/src/main/cup/sql_parser.cup             |  4 ++
 .../apache/doris/alter/SchemaChangeHandler.java    |  5 +-
 .../org/apache/doris/analysis/AddColumnClause.java | 15 ++++-
 .../apache/doris/analysis/AlterTableClause.java    |  6 ++
 .../org/apache/doris/analysis/AlterTableStmt.java  |  3 +
 .../apache/doris/analysis/ModifyColumnClause.java  | 15 ++++-
 ...reateDbStmt.java => ShowCreateCatalogStmt.java} | 46 ++++++-------
 .../org/apache/doris/catalog/DataProperty.java     | 12 +++-
 .../doris/catalog/HiveMetaStoreClientHelper.java   | 14 +++-
 .../doris/common/util/QueryPlannerProfile.java     | 30 ++++++++-
 .../org/apache/doris/datasource/CatalogMgr.java    | 28 ++++++++
 .../java/org/apache/doris/qe/ShowExecutor.java     | 11 ++++
 .../java/org/apache/doris/qe/StmtExecutor.java     |  8 +++
 .../apache/doris/alter/SchemaChangeJobV2Test.java  |  5 +-
 .../apache/doris/analysis/AddColumnClauseTest.java | 11 ++--
 .../doris/analysis/ModifyColumnClauseTest.java     |  5 +-
 .../apache/doris/datasource/CatalogMgrTest.java    | 27 ++++++++
 ...=> test_jsonb_load_unique_key_and_function.out} |  0
 .../data/jsonb_p0/test_jsonb_unique_key.csv        | 75 ++++++++++++++++++++++
 .../sql/sqlsmith01.out}                            |  3 +-
 ...test_jsonb_load_unique_key_and_function.groovy} | 20 +++---
 .../test_agg_keys_schema_change.groovy             | 22 +++++++
 .../suites/tpcds_sf1_unique_p1/sql/sqlsmith01.sql  |  1 +
 45 files changed, 416 insertions(+), 115 deletions(-)
 copy docs/{zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Drop/DROP-CATALOG.md => en/docs/sql-manual/sql-reference/Show-Statements/SHOW-CREATE-CATALOG.md} (70%)
 copy docs/zh-CN/docs/sql-manual/sql-reference/{Data-Definition-Statements/Drop/DROP-CATALOG.md => Show-Statements/SHOW-CREATE-CATALOG.md} (73%)
 copy fe/fe-core/src/main/java/org/apache/doris/analysis/{ShowCreateDbStmt.java => ShowCreateCatalogStmt.java} (58%)
 copy regression-test/data/jsonb_p0/{test_jsonb_load_and_function.out => test_jsonb_load_unique_key_and_function.out} (100%)
 create mode 100644 regression-test/data/jsonb_p0/test_jsonb_unique_key.csv
 copy regression-test/data/{correctness/test_crossjoin_inlineview_slot.out => tpcds_sf1_unique_p1/sql/sqlsmith01.out} (84%)
 copy regression-test/suites/jsonb_p0/{test_jsonb_load_and_function.groovy => test_jsonb_load_unique_key_and_function.groovy} (97%)
 create mode 100644 regression-test/suites/tpcds_sf1_unique_p1/sql/sqlsmith01.sql


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 10/12: [fix](csv-reader) fix be crash when reading invalid value (#14951)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit f9fa2d4f2e8448e6fe2b945a651ef7611c0f27e7
Author: Mingyu Chen <mo...@163.com>
AuthorDate: Sat Dec 10 18:45:47 2022 +0800

    [fix](csv-reader) fix be crash when reading invalid value (#14951)
---
 be/src/exec/text_converter.hpp | 10 ++++++++--
 be/src/vec/core/block.cpp      | 12 ++++++++++++
 be/src/vec/core/block.h        |  2 ++
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/be/src/exec/text_converter.hpp b/be/src/exec/text_converter.hpp
index 45a7a4e570..55aee22d0a 100644
--- a/be/src/exec/text_converter.hpp
+++ b/be/src/exec/text_converter.hpp
@@ -205,6 +205,7 @@ inline bool TextConverter::write_vec_column(const SlotDescriptor* slot_desc,
         }
     }
 
+    bool insert_after_parse_failure = true;
     StringParser::ParseResult parse_result = StringParser::PARSE_SUCCESS;
     // Parse the raw-text data. Translate the text string to internal format.
     switch (slot_desc->type().type) {
@@ -271,6 +272,7 @@ inline bool TextConverter::write_vec_column(const SlotDescriptor* slot_desc,
         vectorized::VecDateTimeValue ts_slot;
         if (!ts_slot.from_date_str(data, len)) {
             parse_result = StringParser::PARSE_FAILURE;
+            insert_after_parse_failure = false;
             break;
         }
         ts_slot.cast_to_date();
@@ -283,6 +285,7 @@ inline bool TextConverter::write_vec_column(const SlotDescriptor* slot_desc,
         vectorized::VecDateTimeValue ts_slot;
         if (!ts_slot.from_date_str(data, len)) {
             parse_result = StringParser::PARSE_FAILURE;
+            insert_after_parse_failure = false;
             break;
         }
         ts_slot.to_datetime();
@@ -295,6 +298,7 @@ inline bool TextConverter::write_vec_column(const SlotDescriptor* slot_desc,
         DecimalV2Value decimal_slot;
         if (decimal_slot.parse_from_str(data, len)) {
             parse_result = StringParser::PARSE_FAILURE;
+            insert_after_parse_failure = false;
             break;
         }
         reinterpret_cast<vectorized::ColumnVector<vectorized::Int128>*>(col_ptr)->insert_value(
@@ -308,12 +312,14 @@ inline bool TextConverter::write_vec_column(const SlotDescriptor* slot_desc,
     }
 
     if (UNLIKELY(parse_result == StringParser::PARSE_FAILURE)) {
-        if (true == slot_desc->is_nullable()) {
+        if (slot_desc->is_nullable()) {
             auto* nullable_column = reinterpret_cast<vectorized::ColumnNullable*>(nullable_col_ptr);
             size_t size = nullable_column->get_null_map_data().size();
             doris::vectorized::NullMap& null_map_data = nullable_column->get_null_map_data();
             null_map_data[size - 1] = 1;
-            nullable_column->get_nested_column().insert_default();
+            if (!insert_after_parse_failure) {
+                nullable_column->get_nested_column().insert_default();
+            }
         }
         return false;
     }
diff --git a/be/src/vec/core/block.cpp b/be/src/vec/core/block.cpp
index 3cdadd5bdc..6e74ac1e95 100644
--- a/be/src/vec/core/block.cpp
+++ b/be/src/vec/core/block.cpp
@@ -320,6 +320,18 @@ size_t Block::rows() const {
     return 0;
 }
 
+std::string Block::each_col_size() {
+    std::stringstream ss;
+    for (const auto& elem : data) {
+        if (elem.column) {
+            ss << elem.column->size() << " | ";
+        } else {
+            ss << "-1 | ";
+        }
+    }
+    return ss.str();
+}
+
 void Block::set_num_rows(size_t length) {
     if (rows() > length) {
         for (auto& elem : data) {
diff --git a/be/src/vec/core/block.h b/be/src/vec/core/block.h
index 93d9cabaab..6b7cc9d5a1 100644
--- a/be/src/vec/core/block.h
+++ b/be/src/vec/core/block.h
@@ -180,6 +180,8 @@ public:
     /// Returns number of rows from first column in block, not equal to nullptr. If no columns, returns 0.
     size_t rows() const;
 
+    std::string each_col_size();
+
     // Cut the rows in block, use in LIMIT operation
     void set_num_rows(size_t length);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 12/12: [Bug](DictoryColumn) reverse the _codes.size() replace _reserve_size (#14984)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit b970188b5f48eb4a43889977364984dc3f83a0a3
Author: HappenLee <ha...@hotmail.com>
AuthorDate: Sun Dec 11 18:25:18 2022 +0800

    [Bug](DictoryColumn) reverse the _codes.size() replace _reserve_size (#14984)
---
 be/src/vec/columns/column_dictionary.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/be/src/vec/columns/column_dictionary.h b/be/src/vec/columns/column_dictionary.h
index 97a2b5c98f..729957946f 100644
--- a/be/src/vec/columns/column_dictionary.h
+++ b/be/src/vec/columns/column_dictionary.h
@@ -111,10 +111,7 @@ public:
         LOG(FATAL) << "get_permutation not supported in ColumnDictionary";
     }
 
-    void reserve(size_t n) override {
-        _reserve_size = n;
-        _codes.reserve(n);
-    }
+    void reserve(size_t n) override { _codes.reserve(n); }
 
     const char* get_family_name() const override { return "ColumnDictionary"; }
 
@@ -279,7 +276,7 @@ public:
             convert_dict_codes_if_necessary();
         }
         auto res = vectorized::PredicateColumnType<TYPE_STRING>::create();
-        res->reserve(_reserve_size);
+        res->reserve(_codes.size());
         for (size_t i = 0; i < _codes.size(); ++i) {
             auto& code = reinterpret_cast<T&>(_codes[i]);
             auto value = _dict.get_value(code);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 06/12: [Bugfix](Jsonb) fix jsonb load in unique key model (#14958)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit ed597bae3b63ac57032a774c02b1814efd1d00b6
Author: lihangyu <15...@163.com>
AuthorDate: Fri Dec 9 21:10:14 2022 +0800

    [Bugfix](Jsonb) fix jsonb load in unique key model (#14958)
    
    * [Bugfix](Jsonb) fix jsonb load in unique key model
    
    Register JSONB to `replace_load` agg function
    
    * fix test
---
 be/src/vec/utils/template_helpers.hpp              |    4 +-
 .../test_jsonb_load_unique_key_and_function.out    | 3946 ++++++++++++++++++++
 .../data/jsonb_p0/test_jsonb_unique_key.csv        |   75 +
 .../test_jsonb_load_unique_key_and_function.groovy |  397 ++
 4 files changed, 4421 insertions(+), 1 deletion(-)

diff --git a/be/src/vec/utils/template_helpers.hpp b/be/src/vec/utils/template_helpers.hpp
index b67f28f3dd..265f74d53d 100644
--- a/be/src/vec/utils/template_helpers.hpp
+++ b/be/src/vec/utils/template_helpers.hpp
@@ -43,7 +43,9 @@
     M(Decimal128, ColumnDecimal<Decimal128>) \
     M(Decimal128I, ColumnDecimal<Decimal128I>)
 
-#define STRING_TYPE_TO_COLUMN_TYPE(M) M(String, ColumnString)
+#define STRING_TYPE_TO_COLUMN_TYPE(M) \
+    M(String, ColumnString)           \
+    M(JSONB, ColumnString)
 
 #define TIME_TYPE_TO_COLUMN_TYPE(M) \
     M(Date, ColumnInt64)            \
diff --git a/regression-test/data/jsonb_p0/test_jsonb_load_unique_key_and_function.out b/regression-test/data/jsonb_p0/test_jsonb_load_unique_key_and_function.out
new file mode 100644
index 0000000000..d834c24dcd
--- /dev/null
+++ b/regression-test/data/jsonb_p0/test_jsonb_load_unique_key_and_function.out
@@ -0,0 +1,3946 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !select --
+1	\N
+2	null
+3	true
+4	false
+5	100
+6	10000
+7	1000000000
+8	1152921504606846976
+9	6.18
+10	"abcd"
+11	{}
+12	{"k1":"v31","k2":300}
+13	[]
+14	[123,456]
+15	["abc","def"]
+16	[null,true,false,100,6.18,"abc"]
+17	[{"k1":"v41","k2":400},1,"a",3.14]
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}
+
+-- !select --
+1	\N
+2	null
+3	true
+4	false
+5	100
+6	10000
+7	1000000000
+8	1152921504606846976
+9	6.18
+10	"abcd"
+11	{}
+12	{"k1":"v31","k2":300}
+13	[]
+14	[123,456]
+15	["abc","def"]
+16	[null,true,false,100,6.18,"abc"]
+17	[{"k1":"v41","k2":400},1,"a",3.14]
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}
+26	\N
+27	{"k1":"v1","k2":200}
+
+-- !select --
+1	\N	\N
+2	null	null
+3	true	true
+4	false	false
+5	100	100
+6	10000	10000
+7	1000000000	1000000000
+8	1152921504606846976	1152921504606846976
+9	6.18	6.18
+10	"abcd"	"abcd"
+11	{}	{}
+12	{"k1":"v31","k2":300}	{"k1":"v31","k2":300}
+13	[]	[]
+14	[123,456]	[123,456]
+15	["abc","def"]	["abc","def"]
+16	[null,true,false,100,6.18,"abc"]	[null,true,false,100,6.18,"abc"]
+17	[{"k1":"v41","k2":400},1,"a",3.14]	[{"k1":"v41","k2":400},1,"a",3.14]
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}
+26	\N	\N
+27	{"k1":"v1","k2":200}	{"k1":"v1","k2":200}
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	"v31"
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	"v31"
+26	\N	\N
+27	{"k1":"v1","k2":200}	"v1"
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	300
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	300
+26	\N	\N
+27	{"k1":"v1","k2":200}	200
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	123
+15	["abc","def"]	"abc"
+16	[null,true,false,100,6.18,"abc"]	null
+17	[{"k1":"v41","k2":400},1,"a",3.14]	{"k1":"v41","k2":400}
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	456
+15	["abc","def"]	"def"
+16	[null,true,false,100,6.18,"abc"]	true
+17	[{"k1":"v41","k2":400},1,"a",3.14]	1
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	"a"
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	100
+17	[{"k1":"v41","k2":400},1,"a",3.14]	3.14
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	6.18
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	"abc"
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	[{"k1":"v41","k2":400},1,"a",3.14]
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	{"k1":"v41","k2":400}
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	1
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	"a"
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	3.14
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	null
+3	true	true
+4	false	false
+5	100	100
+6	10000	10000
+7	1000000000	1000000000
+8	1152921504606846976	1152921504606846976
+9	6.18	6.18
+10	"abcd"	abcd
+11	{}	{}
+12	{"k1":"v31","k2":300}	{"k1":"v31","k2":300}
+13	[]	[]
+14	[123,456]	[123,456]
+15	["abc","def"]	["abc","def"]
+16	[null,true,false,100,6.18,"abc"]	[null,true,false,100,6.18,"abc"]
+17	[{"k1":"v41","k2":400},1,"a",3.14]	[{"k1":"v41","k2":400},1,"a",3.14]
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}
+26	\N	\N
+27	{"k1":"v1","k2":200}	{"k1":"v1","k2":200}
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	v31
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	v31
+26	\N	\N
+27	{"k1":"v1","k2":200}	v1
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	300
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	300
+26	\N	\N
+27	{"k1":"v1","k2":200}	200
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	123
+15	["abc","def"]	abc
+16	[null,true,false,100,6.18,"abc"]	null
+17	[{"k1":"v41","k2":400},1,"a",3.14]	{"k1":"v41","k2":400}
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	456
+15	["abc","def"]	def
+16	[null,true,false,100,6.18,"abc"]	true
+17	[{"k1":"v41","k2":400},1,"a",3.14]	1
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	a
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	100
+17	[{"k1":"v41","k2":400},1,"a",3.14]	3.14
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	6.18
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	abc
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	[{"k1":"v41","k2":400},1,"a",3.14]
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	{"k1":"v41","k2":400}
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	1
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	a
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	3.14
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	100
+6	10000	10000
+7	1000000000	1000000000
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	300
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	300
+26	\N	\N
+27	{"k1":"v1","k2":200}	200
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	123
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	456
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	1
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	100
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	1
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	100
+6	10000	10000
+7	1000000000	1000000000
+8	1152921504606846976	1152921504606846976
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	300
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	300
+26	\N	\N
+27	{"k1":"v1","k2":200}	200
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	123
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	456
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	1
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	100
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	1
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	100.0
+6	10000	10000.0
+7	1000000000	1.0E9
+8	1152921504606846976	1.15292150460684698E18
+9	6.18	6.18
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	300.0
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	300.0
+26	\N	\N
+27	{"k1":"v1","k2":200}	200.0
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	123.0
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	456.0
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	1.0
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	100.0
+17	[{"k1":"v41","k2":400},1,"a",3.14]	3.14
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	6.18
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	1.0
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	3.14
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	true
+4	false	false
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	true
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	true
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	false
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	false
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	true
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	true
+3	true	true
+4	false	true
+5	100	true
+6	10000	true
+7	1000000000	true
+8	1152921504606846976	true
+9	6.18	true
+10	"abcd"	true
+11	{}	true
+12	{"k1":"v31","k2":300}	true
+13	[]	true
+14	[123,456]	true
+15	["abc","def"]	true
+16	[null,true,false,100,6.18,"abc"]	true
+17	[{"k1":"v41","k2":400},1,"a",3.14]	true
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	true
+26	\N	\N
+27	{"k1":"v1","k2":200}	true
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	true
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	true
+26	\N	\N
+27	{"k1":"v1","k2":200}	true
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	true
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	true
+26	\N	\N
+27	{"k1":"v1","k2":200}	true
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	true
+15	["abc","def"]	true
+16	[null,true,false,100,6.18,"abc"]	true
+17	[{"k1":"v41","k2":400},1,"a",3.14]	true
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	true
+15	["abc","def"]	true
+16	[null,true,false,100,6.18,"abc"]	true
+17	[{"k1":"v41","k2":400},1,"a",3.14]	true
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	true
+17	[{"k1":"v41","k2":400},1,"a",3.14]	true
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	true
+17	[{"k1":"v41","k2":400},1,"a",3.14]	true
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	true
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	true
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	true
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	true
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	true
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	true
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	true
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	false
+3	true	false
+4	false	false
+5	100	false
+6	10000	false
+7	1000000000	false
+8	1152921504606846976	false
+9	6.18	false
+10	"abcd"	false
+11	{}	false
+12	{"k1":"v31","k2":300}	false
+13	[]	false
+14	[123,456]	false
+15	["abc","def"]	false
+16	[null,true,false,100,6.18,"abc"]	false
+17	[{"k1":"v41","k2":400},1,"a",3.14]	false
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	false
+26	\N	\N
+27	{"k1":"v1","k2":200}	false
+
+-- !select --
+1	\N	\N
+2	null	null
+3	true	bool
+4	false	bool
+5	100	int
+6	10000	int
+7	1000000000	int
+8	1152921504606846976	bigint
+9	6.18	double
+10	"abcd"	string
+11	{}	object
+12	{"k1":"v31","k2":300}	object
+13	[]	array
+14	[123,456]	array
+15	["abc","def"]	array
+16	[null,true,false,100,6.18,"abc"]	array
+17	[{"k1":"v41","k2":400},1,"a",3.14]	array
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	object
+26	\N	\N
+27	{"k1":"v1","k2":200}	object
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	string
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	string
+26	\N	\N
+27	{"k1":"v1","k2":200}	string
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	int
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	int
+26	\N	\N
+27	{"k1":"v1","k2":200}	int
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	int
+15	["abc","def"]	string
+16	[null,true,false,100,6.18,"abc"]	null
+17	[{"k1":"v41","k2":400},1,"a",3.14]	object
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	int
+15	["abc","def"]	string
+16	[null,true,false,100,6.18,"abc"]	bool
+17	[{"k1":"v41","k2":400},1,"a",3.14]	int
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	bool
+17	[{"k1":"v41","k2":400},1,"a",3.14]	string
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	int
+17	[{"k1":"v41","k2":400},1,"a",3.14]	double
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	double
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	string
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	array
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	object
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	int
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	string
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	double
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	true
+4	false	false
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	100
+6	10000	10000
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	100
+6	10000	10000
+7	1000000000	1000000000
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	100
+6	10000	10000
+7	1000000000	1000000000
+8	1152921504606846976	1152921504606846976
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	100.0
+6	10000	10000.0
+7	1000000000	1.0E9
+8	1152921504606846976	1.15292150460684698E18
+9	6.18	6.18
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	null
+3	true	true
+4	false	false
+5	100	100
+6	10000	10000
+7	1000000000	1000000000
+8	1152921504606846976	1152921504606846976
+9	6.18	6.18
+10	"abcd"	"abcd"
+11	{}	{}
+12	{"k1":"v31","k2":300}	{"k1":"v31","k2":300}
+13	[]	[]
+14	[123,456]	[123,456]
+15	["abc","def"]	["abc","def"]
+16	[null,true,false,100,6.18,"abc"]	[null,true,false,100,6.18,"abc"]
+17	[{"k1":"v41","k2":400},1,"a",3.14]	[{"k1":"v41","k2":400},1,"a",3.14]
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}
+26	\N	\N
+27	{"k1":"v1","k2":200}	{"k1":"v1","k2":200}
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	true
+4	false	false
+5	100	\N
+6	10000	\N
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	100
+6	10000	10000
+7	1000000000	\N
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	100
+6	10000	10000
+7	1000000000	1000000000
+8	1152921504606846976	\N
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	100
+6	10000	10000
+7	1000000000	1000000000
+8	1152921504606846976	1152921504606846976
+9	6.18	\N
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	\N
+3	true	\N
+4	false	\N
+5	100	100
+6	10000	10000
+7	1000000000	1000000000
+8	1152921504606846976	1.15292150460685e+18
+9	6.18	6.18
+10	"abcd"	\N
+11	{}	\N
+12	{"k1":"v31","k2":300}	\N
+13	[]	\N
+14	[123,456]	\N
+15	["abc","def"]	\N
+16	[null,true,false,100,6.18,"abc"]	\N
+17	[{"k1":"v41","k2":400},1,"a",3.14]	\N
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	\N
+26	\N	\N
+27	{"k1":"v1","k2":200}	\N
+
+-- !select --
+1	\N	\N
+2	null	null
+3	true	true
+4	false	false
+5	100	100
+6	10000	10000
+7	1000000000	1000000000
+8	1152921504606846976	1152921504606846976
+9	6.18	6.18
+10	"abcd"	"abcd"
+11	{}	{}
+12	{"k1":"v31","k2":300}	{"k1":"v31","k2":300}
+13	[]	[]
+14	[123,456]	[123,456]
+15	["abc","def"]	["abc","def"]
+16	[null,true,false,100,6.18,"abc"]	[null,true,false,100,6.18,"abc"]
+17	[{"k1":"v41","k2":400},1,"a",3.14]	[{"k1":"v41","k2":400},1,"a",3.14]
+18	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}	{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}
+26	\N	\N
+27	{"k1":"v1","k2":200}	{"k1":"v1","k2":200}
+
+-- !select --
+\N
+
+-- !select --
+null
+
+-- !select --
+true
+
+-- !select --
+false
+
+-- !select --
+100
+
+-- !select --
+10000
+
+-- !select --
+1000000000
+
+-- !select --
+1152921504606846976
+
+-- !select --
+6.18
+
+-- !select --
+"abcd"
+
+-- !select --
+{}
+
+-- !select --
+{"k1":"v31","k2":300}
+
+-- !select --
+[]
+
+-- !select --
+[123,456]
+
+-- !select --
+["abc","def"]
+
+-- !select --
+[null,true,false,100,6.18,"abc"]
+
+-- !select --
+[{"k1":"v41","k2":400},1,"a",3.14]
+
+-- !select --
+{"k1":"v31","k2":300,"a1":[{"k1":"v41","k2":400},1,"a",3.14]}
+
+-- !select --
+\N
+
+-- !select --
+\N
+
+-- !select --
+\N
+
+-- !select --
+\N
+
+-- !select --
+\N
+
+-- !select --
+\N
+
+-- !select --
+\N
+
diff --git a/regression-test/data/jsonb_p0/test_jsonb_unique_key.csv b/regression-test/data/jsonb_p0/test_jsonb_unique_key.csv
new file mode 100644
index 0000000000..88cc692786
--- /dev/null
+++ b/regression-test/data/jsonb_p0/test_jsonb_unique_key.csv
@@ -0,0 +1,75 @@
+1	\N
+2	null
+3	true
+4	false
+5	100
+6	10000
+7	1000000000
+8	1152921504606846976
+9	6.18
+10	"abcd"
+11	{}
+12	{"k1":"v31", "k2": 300}
+13	[]
+14	[123, 456]
+15	["abc", "def"]
+16	[null, true, false, 100, 6.18, "abc"]
+17	[{"k1":"v41", "k2": 400}, 1, "a", 3.14]
+18	{"k1":"v31", "k2": 300, "a1": [{"k1":"v41", "k2": 400}, 1, "a", 3.14]}
+19	''
+20	'abc'
+21	abc
+22	100x
+23	6.a8
+24	{x
+25	[123, abc]
+1	\N
+2	null
+3	true
+4	false
+5	100
+6	10000
+7	1000000000
+8	1152921504606846976
+9	6.18
+10	"abcd"
+11	{}
+12	{"k1":"v31", "k2": 300}
+13	[]
+14	[123, 456]
+15	["abc", "def"]
+16	[null, true, false, 100, 6.18, "abc"]
+17	[{"k1":"v41", "k2": 400}, 1, "a", 3.14]
+18	{"k1":"v31", "k2": 300, "a1": [{"k1":"v41", "k2": 400}, 1, "a", 3.14]}
+19	''
+20	'abc'
+21	abc
+22	100x
+23	6.a8
+24	{x
+25	[123, abc]
+1	\N
+2	null
+3	true
+4	false
+5	100
+6	10000
+7	1000000000
+8	1152921504606846976
+9	6.18
+10	"abcd"
+11	{}
+12	{"k1":"v31", "k2": 300}
+13	[]
+14	[123, 456]
+15	["abc", "def"]
+16	[null, true, false, 100, 6.18, "abc"]
+17	[{"k1":"v41", "k2": 400}, 1, "a", 3.14]
+18	{"k1":"v31", "k2": 300, "a1": [{"k1":"v41", "k2": 400}, 1, "a", 3.14]}
+19	''
+20	'abc'
+21	abc
+22	100x
+23	6.a8
+24	{x
+25	[123, abc]
diff --git a/regression-test/suites/jsonb_p0/test_jsonb_load_unique_key_and_function.groovy b/regression-test/suites/jsonb_p0/test_jsonb_load_unique_key_and_function.groovy
new file mode 100644
index 0000000000..4c3bd82e83
--- /dev/null
+++ b/regression-test/suites/jsonb_p0/test_jsonb_load_unique_key_and_function.groovy
@@ -0,0 +1,397 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite("test_jsonb_unique_load_and_function", "p0") {
+    // define a sql table
+    def testTable = "tbl_test_jsonb_unique"
+    def dataFile = "test_jsonb_unique_key.csv"
+
+    sql """ set enable_vectorized_engine = true """
+
+    sql "DROP TABLE IF EXISTS ${testTable}"
+
+    sql """
+        CREATE TABLE IF NOT EXISTS ${testTable} (
+            id INT,
+            j JSONB
+        )
+        UNIQUE KEY(id)
+        DISTRIBUTED BY HASH(id) BUCKETS 10
+        PROPERTIES("replication_num" = "1");
+        """
+
+    // load the jsonb data from csv file
+    // fail by default for invalid data rows
+    streamLoad {
+        table testTable
+        
+        file dataFile // import csv file
+        time 10000 // limit inflight 10s
+
+        // if declared a check callback, the default check condition will ignore.
+        // So you must check all condition
+        check { result, exception, startTime, endTime ->
+            if (exception != null) {
+                throw exception
+            }
+            log.info("Stream load result: ${result}".toString())
+            def json = parseJson(result)
+            assertEquals("fail", json.Status.toLowerCase())
+            assertEquals("too many filtered rows", json.Message)
+            assertEquals(75, json.NumberTotalRows)
+            assertEquals(54, json.NumberLoadedRows)
+            assertEquals(21, json.NumberFilteredRows)
+            assertTrue(json.LoadBytes > 0)
+        }
+    }
+
+    // load the jsonb data from csv file
+    // success with header 'max_filter_ratio: 0.3'
+    streamLoad {
+        table testTable
+        
+        // set http request header params
+        set 'max_filter_ratio', '0.3'
+        file dataFile // import csv file
+        time 10000 // limit inflight 10s
+
+        // if declared a check callback, the default check condition will ignore.
+        // So you must check all condition
+        check { result, exception, startTime, endTime ->
+            if (exception != null) {
+                throw exception
+            }
+            log.info("Stream load result: ${result}".toString())
+            def json = parseJson(result)
+            assertEquals("success", json.Status.toLowerCase())
+            assertEquals(75, json.NumberTotalRows)
+            assertEquals(54, json.NumberLoadedRows)
+            assertEquals(21, json.NumberFilteredRows)
+            assertTrue(json.LoadBytes > 0)
+        }
+    }
+
+    // check result
+    qt_select "SELECT * FROM ${testTable} ORDER BY id"
+
+    // insert into valid json rows
+    sql """INSERT INTO ${testTable} VALUES(26, NULL)"""
+    sql """INSERT INTO ${testTable} VALUES(27, '{"k1":"v1", "k2": 200}')"""
+
+    // insert into invalid json rows with enable_insert_strict=true
+    // expect excepiton and no rows not changed
+    sql """ set enable_insert_strict = true """
+    success = true
+    try {
+        sql """INSERT INTO ${testTable} VALUES(26, '')"""
+    } catch(Exception ex) {
+       logger.info("""INSERT INTO ${testTable} invalid json failed: """ + ex)
+       success = false
+    }
+    assertEquals(false, success)
+    success = true
+    try {
+        sql """INSERT INTO ${testTable} VALUES(26, 'abc')"""
+    } catch(Exception ex) {
+       logger.info("""INSERT INTO ${testTable} invalid json failed: """ + ex)
+       success = false
+    }
+    assertEquals(false, success)
+
+    // insert into invalid json rows with enable_insert_strict=false
+    // expect no excepiton but no rows not changed
+    sql """ set enable_insert_strict = false """
+    success = true
+    try {
+        sql """INSERT INTO ${testTable} VALUES(26, '')"""
+    } catch(Exception ex) {
+       logger.info("""INSERT INTO ${testTable} invalid json failed: """ + ex)
+       success = false
+    }
+    assertEquals(true, success)
+    success = true
+    try {
+        sql """INSERT INTO ${testTable} VALUES(26, 'abc')"""
+    } catch(Exception ex) {
+       logger.info("""INSERT INTO ${testTable} invalid json failed: """ + ex)
+       success = false
+    }
+    assertEquals(true, success)
+
+    qt_select "SELECT * FROM ${testTable} ORDER BY id"
+
+    // jsonb_extract
+    qt_select "SELECT id, j, jsonb_extract(j, '\$') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract(j, '\$.k1') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract(j, '\$.k2') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract(j, '\$[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract(j, '\$[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract(j, '\$[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract(j, '\$[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract(j, '\$[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract(j, '\$[5]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract(j, '\$[6]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract(j, '\$[10]') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract(j, '\$.a1') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract(j, '\$.a1[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract(j, '\$.a1[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract(j, '\$.a1[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract(j, '\$.a1[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract(j, '\$.a1[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract(j, '\$.a1[10]') FROM ${testTable} ORDER BY id"
+
+    // jsonb_extract_string
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$.k1') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$.k2') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$[5]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$[6]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$[10]') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$.a1') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$.a1[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$.a1[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$.a1[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$.a1[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$.a1[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_string(j, '\$.a1[10]') FROM ${testTable} ORDER BY id"
+
+    // jsonb_extract_int
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$.k1') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$.k2') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$[5]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$[6]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$[10]') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$.a1') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$.a1[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$.a1[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$.a1[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$.a1[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$.a1[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_int(j, '\$.a1[10]') FROM ${testTable} ORDER BY id"
+
+    // jsonb_extract_bigint
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$.k1') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$.k2') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$[5]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$[6]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$[10]') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$.a1') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$.a1[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$.a1[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$.a1[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$.a1[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$.a1[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bigint(j, '\$.a1[10]') FROM ${testTable} ORDER BY id"
+
+
+    // jsonb_extract_double
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$.k1') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$.k2') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$[5]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$[6]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$[10]') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$.a1') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$.a1[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$.a1[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$.a1[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$.a1[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$.a1[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_double(j, '\$.a1[10]') FROM ${testTable} ORDER BY id"
+
+    // jsonb_extract_bool
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$.k1') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$.k2') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$[5]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$[6]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$[10]') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$.a1') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$.a1[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$.a1[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$.a1[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$.a1[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$.a1[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_bool(j, '\$.a1[10]') FROM ${testTable} ORDER BY id"
+
+    // jsonb_extract_isnull
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$.k1') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$.k2') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$[5]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$[6]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$[10]') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$.a1') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$.a1[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$.a1[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$.a1[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$.a1[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$.a1[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_extract_isnull(j, '\$.a1[10]') FROM ${testTable} ORDER BY id"
+
+    // jsonb_exists_path
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$.k1') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$.k2') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$[5]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$[6]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$[10]') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$.a1') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$.a1[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$.a1[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$.a1[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$.a1[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$.a1[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_exists_path(j, '\$.a1[10]') FROM ${testTable} ORDER BY id"
+
+    // jsonb_type
+    qt_select "SELECT id, j, jsonb_type(j, '\$') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_type(j, '\$.k1') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_type(j, '\$.k2') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_type(j, '\$[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_type(j, '\$[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_type(j, '\$[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_type(j, '\$[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_type(j, '\$[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_type(j, '\$[5]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_type(j, '\$[6]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_type(j, '\$[10]') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_type(j, '\$.a1') FROM ${testTable} ORDER BY id"
+
+    qt_select "SELECT id, j, jsonb_type(j, '\$.a1[0]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_type(j, '\$.a1[1]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_type(j, '\$.a1[2]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_type(j, '\$.a1[3]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_type(j, '\$.a1[4]') FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, jsonb_type(j, '\$.a1[10]') FROM ${testTable} ORDER BY id"
+
+
+    // CAST from JSONB
+    qt_select "SELECT id, j, CAST(j AS BOOLEAN) FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, CAST(j AS SMALLINT) FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, CAST(j AS INT) FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, CAST(j AS BIGINT) FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, CAST(j AS DOUBLE) FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, CAST(j AS STRING) FROM ${testTable} ORDER BY id"
+
+    // CAST to JSONB
+    qt_select "SELECT id, j, CAST(CAST(j AS BOOLEAN) AS JSONB) FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, CAST(CAST(j AS SMALLINT) AS JSONB) FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, CAST(CAST(j AS INT) AS JSONB) FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, CAST(CAST(j AS BIGINT) AS JSONB) FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, CAST(CAST(j AS DOUBLE) AS JSONB) FROM ${testTable} ORDER BY id"
+    qt_select "SELECT id, j, CAST(CAST(j AS STRING) AS JSONB) FROM ${testTable} ORDER BY id"
+
+    qt_select """SELECT CAST(NULL AS JSONB)"""
+    qt_select """SELECT CAST('null' AS JSONB)"""
+    qt_select """SELECT CAST('true' AS JSONB)"""
+    qt_select """SELECT CAST('false' AS JSONB)"""
+    qt_select """SELECT CAST('100' AS JSONB)"""
+    qt_select """SELECT CAST('10000' AS JSONB)"""
+    qt_select """SELECT CAST('1000000000' AS JSONB)"""
+    qt_select """SELECT CAST('1152921504606846976' AS JSONB)"""
+    qt_select """SELECT CAST('6.18' AS JSONB)"""
+    qt_select """SELECT CAST('"abcd"' AS JSONB)"""
+    qt_select """SELECT CAST('{}' AS JSONB)"""
+    qt_select """SELECT CAST('{"k1":"v31", "k2": 300}' AS JSONB)"""
+    qt_select """SELECT CAST('[]' AS JSONB)"""
+    qt_select """SELECT CAST('[123, 456]' AS JSONB)"""
+    qt_select """SELECT CAST('["abc", "def"]' AS JSONB)"""
+    qt_select """SELECT CAST('[null, true, false, 100, 6.18, "abc"]' AS JSONB)"""
+    qt_select """SELECT CAST('[{"k1":"v41", "k2": 400}, 1, "a", 3.14]' AS JSONB)"""
+    qt_select """SELECT CAST('{"k1":"v31", "k2": 300, "a1": [{"k1":"v41", "k2": 400}, 1, "a", 3.14]}' AS JSONB)"""
+    qt_select """SELECT CAST("''" AS JSONB)"""
+    qt_select """SELECT CAST("'abc'" AS JSONB)"""
+    qt_select """SELECT CAST('abc' AS JSONB)"""
+    qt_select """SELECT CAST('100x' AS JSONB)"""
+    qt_select """SELECT CAST('6.a8' AS JSONB)"""
+    qt_select """SELECT CAST('{x' AS JSONB)"""
+    qt_select """SELECT CAST('[123, abc]' AS JSONB)"""
+
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 08/12: [Exec](Profile) Register to Fetch Result time and Write Result time in FE to debug (#14832)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 3b28fbcd8d71cb5f1bc0782435e49683094566cf
Author: HappenLee <ha...@hotmail.com>
AuthorDate: Tue Dec 6 14:32:18 2022 +0800

    [Exec](Profile) Register to Fetch Result time and Write Result time in FE to debug (#14832)
---
 .../doris/common/util/QueryPlannerProfile.java     | 30 ++++++++++++++++++++--
 .../java/org/apache/doris/qe/StmtExecutor.java     |  8 ++++++
 2 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/util/QueryPlannerProfile.java b/fe/fe-core/src/main/java/org/apache/doris/common/util/QueryPlannerProfile.java
index 6ea3efa560..df5ae5aee2 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/util/QueryPlannerProfile.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/util/QueryPlannerProfile.java
@@ -30,7 +30,11 @@ public class QueryPlannerProfile {
     public static final String KEY_ANALYSIS = "Analysis Time";
     public static final String KEY_PLAN = "Plan Time";
     public static final String KEY_SCHEDULE = "Schedule Time";
-    public static final String KEY_FETCH = "Wait and Fetch Result Time";
+    public static final String KEY_WAIT_AND_FETCH = "Wait and Fetch Result Time";
+
+    public static final String KEY_FETCH = "Fetch Result Time";
+
+    public static final String KEY_WRITE = "Write Result Time";
 
     // timestamp of query begin
     private long queryBeginTime = -1;
@@ -43,6 +47,12 @@ public class QueryPlannerProfile {
     // Query result fetch end time
     private long queryFetchResultFinishTime = -1;
 
+    private long tempStarTime = -1;
+
+    private long queryFetchResultConsumeTime = 0;
+
+    private long queryWriteResultConsumeTime = 0;
+
     public void setQueryBeginTime() {
         this.queryBeginTime = TimeUtils.getStartTime();
     }
@@ -63,6 +73,18 @@ public class QueryPlannerProfile {
         this.queryFetchResultFinishTime = TimeUtils.getStartTime();
     }
 
+    public void setTempStartTime() {
+        this.tempStarTime = TimeUtils.getStartTime();
+    }
+
+    public void freshFetchResultConsumeTime() {
+        this.queryFetchResultConsumeTime += TimeUtils.getStartTime() - tempStarTime;
+    }
+
+    public void freshWriteResultConsumeTime() {
+        this.queryWriteResultConsumeTime += TimeUtils.getStartTime() - tempStarTime;
+    }
+
     public long getQueryBeginTime() {
         return queryBeginTime;
     }
@@ -99,6 +121,10 @@ public class QueryPlannerProfile {
         plannerProfile.addInfoString(KEY_ANALYSIS, getPrettyQueryAnalysisFinishTime());
         plannerProfile.addInfoString(KEY_PLAN, getPrettyQueryPlanFinishTime());
         plannerProfile.addInfoString(KEY_SCHEDULE, getPrettyQueryScheduleFinishTime());
-        plannerProfile.addInfoString(KEY_FETCH, getPrettyQueryFetchResultFinishTime());
+        plannerProfile.addInfoString(KEY_FETCH,
+                RuntimeProfile.printCounter(queryFetchResultConsumeTime, TUnit.TIME_NS));
+        plannerProfile.addInfoString(KEY_WRITE,
+                RuntimeProfile.printCounter(queryWriteResultConsumeTime, TUnit.TIME_NS));
+        plannerProfile.addInfoString(KEY_WAIT_AND_FETCH, getPrettyQueryFetchResultFinishTime());
     }
 }
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
index 3acaa2c824..8feaaa3e6f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
@@ -1137,12 +1137,19 @@ public class StmtExecutor implements ProfileWriter {
         Span fetchResultSpan = context.getTracer().spanBuilder("fetch result").setParent(Context.current()).startSpan();
         try (Scope scope = fetchResultSpan.makeCurrent()) {
             while (true) {
+                // register the fetch result time.
+                plannerProfile.setTempStartTime();
                 batch = coord.getNext();
+                plannerProfile.freshFetchResultConsumeTime();
+
                 // for outfile query, there will be only one empty batch send back with eos flag
                 if (batch.getBatch() != null) {
                     if (cacheAnalyzer != null) {
                         cacheAnalyzer.copyRowBatch(batch);
                     }
+
+                    // register send field result time.
+                    plannerProfile.setTempStartTime();
                     // For some language driver, getting error packet after fields packet
                     // will be recognized as a success result
                     // so We need to send fields after first batch arrived
@@ -1157,6 +1164,7 @@ public class StmtExecutor implements ProfileWriter {
                     for (ByteBuffer row : batch.getBatch().getRows()) {
                         channel.sendOnePacket(row);
                     }
+                    plannerProfile.freshWriteResultConsumeTime();
                     context.updateReturnRows(batch.getBatch().getRows().size());
                 }
                 if (batch.isEos()) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 11/12: [fix](fe-meta) NPE in DataProperty when upgrading to 1.2.x (#14976)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit f0c6f7bb14c91408fd47794967e73dfff6324721
Author: Mingyu Chen <mo...@163.com>
AuthorDate: Sat Dec 10 18:46:08 2022 +0800

    [fix](fe-meta) NPE in DataProperty when upgrading to 1.2.x (#14976)
---
 .../src/main/java/org/apache/doris/catalog/DataProperty.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/DataProperty.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/DataProperty.java
index 0531d9d03a..50fcbf7e72 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/DataProperty.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/DataProperty.java
@@ -22,9 +22,11 @@ import org.apache.doris.common.FeMetaVersion;
 import org.apache.doris.common.io.Text;
 import org.apache.doris.common.io.Writable;
 import org.apache.doris.common.util.TimeUtils;
+import org.apache.doris.persist.gson.GsonPostProcessable;
 import org.apache.doris.persist.gson.GsonUtils;
 import org.apache.doris.thrift.TStorageMedium;
 
+import com.google.common.base.Strings;
 import com.google.gson.annotations.SerializedName;
 
 import java.io.DataInput;
@@ -32,7 +34,7 @@ import java.io.DataOutput;
 import java.io.IOException;
 import java.util.Objects;
 
-public class DataProperty implements Writable {
+public class DataProperty implements Writable, GsonPostProcessable {
     public static final DataProperty DEFAULT_DATA_PROPERTY = new DataProperty(
             "SSD".equalsIgnoreCase(Config.default_storage_medium) ? TStorageMedium.SSD : TStorageMedium.HDD
     );
@@ -126,7 +128,7 @@ public class DataProperty implements Writable {
 
         return this.storageMedium == other.storageMedium
                 && this.cooldownTimeMs == other.cooldownTimeMs
-                && this.storagePolicy.equals(other.storagePolicy);
+                && Strings.nullToEmpty(this.storagePolicy).equals(Strings.nullToEmpty(other.storagePolicy));
     }
 
     @Override
@@ -137,4 +139,10 @@ public class DataProperty implements Writable {
         sb.append("remote storage policy[").append(this.storagePolicy).append("]. ");
         return sb.toString();
     }
+
+    @Override
+    public void gsonPostProcess() throws IOException {
+        // storagePolicy is a newly added field, it may be null when replaying from old version.
+        this.storagePolicy = Strings.nullToEmpty(this.storagePolicy);
+    }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 07/12: [fix](statistics) fix CpuTimeMS in audit log when enable_vectorized_engine=true. (#14853)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 449006808c0d787bef9c4a5aaf9307641f7ec5f5
Author: wxy <du...@gmail.com>
AuthorDate: Fri Dec 9 21:13:05 2022 +0800

    [fix](statistics) fix CpuTimeMS in audit log when enable_vectorized_engine=true. (#14853)
    
    Co-authored-by: wangxiangyu@360shuke.com <wa...@360shuke.com>
---
 be/src/vec/exec/scan/new_olap_scan_node.cpp |  1 +
 be/src/vec/exec/scan/scanner_scheduler.cpp  |  6 ++----
 be/src/vec/exec/scan/vscan_node.cpp         |  1 +
 be/src/vec/exec/scan/vscan_node.h           |  1 +
 be/src/vec/exec/scan/vscanner.cpp           |  1 +
 be/src/vec/exec/scan/vscanner.h             | 10 ++++++++++
 6 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/be/src/vec/exec/scan/new_olap_scan_node.cpp b/be/src/vec/exec/scan/new_olap_scan_node.cpp
index 0f5ba461ed..add047fc6a 100644
--- a/be/src/vec/exec/scan/new_olap_scan_node.cpp
+++ b/be/src/vec/exec/scan/new_olap_scan_node.cpp
@@ -39,6 +39,7 @@ Status NewOlapScanNode::collect_query_statistics(QueryStatistics* statistics) {
     RETURN_IF_ERROR(ExecNode::collect_query_statistics(statistics));
     statistics->add_scan_bytes(_read_compressed_counter->value());
     statistics->add_scan_rows(_raw_rows_counter->value());
+    statistics->add_cpu_ms(_scan_cpu_timer->value() / NANOS_PER_MILLIS);
     return Status::OK();
 }
 
diff --git a/be/src/vec/exec/scan/scanner_scheduler.cpp b/be/src/vec/exec/scan/scanner_scheduler.cpp
index 38e322b83e..f2170a9599 100644
--- a/be/src/vec/exec/scan/scanner_scheduler.cpp
+++ b/be/src/vec/exec/scan/scanner_scheduler.cpp
@@ -182,10 +182,7 @@ void ScannerScheduler::_scanner_scan(ScannerScheduler* scheduler, ScannerContext
     SCOPED_CONSUME_MEM_TRACKER(scanner->runtime_state()->scanner_mem_tracker());
     Thread::set_self_name("_scanner_scan");
     scanner->update_wait_worker_timer();
-    // Do not use ScopedTimer. There is no guarantee that, the counter
-    // (_scan_cpu_timer, the class member) is not destroyed after `_running_thread==0`.
-    ThreadCpuStopWatch cpu_watch;
-    cpu_watch.start();
+    scanner->start_scan_cpu_timer();
     Status status = Status::OK();
     bool eos = false;
     RuntimeState* state = ctx->state();
@@ -270,6 +267,7 @@ void ScannerScheduler::_scanner_scan(ScannerScheduler* scheduler, ScannerContext
         ctx->append_blocks_to_queue(blocks);
     }
 
+    scanner->update_scan_cpu_timer();
     if (eos || should_stop) {
         scanner->mark_to_need_to_close();
     }
diff --git a/be/src/vec/exec/scan/vscan_node.cpp b/be/src/vec/exec/scan/vscan_node.cpp
index 67dd96f514..fb3ee2c525 100644
--- a/be/src/vec/exec/scan/vscan_node.cpp
+++ b/be/src/vec/exec/scan/vscan_node.cpp
@@ -154,6 +154,7 @@ Status VScanNode::_init_profile() {
     runtime_profile()->add_child(_scanner_profile.get(), true, nullptr);
 
     _scan_timer = ADD_TIMER(_scanner_profile, "ScannerGetBlockTime");
+    _scan_cpu_timer = ADD_TIMER(_scanner_profile, "ScannerCpuTime");
     _prefilter_timer = ADD_TIMER(_scanner_profile, "ScannerPrefilterTime");
     _convert_block_timer = ADD_TIMER(_scanner_profile, "ScannerConvertBlockTime");
     _filter_timer = ADD_TIMER(_scanner_profile, "ScannerFilterTime");
diff --git a/be/src/vec/exec/scan/vscan_node.h b/be/src/vec/exec/scan/vscan_node.h
index 50bafe309f..c5b58b3d36 100644
--- a/be/src/vec/exec/scan/vscan_node.h
+++ b/be/src/vec/exec/scan/vscan_node.h
@@ -237,6 +237,7 @@ protected:
     RuntimeProfile::Counter* _acquire_runtime_filter_timer = nullptr;
     // time of get block from scanner
     RuntimeProfile::Counter* _scan_timer = nullptr;
+    RuntimeProfile::Counter* _scan_cpu_timer = nullptr;
     // time of prefilter input block from scanner
     RuntimeProfile::Counter* _prefilter_timer = nullptr;
     // time of convert input block to output block from scanner
diff --git a/be/src/vec/exec/scan/vscanner.cpp b/be/src/vec/exec/scan/vscanner.cpp
index 20e2a882c4..9a8b2858a4 100644
--- a/be/src/vec/exec/scan/vscanner.cpp
+++ b/be/src/vec/exec/scan/vscanner.cpp
@@ -120,6 +120,7 @@ Status VScanner::close(RuntimeState* state) {
 }
 
 void VScanner::_update_counters_before_close() {
+    COUNTER_UPDATE(_parent->_scan_cpu_timer, _scan_cpu_timer);
     if (!_state->enable_profile() && !_is_load) return;
     COUNTER_UPDATE(_parent->_rows_read_counter, _num_rows_read);
     // Update stats for load
diff --git a/be/src/vec/exec/scan/vscanner.h b/be/src/vec/exec/scan/vscanner.h
index bc7a203c6d..8e8c8a837f 100644
--- a/be/src/vec/exec/scan/vscanner.h
+++ b/be/src/vec/exec/scan/vscanner.h
@@ -73,8 +73,15 @@ public:
         _watch.start();
     }
 
+    void start_scan_cpu_timer() {
+        _cpu_watch.reset();
+        _cpu_watch.start();
+    }
+
     void update_wait_worker_timer() { _scanner_wait_worker_timer += _watch.elapsed_time(); }
 
+    void update_scan_cpu_timer() { _scan_cpu_timer += _cpu_watch.elapsed_time(); }
+
     RuntimeState* runtime_state() { return _state; }
 
     bool is_open() { return _is_open; }
@@ -162,7 +169,10 @@ protected:
 
     // watch to count the time wait for scanner thread
     MonotonicStopWatch _watch;
+    // Do not use ScopedTimer. There is no guarantee that, the counter
+    ThreadCpuStopWatch _cpu_watch;
     int64_t _scanner_wait_worker_timer = 0;
+    int64_t _scan_cpu_timer = 0;
 
     // File formats based push down predicate
     std::vector<ExprContext*> _conjunct_ctxs;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 05/12: [Bug](predicate) fix undefined behavior on in list predicate #14961

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 1fd9e552c97f6e450a76ff6a8f2514656ad74b04
Author: Pxl <px...@qq.com>
AuthorDate: Fri Dec 9 21:09:54 2022 +0800

    [Bug](predicate) fix undefined behavior on in list predicate #14961
---
 be/src/olap/in_list_predicate.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/be/src/olap/in_list_predicate.h b/be/src/olap/in_list_predicate.h
index d1c0d2327a..eed5260a6a 100644
--- a/be/src/olap/in_list_predicate.h
+++ b/be/src/olap/in_list_predicate.h
@@ -114,7 +114,8 @@ public:
             : ColumnPredicate(column_id, false),
               _min_value(type_limit<T>::max()),
               _max_value(type_limit<T>::min()) {
-        using HybridSetType = std::conditional_t<is_string_type(Type), StringSet, HybridSet<Type>>;
+        using HybridSetType =
+                std::conditional_t<is_string_type(Type), StringSet, HybridSet<Type, true>>;
 
         CHECK(hybrid_set != nullptr);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 04/12: [Improvement](multi-catalog) add show create catalog stmt (#14938)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 45e5fa0db8bc69615c80ecd71abd0d6401827070
Author: Yulei-Yang <yu...@gmail.com>
AuthorDate: Fri Dec 9 08:56:55 2022 +0800

    [Improvement](multi-catalog) add show create catalog stmt (#14938)
---
 .../Create/CREATE-CATALOG.md                       |  4 +-
 .../Show-Statements/SHOW-CREATE-CATALOG.md         | 63 ++++++++++++++++
 docs/sidebars.json                                 |  1 +
 .../Create/CREATE-CATALOG.md                       |  4 +-
 .../Show-Statements/SHOW-CREATE-CATALOG.md         | 64 +++++++++++++++++
 fe/fe-core/src/main/cup/sql_parser.cup             |  4 ++
 .../doris/analysis/ShowCreateCatalogStmt.java      | 84 ++++++++++++++++++++++
 .../org/apache/doris/datasource/CatalogMgr.java    | 28 ++++++++
 .../java/org/apache/doris/qe/ShowExecutor.java     | 11 +++
 .../apache/doris/datasource/CatalogMgrTest.java    | 27 +++++++
 10 files changed, 286 insertions(+), 4 deletions(-)

diff --git a/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-CATALOG.md b/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-CATALOG.md
index e2669590c6..acf435eb06 100644
--- a/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-CATALOG.md
+++ b/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-CATALOG.md
@@ -54,8 +54,8 @@ CREATE CATALOG [IF NOT EXISTS] catalog_name
    CREATE CATALOG hive PROPERTIES (
 		"type"="hms",
 		'hive.metastore.uris' = 'thrift://172.21.0.1:7004',
-		'dfs.nameservices'='service1',
-		'dfs.ha.namenodes. service1'='nn1,nn2',
+		'dfs.nameservices'='HDFS8000871',
+		'dfs.ha.namenodes.HDFS8000871'='nn1,nn2',
 		'dfs.namenode.rpc-address.HDFS8000871.nn1'='172.21.0.2:4007',
 		'dfs.namenode.rpc-address.HDFS8000871.nn2'='172.21.0.3:4007',
 		'dfs.client.failover.proxy.provider.HDFS8000871'='org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider'
diff --git a/docs/en/docs/sql-manual/sql-reference/Show-Statements/SHOW-CREATE-CATALOG.md b/docs/en/docs/sql-manual/sql-reference/Show-Statements/SHOW-CREATE-CATALOG.md
new file mode 100644
index 0000000000..180fbe5112
--- /dev/null
+++ b/docs/en/docs/sql-manual/sql-reference/Show-Statements/SHOW-CREATE-CATALOG.md
@@ -0,0 +1,63 @@
+---
+{
+    "title": "SHOW-CREATE-CATALOG",
+    "language": "zh-CN"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## SHOW-CREATE-CATALOG
+
+### Name
+
+<version since="1.2">
+
+SHOW CREATE CATALOG
+
+</version>
+
+### Description
+
+This statement shows the creating statement of a doris catalog.
+
+grammar:
+
+```sql
+SHOW CREATE CATALOG catalog_name;
+```
+
+illustrate:
+- `catalog_name`: The name of the catalog which exist in doris.
+
+### Example
+
+1. View the creating statement of the hive catalog in doris
+
+   ```sql
+   SHOW CREATE CATALOG hive;
+   ```
+
+### Keywords
+
+    SHOW, CREATE, CATALOG
+
+### Best Practice
+
diff --git a/docs/sidebars.json b/docs/sidebars.json
index 66eac63629..1a1cefa5ec 100644
--- a/docs/sidebars.json
+++ b/docs/sidebars.json
@@ -858,6 +858,7 @@
                                 "sql-manual/sql-reference/Show-Statements/SHOW-CATALOGS",
                                 "sql-manual/sql-reference/Show-Statements/SHOW-CREATE-TABLE",
                                 "sql-manual/sql-reference/Show-Statements/SHOW-CHARSET",
+                                "sql-manual/sql-reference/Show-Statements/SHOW-CREATE-CATALOG",
                                 "sql-manual/sql-reference/Show-Statements/SHOW-CREATE-DATABASE",
                                 "sql-manual/sql-reference/Show-Statements/SHOW-CREATE-MATERIALIZED-VIEW",
                                 "sql-manual/sql-reference/Show-Statements/SHOW-CREATE-ROUTINE-LOAD",
diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-CATALOG.md b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-CATALOG.md
index dd8af3a7e9..5e9ccb09dc 100644
--- a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-CATALOG.md
+++ b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-CATALOG.md
@@ -58,8 +58,8 @@ CREATE CATALOG [IF NOT EXISTS] catalog_name
    CREATE CATALOG hive PROPERTIES (
 		"type"="hms",
 		'hive.metastore.uris' = 'thrift://172.21.0.1:7004',
-		'dfs.nameservices'='service1',
-		'dfs.ha.namenodes. service1'='nn1,nn2',
+		'dfs.nameservices'='HDFS8000871',
+		'dfs.ha.namenodes.HDFS8000871'='nn1,nn2',
 		'dfs.namenode.rpc-address.HDFS8000871.nn1'='172.21.0.2:4007',
 		'dfs.namenode.rpc-address.HDFS8000871.nn2'='172.21.0.3:4007',
 		'dfs.client.failover.proxy.provider.HDFS8000871'='org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider'
diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-CREATE-CATALOG.md b/docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-CREATE-CATALOG.md
new file mode 100644
index 0000000000..b72ca20be3
--- /dev/null
+++ b/docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-CREATE-CATALOG.md
@@ -0,0 +1,64 @@
+---
+{
+    "title": "SHOW-CREATE-CATALOG",
+    "language": "zh-CN"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## SHOW-CREATE-CATALOG
+
+### Name
+
+<version since="1.2">
+
+SHOW CREATE CATALOG
+
+</version>
+
+### Description
+
+该语句查看doris数据目录的创建语句。
+
+语法:
+
+```sql
+SHOW CREATE CATALOG catalog_name;
+```
+
+说明:
+
+- `catalog_name`: 为doris中存在的数据目录的名称。
+
+### Example
+
+1. 查看doris中hive数据目录的创建语句
+
+   ```sql
+   SHOW CREATE CATALOG hive;
+   ```
+
+### Keywords
+
+    SHOW, CREATE, CATALOG
+
+### Best Practice
+
diff --git a/fe/fe-core/src/main/cup/sql_parser.cup b/fe/fe-core/src/main/cup/sql_parser.cup
index 68d209ffe6..6b3fff4bd5 100644
--- a/fe/fe-core/src/main/cup/sql_parser.cup
+++ b/fe/fe-core/src/main/cup/sql_parser.cup
@@ -3419,6 +3419,10 @@ show_param ::=
     {:
         RESULT = new ShowCreateDbStmt(db);
     :}
+    | KW_CREATE KW_CATALOG ident:catalogName
+        {:
+            RESULT = new ShowCreateCatalogStmt(catalogName);
+        :}
     /* Create Function */
     | KW_CREATE KW_FUNCTION function_name:functionName LPAREN func_args_def:args RPAREN opt_db:dbName
     {:
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCreateCatalogStmt.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCreateCatalogStmt.java
new file mode 100644
index 0000000000..8e32289e10
--- /dev/null
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCreateCatalogStmt.java
@@ -0,0 +1,84 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.analysis;
+
+import org.apache.doris.catalog.Column;
+import org.apache.doris.catalog.Env;
+import org.apache.doris.catalog.ScalarType;
+import org.apache.doris.common.AnalysisException;
+import org.apache.doris.common.ErrorCode;
+import org.apache.doris.common.ErrorReport;
+import org.apache.doris.common.UserException;
+import org.apache.doris.common.util.Util;
+import org.apache.doris.mysql.privilege.PrivPredicate;
+import org.apache.doris.qe.ConnectContext;
+import org.apache.doris.qe.ShowResultSetMetaData;
+
+import com.google.common.base.Strings;
+
+// Show create catalog statement
+//  Syntax:
+//      SHOW CREATE CATALOG catalogName
+public class ShowCreateCatalogStmt extends ShowStmt {
+    private static final ShowResultSetMetaData META_DATA =
+            ShowResultSetMetaData.builder()
+                    .addColumn(new Column("Catalog", ScalarType.createVarchar(20)))
+                    .addColumn(new Column("Create Catalog", ScalarType.createVarchar(30)))
+                    .build();
+
+    private String catalog;
+
+    public ShowCreateCatalogStmt(String catalog) {
+        this.catalog = catalog;
+    }
+
+    public String getCatalog() {
+        return catalog;
+    }
+
+    @Override
+    public void analyze(Analyzer analyzer) throws AnalysisException, UserException {
+        Util.checkCatalogEnabled();
+
+        super.analyze(analyzer);
+        if (Strings.isNullOrEmpty(catalog)) {
+            ErrorReport.reportAnalysisException(ErrorCode.ERR_WRONG_CATALOG_NAME, catalog);
+        }
+
+        if (!Env.getCurrentEnv().getAuth()
+                .checkCtlPriv(ConnectContext.get(), catalog, PrivPredicate.SHOW)) {
+            ErrorReport.reportAnalysisException(ErrorCode.ERR_CATALOG_ACCESS_DENIED,
+                    ConnectContext.get().getQualifiedUser(), catalog);
+        }
+    }
+
+    @Override
+    public String toSql() {
+        return "SHOW CREATE CATALOG `" + catalog + "`";
+    }
+
+    @Override
+    public String toString() {
+        return toSql();
+    }
+
+    @Override
+    public ShowResultSetMetaData getMetaData() {
+        return META_DATA;
+    }
+}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/CatalogMgr.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/CatalogMgr.java
index ecbcdf8790..854ee223d1 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/datasource/CatalogMgr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/CatalogMgr.java
@@ -23,10 +23,12 @@ import org.apache.doris.analysis.CreateCatalogStmt;
 import org.apache.doris.analysis.DropCatalogStmt;
 import org.apache.doris.analysis.RefreshCatalogStmt;
 import org.apache.doris.analysis.ShowCatalogStmt;
+import org.apache.doris.analysis.ShowCreateCatalogStmt;
 import org.apache.doris.catalog.DatabaseIf;
 import org.apache.doris.catalog.Env;
 import org.apache.doris.catalog.external.ExternalDatabase;
 import org.apache.doris.catalog.external.ExternalTable;
+import org.apache.doris.cluster.ClusterNamespace;
 import org.apache.doris.common.AnalysisException;
 import org.apache.doris.common.CaseSensibility;
 import org.apache.doris.common.DdlException;
@@ -36,6 +38,7 @@ import org.apache.doris.common.PatternMatcher;
 import org.apache.doris.common.UserException;
 import org.apache.doris.common.io.Text;
 import org.apache.doris.common.io.Writable;
+import org.apache.doris.common.util.PrintableMap;
 import org.apache.doris.mysql.privilege.PrivPredicate;
 import org.apache.doris.persist.OperationType;
 import org.apache.doris.persist.gson.GsonPostProcessable;
@@ -371,6 +374,31 @@ public class CatalogMgr implements Writable, GsonPostProcessable {
         return new ShowResultSet(showStmt.getMetaData(), rows);
     }
 
+    public ShowResultSet showCreateCatalog(ShowCreateCatalogStmt showStmt) throws AnalysisException {
+        List<List<String>> rows = Lists.newArrayList();
+        readLock();
+        try {
+            CatalogIf catalog = nameToCatalog.get(showStmt.getCatalog());
+            if (catalog == null) {
+                throw new AnalysisException("No catalog found with name " + showStmt.getCatalog());
+            }
+            StringBuilder sb = new StringBuilder();
+            sb.append("CREATE CATALOG `").append(ClusterNamespace.getNameFromFullName(showStmt.getCatalog()))
+                    .append("`");
+            if (catalog.getProperties().size() > 0) {
+                sb.append(" PROPERTIES (\n");
+                sb.append(new PrintableMap<>(catalog.getProperties(), "=", true, true, false));
+                sb.append("\n);");
+            }
+
+            rows.add(Lists.newArrayList(ClusterNamespace.getNameFromFullName(showStmt.getCatalog()), sb.toString()));
+        } finally {
+            readUnlock();
+        }
+
+        return new ShowResultSet(showStmt.getMetaData(), rows);
+    }
+
     /**
      * Refresh the catalog meta and write the meta log.
      */
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
index 183487ee99..09388fc0b0 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
@@ -38,6 +38,7 @@ import org.apache.doris.analysis.ShowClusterStmt;
 import org.apache.doris.analysis.ShowCollationStmt;
 import org.apache.doris.analysis.ShowColumnStatsStmt;
 import org.apache.doris.analysis.ShowColumnStmt;
+import org.apache.doris.analysis.ShowCreateCatalogStmt;
 import org.apache.doris.analysis.ShowCreateDbStmt;
 import org.apache.doris.analysis.ShowCreateFunctionStmt;
 import org.apache.doris.analysis.ShowCreateMaterializedViewStmt;
@@ -378,6 +379,8 @@ public class ShowExecutor {
             handleShowPolicy();
         } else if (stmt instanceof ShowCatalogStmt) {
             handleShowCatalogs();
+        } else if (stmt instanceof ShowCreateCatalogStmt) {
+            handleShowCreateCatalog();
         } else if (stmt instanceof ShowAnalyzeStmt) {
             handleShowAnalyze();
         } else if (stmt instanceof AdminCopyTabletStmt) {
@@ -2312,6 +2315,14 @@ public class ShowExecutor {
         resultSet = Env.getCurrentEnv().getCatalogMgr().showCatalogs(showStmt);
     }
 
+    // Show create catalog
+    private void handleShowCreateCatalog() throws AnalysisException {
+        ShowCreateCatalogStmt showStmt = (ShowCreateCatalogStmt) stmt;
+
+        resultSet = Env.getCurrentEnv().getCatalogMgr().showCreateCatalog(showStmt);
+    }
+
+
     private void handleShowAnalyze() throws AnalysisException {
         ShowAnalyzeStmt showStmt = (ShowAnalyzeStmt) stmt;
         StatisticsJobManager jobManager = Env.getCurrentEnv().getStatisticsJobManager();
diff --git a/fe/fe-core/src/test/java/org/apache/doris/datasource/CatalogMgrTest.java b/fe/fe-core/src/test/java/org/apache/doris/datasource/CatalogMgrTest.java
index 7340cd8f18..b6a7e870bc 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/datasource/CatalogMgrTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/datasource/CatalogMgrTest.java
@@ -25,6 +25,7 @@ import org.apache.doris.analysis.CreateUserStmt;
 import org.apache.doris.analysis.DropCatalogStmt;
 import org.apache.doris.analysis.GrantStmt;
 import org.apache.doris.analysis.ShowCatalogStmt;
+import org.apache.doris.analysis.ShowCreateCatalogStmt;
 import org.apache.doris.analysis.SwitchStmt;
 import org.apache.doris.analysis.UserIdentity;
 import org.apache.doris.catalog.Column;
@@ -217,6 +218,15 @@ public class CatalogMgrTest extends TestWithFeService {
             }
         }
 
+        String showCreateCatalog = "SHOW CREATE CATALOG my_catalog";
+        ShowCreateCatalogStmt showCreateStmt = (ShowCreateCatalogStmt) parseAndAnalyzeStmt(showCreateCatalog);
+        showResultSet = mgr.showCreateCatalog(showCreateStmt);
+
+        Assert.assertEquals(1, showResultSet.getResultRows().size());
+        List<String> result = showResultSet.getResultRows().get(0);
+        Assertions.assertEquals("my_catalog", result.get(0));
+        Assertions.assertTrue(result.get(1).startsWith("CREATE CATALOG `my_catalog` PROPERTIES ("));
+
         testCatalogMgrPersist();
 
         String dropCatalogSql = "DROP CATALOG " + MY_CATALOG;
@@ -347,6 +357,23 @@ public class CatalogMgrTest extends TestWithFeService {
             Assert.assertEquals(e.getMessage(),
                     "errCode = 2, detailMessage = Access denied for user 'default_cluster:user2' to catalog 'iceberg'");
         }
+
+        //test show create catalog: have permission to hive, have no permission to iceberg;
+        ShowCreateCatalogStmt user2ShowCreateHive = (ShowCreateCatalogStmt) parseAndAnalyzeStmt(
+                "show create catalog hive;", user2Ctx);
+        List<List<String>> user2ShowCreateHiveResult = env.getCatalogMgr().showCreateCatalog(user2ShowCreateHive)
+                .getResultRows();
+        Assert.assertTrue(
+                user2ShowCreateHiveResult.stream().map(l -> l.get(0)).anyMatch(c -> c.equals("hive")));
+        try {
+            env.getCatalogMgr()
+                    .showCreateCatalog(
+                            (ShowCreateCatalogStmt) parseAndAnalyzeStmt("show create catalog iceberg;", user2Ctx));
+            Assert.fail("");
+        } catch (AnalysisException e) {
+            Assert.assertEquals(e.getMessage(),
+                    "errCode = 2, detailMessage = Access denied for user 'default_cluster:user2' to catalog 'iceberg'");
+        }
     }
 
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 09/12: [Improvement](multi catalog)Add comment to external hms table show create table output. (#14861)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 0a54885a7c7826b00c31f89e37f09dd50e7066dd
Author: Jibing-Li <64...@users.noreply.github.com>
AuthorDate: Wed Dec 7 21:12:30 2022 +0800

    [Improvement](multi catalog)Add comment to external hms table show create table output. (#14861)
    
    The output of show create table comment for hms external table doesn't contain comment section.
    This pr is to add the comment to the output.
---
 .../apache/doris/catalog/HiveMetaStoreClientHelper.java    | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/HiveMetaStoreClientHelper.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/HiveMetaStoreClientHelper.java
index be75a1c983..e3aad211d6 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/HiveMetaStoreClientHelper.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/HiveMetaStoreClientHelper.java
@@ -96,6 +96,7 @@ public class HiveMetaStoreClientHelper {
     public static final String HIVE_METASTORE_URIS = "hive.metastore.uris";
     public static final String HIVE_METASTORE_TYPE = "hive.metastore.type";
     public static final String DLF_TYPE = "dlf";
+    public static final String COMMENT = "comment";
 
     private static final Pattern digitPattern = Pattern.compile("(\\d+)");
 
@@ -835,6 +836,9 @@ public class HiveMetaStoreClientHelper {
                 }
             }
             output.append(")\n");
+            if (remoteTable.getParameters().containsKey(COMMENT)) {
+                output.append(String.format("COMMENT '%s'", remoteTable.getParameters().get(COMMENT))).append("\n");
+            }
             if (remoteTable.getPartitionKeys().size() > 0) {
                 output.append("PARTITIONED BY (\n")
                         .append(remoteTable.getPartitionKeys().stream().map(
@@ -869,7 +873,15 @@ public class HiveMetaStoreClientHelper {
             }
             if (remoteTable.isSetParameters()) {
                 output.append("TBLPROPERTIES (\n");
-                Iterator<Map.Entry<String, String>> params = remoteTable.getParameters().entrySet().iterator();
+                Map<String, String> parameters = Maps.newHashMap();
+                // Copy the parameters to a new Map to keep them unchanged.
+                parameters.putAll(remoteTable.getParameters());
+                if (parameters.containsKey(COMMENT)) {
+                    // Comment is always added to the end of remote table parameters.
+                    // It has already showed above in COMMENT section, so remove it here.
+                    parameters.remove(COMMENT);
+                }
+                Iterator<Map.Entry<String, String>> params = parameters.entrySet().iterator();
                 while (params.hasNext()) {
                     Map.Entry<String, String> param = params.next();
                     output.append(String.format("  '%s'='%s'", param.getKey(), param.getValue()));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 01/12: [Bug](predicate) fix ccore dump on varchar with in list predicate (#14881)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 06d02b29d3af24b0a279291b9dad1bef6af44197
Author: Pxl <px...@qq.com>
AuthorDate: Thu Dec 8 17:14:23 2022 +0800

    [Bug](predicate) fix ccore dump on varchar with in list predicate (#14881)
    
    * fix ccore dump on varchar with in list predicate
    
    * update case
    
    * Update sqlsmith01.sql
---
 be/src/olap/bitmap_filter_predicate.h                     |  3 ++-
 be/src/olap/bloom_filter_predicate.h                      |  8 ++++++--
 be/src/olap/comparison_predicate.h                        | 15 ++++++++-------
 be/src/olap/in_list_predicate.h                           | 11 ++++-------
 be/src/runtime/primitive_type.h                           |  3 +++
 .../data/tpcds_sf1_unique_p1/sql/sqlsmith01.out           |  3 +++
 .../suites/tpcds_sf1_unique_p1/sql/sqlsmith01.sql         |  1 +
 7 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/be/src/olap/bitmap_filter_predicate.h b/be/src/olap/bitmap_filter_predicate.h
index 9bf444b889..a10bf46f7b 100644
--- a/be/src/olap/bitmap_filter_predicate.h
+++ b/be/src/olap/bitmap_filter_predicate.h
@@ -93,7 +93,8 @@ private:
 
         uint16_t new_size = 0;
         new_size = _specific_filter->find_fixed_len_olap_engine(
-                (char*)reinterpret_cast<const vectorized::PredicateColumnType<T>*>(&column)
+                (char*)reinterpret_cast<
+                        const vectorized::PredicateColumnType<PredicateEvaluateType<T>>*>(&column)
                         ->get_data()
                         .data(),
                 null_map, sel, size);
diff --git a/be/src/olap/bloom_filter_predicate.h b/be/src/olap/bloom_filter_predicate.h
index efa00a5930..a5fdcdd6ae 100644
--- a/be/src/olap/bloom_filter_predicate.h
+++ b/be/src/olap/bloom_filter_predicate.h
@@ -84,7 +84,9 @@ private:
             }
         } else if (IRuntimeFilter::enable_use_batch(_be_exec_version, T)) {
             new_size = _specific_filter->find_fixed_len_olap_engine(
-                    (char*)reinterpret_cast<const vectorized::PredicateColumnType<T>*>(&column)
+                    (char*)reinterpret_cast<
+                            const vectorized::PredicateColumnType<PredicateEvaluateType<T>>*>(
+                            &column)
                             ->get_data()
                             .data(),
                     null_map, sel, size);
@@ -101,7 +103,9 @@ private:
             };
 
             auto pred_col_data =
-                    reinterpret_cast<const vectorized::PredicateColumnType<T>*>(&column)
+                    reinterpret_cast<
+                            const vectorized::PredicateColumnType<PredicateEvaluateType<T>>*>(
+                            &column)
                             ->get_data()
                             .data();
             for (uint16_t i = 0; i < size; i++) {
diff --git a/be/src/olap/comparison_predicate.h b/be/src/olap/comparison_predicate.h
index 909f638813..8856fc4ade 100644
--- a/be/src/olap/comparison_predicate.h
+++ b/be/src/olap/comparison_predicate.h
@@ -345,8 +345,8 @@ public:
                     LOG(FATAL) << "column_dictionary must use StringValue predicate.";
                 }
             } else {
-                auto* data_array = reinterpret_cast<const vectorized::PredicateColumnType<Type>&>(
-                                           nested_column)
+                auto* data_array = reinterpret_cast<const vectorized::PredicateColumnType<
+                        PredicateEvaluateType<Type>>&>(nested_column)
                                            .get_data()
                                            .data();
 
@@ -368,7 +368,8 @@ public:
                 }
             } else {
                 auto* data_array =
-                        vectorized::check_and_get_column<vectorized::PredicateColumnType<Type>>(
+                        vectorized::check_and_get_column<
+                                vectorized::PredicateColumnType<PredicateEvaluateType<Type>>>(
                                 column)
                                 ->get_data()
                                 .data();
@@ -546,7 +547,8 @@ private:
             }
         } else {
             auto* data_array =
-                    vectorized::check_and_get_column<vectorized::PredicateColumnType<Type>>(column)
+                    vectorized::check_and_get_column<
+                            vectorized::PredicateColumnType<PredicateEvaluateType<Type>>>(column)
                             ->get_data()
                             .data();
 
@@ -592,8 +594,8 @@ private:
             }
         } else {
             auto* data_array =
-                    vectorized::check_and_get_column<vectorized::PredicateColumnType<EvalType>>(
-                            column)
+                    vectorized::check_and_get_column<
+                            vectorized::PredicateColumnType<PredicateEvaluateType<Type>>>(column)
                             ->get_data()
                             .data();
 
@@ -608,7 +610,6 @@ private:
     }
 
     T _value;
-    static constexpr PrimitiveType EvalType = (Type == TYPE_CHAR ? TYPE_STRING : Type);
 };
 
 } //namespace doris
diff --git a/be/src/olap/in_list_predicate.h b/be/src/olap/in_list_predicate.h
index 503aa340b0..d1c0d2327a 100644
--- a/be/src/olap/in_list_predicate.h
+++ b/be/src/olap/in_list_predicate.h
@@ -496,9 +496,8 @@ private:
                 LOG(FATAL) << "column_dictionary must use StringValue predicate.";
             }
         } else {
-            auto* nested_col_ptr =
-                    vectorized::check_and_get_column<vectorized::PredicateColumnType<EvalType>>(
-                            column);
+            auto* nested_col_ptr = vectorized::check_and_get_column<
+                    vectorized::PredicateColumnType<PredicateEvaluateType<Type>>>(column);
             auto& data_array = nested_col_ptr->get_data();
 
             for (uint16_t i = 0; i < size; i++) {
@@ -573,9 +572,8 @@ private:
                 LOG(FATAL) << "column_dictionary must use StringValue predicate.";
             }
         } else {
-            auto* nested_col_ptr =
-                    vectorized::check_and_get_column<vectorized::PredicateColumnType<EvalType>>(
-                            column);
+            auto* nested_col_ptr = vectorized::check_and_get_column<
+                    vectorized::PredicateColumnType<PredicateEvaluateType<Type>>>(column);
             auto& data_array = nested_col_ptr->get_data();
 
             for (uint16_t i = 0; i < size; i++) {
@@ -630,7 +628,6 @@ private:
             _segment_id_to_value_in_dict_flags;
     T _min_value;
     T _max_value;
-    static constexpr PrimitiveType EvalType = (Type == TYPE_CHAR ? TYPE_STRING : Type);
 
     // temp string for char type column
     std::list<std::string> _temp_datas;
diff --git a/be/src/runtime/primitive_type.h b/be/src/runtime/primitive_type.h
index 4547333389..5af7639290 100644
--- a/be/src/runtime/primitive_type.h
+++ b/be/src/runtime/primitive_type.h
@@ -112,6 +112,9 @@ std::string type_to_odbc_string(PrimitiveType t);
 TTypeDesc gen_type_desc(const TPrimitiveType::type val);
 TTypeDesc gen_type_desc(const TPrimitiveType::type val, const std::string& name);
 
+template <PrimitiveType type>
+constexpr PrimitiveType PredicateEvaluateType = is_string_type(type) ? TYPE_STRING : type;
+
 template <PrimitiveType type>
 struct PrimitiveTypeTraits;
 
diff --git a/regression-test/data/tpcds_sf1_unique_p1/sql/sqlsmith01.out b/regression-test/data/tpcds_sf1_unique_p1/sql/sqlsmith01.out
new file mode 100644
index 0000000000..0eda0eedc9
--- /dev/null
+++ b/regression-test/data/tpcds_sf1_unique_p1/sql/sqlsmith01.out
@@ -0,0 +1,3 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !sqlsmith01 --
+
diff --git a/regression-test/suites/tpcds_sf1_unique_p1/sql/sqlsmith01.sql b/regression-test/suites/tpcds_sf1_unique_p1/sql/sqlsmith01.sql
new file mode 100644
index 0000000000..c537884f00
--- /dev/null
+++ b/regression-test/suites/tpcds_sf1_unique_p1/sql/sqlsmith01.sql
@@ -0,0 +1 @@
+select /*+ SET_VAR(query_timeout = 600) */ ref_1.`i_product_name` as c0, ref_0.`i_category_id` as c1, ref_0.`i_formulation` as c2, ref_0.`i_manager_id` as c3, ref_0.`i_product_name` as c4, ref_1.`i_product_name` as c5, ref_0.`i_size` as c6, avg( cast(42 as int)) over (partition by ref_1.`i_product_name`,ref_1.`i_product_name` order by ref_1.`i_product_name`,ref_1.`i_product_name`) as c7, ref_0.`i_brand` as c8 from regression_test_tpcds_sf1_unique_p1.item as ref_0 inner join regression_te [...]


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 02/12: [fix](schemachange) fix the schema change that causes the be core dump. (#14804)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 9768a4d52ed829f7b43ef68c2d47bdf4f58f96e1
Author: luozenglin <37...@users.noreply.github.com>
AuthorDate: Thu Dec 8 17:36:54 2022 +0800

    [fix](schemachange) fix the schema change that causes the be core dump. (#14804)
    
    * [fix](schemachange) fix the schema change that causes the be core dump.
    
    Forbid schema change to add or modify the key column of the agg model as double or float.
---
 .../apache/doris/alter/SchemaChangeHandler.java    |  5 ++---
 .../org/apache/doris/analysis/AddColumnClause.java | 15 ++++++++++++++-
 .../apache/doris/analysis/AlterTableClause.java    |  6 ++++++
 .../org/apache/doris/analysis/AlterTableStmt.java  |  3 +++
 .../apache/doris/analysis/ModifyColumnClause.java  | 15 ++++++++++++++-
 .../apache/doris/alter/SchemaChangeJobV2Test.java  |  5 +++--
 .../apache/doris/analysis/AddColumnClauseTest.java | 11 ++++++-----
 .../doris/analysis/ModifyColumnClauseTest.java     |  5 +++--
 .../test_agg_keys_schema_change.groovy             | 22 ++++++++++++++++++++++
 9 files changed, 73 insertions(+), 14 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java b/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java
index 39395d0039..a14b03aa31 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java
@@ -492,9 +492,8 @@ public class SchemaChangeHandler extends AlterHandler {
         if (KeysType.AGG_KEYS == olapTable.getKeysType()) {
             if (modColumn.isKey() && null != modColumn.getAggregationType()) {
                 throw new DdlException("Can not assign aggregation method on key column: " + modColumn.getName());
-            } else if (null == modColumn.getAggregationType()) {
-                // in aggregate key table, no aggregation method indicate key column
-                modColumn.setIsKey(true);
+            } else if (!modColumn.isKey() && null == modColumn.getAggregationType()) {
+                throw new DdlException("Aggregate method must be specified for value column: " + modColumn.getName());
             }
         } else if (KeysType.UNIQUE_KEYS == olapTable.getKeysType()) {
             if (null != modColumn.getAggregationType()) {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/AddColumnClause.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/AddColumnClause.java
index 03afe36ed5..2d472cd549 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/AddColumnClause.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/AddColumnClause.java
@@ -19,7 +19,12 @@ package org.apache.doris.analysis;
 
 import org.apache.doris.alter.AlterOpType;
 import org.apache.doris.catalog.Column;
+import org.apache.doris.catalog.Env;
+import org.apache.doris.catalog.KeysType;
+import org.apache.doris.catalog.OlapTable;
+import org.apache.doris.catalog.Table;
 import org.apache.doris.common.AnalysisException;
+import org.apache.doris.common.DdlException;
 import org.apache.doris.common.ErrorCode;
 import org.apache.doris.common.ErrorReport;
 
@@ -64,10 +69,18 @@ public class AddColumnClause extends AlterTableClause {
     }
 
     @Override
-    public void analyze(Analyzer analyzer) throws AnalysisException {
+    public void analyze(Analyzer analyzer) throws AnalysisException, DdlException {
         if (columnDef == null) {
             throw new AnalysisException("No column definition in add column clause.");
         }
+        if (tableName != null) {
+            Table table = Env.getCurrentInternalCatalog().getDbOrDdlException(tableName.getDb())
+                    .getTableOrDdlException(tableName.getTbl());
+            if (table instanceof OlapTable && ((OlapTable) table).getKeysType() == KeysType.AGG_KEYS
+                    && columnDef.getAggregateType() == null) {
+                columnDef.setIsKey(true);
+            }
+        }
         columnDef.analyze(true);
         if (colPos != null) {
             colPos.analyze();
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/AlterTableClause.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/AlterTableClause.java
index 7a223beb6f..ad611bb95a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/AlterTableClause.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/AlterTableClause.java
@@ -29,7 +29,13 @@ public abstract class AlterTableClause extends AlterClause {
     // if set to true, the corresponding table should be stable before processing this operation on it.
     protected boolean needTableStable = true;
 
+    protected TableName tableName;
+
     public boolean isNeedTableStable() {
         return needTableStable;
     }
+
+    public void setTableName(TableName tableName) {
+        this.tableName = tableName;
+    }
 }
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/AlterTableStmt.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/AlterTableStmt.java
index 4435b7e608..4c5bf46e9b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/AlterTableStmt.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/AlterTableStmt.java
@@ -78,6 +78,9 @@ public class AlterTableStmt extends DdlStmt {
             ErrorReport.reportAnalysisException(ErrorCode.ERR_NO_ALTER_OPERATION);
         }
         for (AlterClause op : ops) {
+            if (op instanceof AlterTableClause) {
+                ((AlterTableClause) op).setTableName(tbl);
+            }
             op.analyze(analyzer);
         }
     }
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/ModifyColumnClause.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/ModifyColumnClause.java
index afa369f089..5477614006 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/ModifyColumnClause.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/ModifyColumnClause.java
@@ -19,7 +19,12 @@ package org.apache.doris.analysis;
 
 import org.apache.doris.alter.AlterOpType;
 import org.apache.doris.catalog.Column;
+import org.apache.doris.catalog.Env;
+import org.apache.doris.catalog.KeysType;
+import org.apache.doris.catalog.OlapTable;
+import org.apache.doris.catalog.Table;
 import org.apache.doris.common.AnalysisException;
+import org.apache.doris.common.DdlException;
 
 import com.google.common.base.Strings;
 
@@ -59,10 +64,18 @@ public class ModifyColumnClause extends AlterTableClause {
     }
 
     @Override
-    public void analyze(Analyzer analyzer) throws AnalysisException {
+    public void analyze(Analyzer analyzer) throws AnalysisException, DdlException {
         if (columnDef == null) {
             throw new AnalysisException("No column definition in modify column clause.");
         }
+        if (tableName != null) {
+            Table table = Env.getCurrentInternalCatalog().getDbOrDdlException(tableName.getDb())
+                    .getTableOrDdlException(tableName.getTbl());
+            if (table instanceof OlapTable && ((OlapTable) table).getKeysType() == KeysType.AGG_KEYS
+                    && columnDef.getAggregateType() == null) {
+                columnDef.setIsKey(true);
+            }
+        }
         columnDef.analyze(true);
         if (colPos != null) {
             colPos.analyze();
diff --git a/fe/fe-core/src/test/java/org/apache/doris/alter/SchemaChangeJobV2Test.java b/fe/fe-core/src/test/java/org/apache/doris/alter/SchemaChangeJobV2Test.java
index 323547b494..954bc63706 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/alter/SchemaChangeJobV2Test.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/alter/SchemaChangeJobV2Test.java
@@ -108,8 +108,9 @@ public class SchemaChangeJobV2Test {
     public ExpectedException expectedEx = ExpectedException.none();
 
     @Before
-    public void setUp() throws InstantiationException, IllegalAccessException, IllegalArgumentException,
-            InvocationTargetException, NoSuchMethodException, SecurityException, AnalysisException {
+    public void setUp()
+            throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException,
+            NoSuchMethodException, SecurityException, AnalysisException, DdlException {
         FakeEnv.setMetaVersion(FeMetaVersion.VERSION_CURRENT);
         fakeEditLog = new FakeEditLog();
         fakeEnv = new FakeEnv();
diff --git a/fe/fe-core/src/test/java/org/apache/doris/analysis/AddColumnClauseTest.java b/fe/fe-core/src/test/java/org/apache/doris/analysis/AddColumnClauseTest.java
index 8fabe62850..7a97d702fd 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/analysis/AddColumnClauseTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/analysis/AddColumnClauseTest.java
@@ -22,6 +22,7 @@ import org.apache.doris.catalog.Column;
 import org.apache.doris.catalog.PrimitiveType;
 import org.apache.doris.catalog.ScalarType;
 import org.apache.doris.common.AnalysisException;
+import org.apache.doris.common.DdlException;
 
 import mockit.Expectations;
 import mockit.Mocked;
@@ -41,7 +42,7 @@ public class AddColumnClauseTest {
     }
 
     @Test
-    public void testNormal() throws AnalysisException {
+    public void testNormal() throws AnalysisException, DdlException {
         Column column = new Column("testCol", ScalarType.createType(PrimitiveType.INT));
         new Expectations() {
             {
@@ -91,14 +92,14 @@ public class AddColumnClauseTest {
     }
 
     @Test(expected = AnalysisException.class)
-    public void testNoColDef() throws AnalysisException {
+    public void testNoColDef() throws AnalysisException, DdlException {
         AddColumnClause clause = new AddColumnClause(null, null, null, null);
         clause.analyze(analyzer);
         Assert.fail("No exception throws.");
     }
 
     @Test(expected = AnalysisException.class)
-    public void testNoDefault() throws AnalysisException {
+    public void testNoDefault() throws AnalysisException, DdlException {
         new Expectations() {
             {
                 definition.analyze(true);
@@ -131,7 +132,7 @@ public class AddColumnClauseTest {
     }
 
     @Test(expected = AnalysisException.class)
-    public void testAggPos() throws AnalysisException {
+    public void testAggPos() throws AnalysisException, DdlException {
         new Expectations() {
             {
                 definition.analyze(true);
@@ -164,7 +165,7 @@ public class AddColumnClauseTest {
     }
 
     @Test(expected = AnalysisException.class)
-    public void testAddValueToFirst() throws AnalysisException {
+    public void testAddValueToFirst() throws AnalysisException, DdlException {
         new Expectations() {
             {
                 definition.analyze(true);
diff --git a/fe/fe-core/src/test/java/org/apache/doris/analysis/ModifyColumnClauseTest.java b/fe/fe-core/src/test/java/org/apache/doris/analysis/ModifyColumnClauseTest.java
index cf184d8e80..93119403c3 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/analysis/ModifyColumnClauseTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/analysis/ModifyColumnClauseTest.java
@@ -20,6 +20,7 @@ package org.apache.doris.analysis;
 import org.apache.doris.catalog.Column;
 import org.apache.doris.catalog.PrimitiveType;
 import org.apache.doris.common.AnalysisException;
+import org.apache.doris.common.DdlException;
 
 import mockit.Expectations;
 import mockit.Mocked;
@@ -36,7 +37,7 @@ public class ModifyColumnClauseTest {
     }
 
     @Test
-    public void testNormal(@Mocked ColumnDef definition) throws AnalysisException {
+    public void testNormal(@Mocked ColumnDef definition) throws AnalysisException, DdlException {
         Column column = new Column("tsetCol", PrimitiveType.INT);
         new Expectations() {
             {
@@ -76,7 +77,7 @@ public class ModifyColumnClauseTest {
     }
 
     @Test(expected = AnalysisException.class)
-    public void testNoColDef() throws AnalysisException {
+    public void testNoColDef() throws AnalysisException, DdlException {
         ModifyColumnClause clause = new ModifyColumnClause(null, null, null, null);
         clause.analyze(analyzer);
         Assert.fail("No exception throws.");
diff --git a/regression-test/suites/schema_change_p0/test_agg_keys_schema_change.groovy b/regression-test/suites/schema_change_p0/test_agg_keys_schema_change.groovy
index 20691b3f63..5cf7fd59b5 100644
--- a/regression-test/suites/schema_change_p0/test_agg_keys_schema_change.groovy
+++ b/regression-test/suites/schema_change_p0/test_agg_keys_schema_change.groovy
@@ -122,6 +122,28 @@ suite ("test_agg_keys_schema_change") {
 
         qt_sc """ select count(*) from ${tableName} """
 
+        // test add double or float key column
+        test {
+            sql "ALTER table ${tableName} ADD COLUMN new_key_column_double DOUBLE"
+            exception "Float or double can not used as a key, use decimal instead."
+        }
+
+        test {
+            sql "ALTER table ${tableName} ADD COLUMN new_key_column_float FLOAT"
+            exception "Float or double can not used as a key, use decimal instead."
+        }
+
+        // test modify key column type to double or float
+        test {
+            sql "ALTER table ${tableName} MODIFY COLUMN age FLOAT"
+            exception "Float or double can not used as a key, use decimal instead."
+        }
+
+        test {
+            sql "ALTER table ${tableName} MODIFY COLUMN age DOUBLE"
+            exception "Float or double can not used as a key, use decimal instead."
+        }
+
         // drop key column, not light schema change
         sql """
             ALTER TABLE ${tableName} DROP COLUMN new_key_column


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 03/12: [fix](aggregate) agg table and unique table get different result when… (#14822)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 569e6ed57e395637e530e9b4d5318dbd7cfb4c96
Author: xueweizhang <zx...@163.com>
AuthorDate: Thu Dec 8 22:54:36 2022 +0800

    [fix](aggregate) agg table and unique table get different result when… (#14822)
    
    Signed-off-by: nextdreamblue <zx...@163.com>
---
 be/src/olap/generic_iterators.cpp | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/be/src/olap/generic_iterators.cpp b/be/src/olap/generic_iterators.cpp
index afb752ab04..f8be5dc02b 100644
--- a/be/src/olap/generic_iterators.cpp
+++ b/be/src/olap/generic_iterators.cpp
@@ -263,15 +263,18 @@ private:
             }
 
             // if row cursors equal, compare segment id.
-            // here we sort segment id in reverse order, because of the row order in AGG_KEYS
-            // dose no matter, but in UNIQUE_KEYS table we only read the latest is one, so we
-            // return the row in reverse order of segment id
-            bool result = res == 0 ? lhs->data_id() < rhs->data_id() : res < 0;
+            // when in UNIQUE_KEYS table, we need only read the latest one, so we
+            // return the row in reverse order of segment id.
+            // when in AGG_KEYS table, we return the row in order of segment id, because
+            // we need replace the value with lower segment id by the one with higher segment id when
+            // non-vectorized.
             if (_is_unique) {
+                bool result = res == 0 ? lhs->data_id() < rhs->data_id() : res < 0;
                 result ? lhs->set_skip(true) : rhs->set_skip(true);
+                return result;
             }
 
-            return result;
+            return lhs->data_id() > rhs->data_id();
         }
 
         int _sequence_id_idx;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org