This is an automated email from the ASF dual-hosted git repository.
changchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 9fcd4885c [GLUTEN-1632][CH]Daily Update Clickhouse Version (20240817)
(#6903)
9fcd4885c is described below
commit 9fcd4885c729c443e1d433d365f927f610a22f0f
Author: Kyligence Git <[email protected]>
AuthorDate: Sat Aug 17 10:16:22 2024 -0500
[GLUTEN-1632][CH]Daily Update Clickhouse Version (20240817) (#6903)
* [GLUTEN-1632][CH]Daily Update Clickhouse Version (20240817)
* Add ut for https://github.com/ClickHouse/ClickHouse/pull/68131
> Refer https://github.com/ClickHouse/ClickHouse/pull/68494
(cherry picked from commit 9ec7071c3a0b00038989bdad0891842472d13098)
---------
Co-authored-by: kyligence-git <[email protected]>
Co-authored-by: Chang Chen <[email protected]>
---
cpp-ch/clickhouse.version | 4 +-
cpp-ch/local-engine/tests/data/68131.parquet | Bin 0 -> 289 bytes
.../tests/gtest_clickhouse_pr_verify.cpp | 24 +++++-
.../tests/json/clickhouse_pr_68131.json | 95 +++++++++++++++++++++
4 files changed, 119 insertions(+), 4 deletions(-)
diff --git a/cpp-ch/clickhouse.version b/cpp-ch/clickhouse.version
index 7c93bc124..d41875c54 100644
--- a/cpp-ch/clickhouse.version
+++ b/cpp-ch/clickhouse.version
@@ -1,3 +1,3 @@
CH_ORG=Kyligence
-CH_BRANCH=rebase_ch/20240815
-CH_COMMIT=d87dbba64fc
+CH_BRANCH=rebase_ch/20240817
+CH_COMMIT=ed191291681
diff --git a/cpp-ch/local-engine/tests/data/68131.parquet
b/cpp-ch/local-engine/tests/data/68131.parquet
new file mode 100644
index 000000000..169f61520
Binary files /dev/null and b/cpp-ch/local-engine/tests/data/68131.parquet differ
diff --git a/cpp-ch/local-engine/tests/gtest_clickhouse_pr_verify.cpp
b/cpp-ch/local-engine/tests/gtest_clickhouse_pr_verify.cpp
index 9e4165d90..5b5797ed7 100644
--- a/cpp-ch/local-engine/tests/gtest_clickhouse_pr_verify.cpp
+++ b/cpp-ch/local-engine/tests/gtest_clickhouse_pr_verify.cpp
@@ -34,8 +34,8 @@ TEST(Clickhouse, PR54881)
{
const auto context1 =
DB::Context::createCopy(SerializedPlanParser::global_context);
// context1->setSetting("enable_named_columns_in_function_tuple",
DB::Field(true));
- auto settingxs = context1->getSettingsRef();
- EXPECT_FALSE(settingxs.enable_named_columns_in_function_tuple) << "GLUTEN
NEED set enable_named_columns_in_function_tuple to false";
+ auto settings = context1->getSettingsRef();
+ EXPECT_FALSE(settings.enable_named_columns_in_function_tuple) << "GLUTEN
NEED set enable_named_columns_in_function_tuple to false";
const std::string split_template
=
R"({"items":[{"uriFile":"{replace_local_files}","partitionIndex":"0","length":"1529","parquet":{},"schema":{},"metadataColumns":[{}]}]})";
@@ -112,6 +112,26 @@ TEST(Clickhouse, PR68135)
const auto plan = local_engine::JsonStringToMessage<substrait::Plan>(
{reinterpret_cast<const char *>(gresource_embedded_pr_68135_jsonData),
gresource_embedded_pr_68135_jsonSize});
+ auto local_executor = parser.createExecutor(plan);
+ EXPECT_TRUE(local_executor->hasNext());
+ const Block & x = *local_executor->nextColumnar();
+ debug::headBlock(x);
+}
+
+INCBIN(resource_embedded_pr_68131_json, SOURCE_DIR
"/utils/extern-local-engine/tests/json/clickhouse_pr_68131.json");
+TEST(Clickhouse, PR68131)
+{
+ const std::string split_template
+ =
R"({"items":[{"uriFile":"{replace_local_files}","partitionIndex":"0","length":"289","parquet":{},"schema":{},"metadataColumns":[{}]}]})";
+ const std::string split
+ = replaceLocalFilesWildcards(split_template,
GLUTEN_DATA_DIR("/utils/extern-local-engine/tests/data/68131.parquet"));
+
+ SerializedPlanParser parser(SerializedPlanParser::global_context);
+
parser.addSplitInfo(local_engine::JsonStringToBinary<substrait::ReadRel::LocalFiles>(split));
+
+ const auto plan = local_engine::JsonStringToMessage<substrait::Plan>(
+ {reinterpret_cast<const char *>(gresource_embedded_pr_68131_jsonData),
gresource_embedded_pr_68131_jsonSize});
+
auto local_executor = parser.createExecutor(plan);
EXPECT_TRUE(local_executor->hasNext());
const Block & x = *local_executor->nextColumnar();
diff --git a/cpp-ch/local-engine/tests/json/clickhouse_pr_68131.json
b/cpp-ch/local-engine/tests/json/clickhouse_pr_68131.json
new file mode 100644
index 000000000..0add2092b
--- /dev/null
+++ b/cpp-ch/local-engine/tests/json/clickhouse_pr_68131.json
@@ -0,0 +1,95 @@
+{
+ "extensions": [
+ {
+ "extensionFunction": {
+ "name": "is_not_null:list<i32>"
+ }
+ }
+ ],
+ "relations": [
+ {
+ "root": {
+ "input": {
+ "filter": {
+ "common": {
+ "direct": {}
+ },
+ "input": {
+ "read": {
+ "common": {
+ "direct": {}
+ },
+ "baseSchema": {
+ "names": [
+ "f"
+ ],
+ "struct": {
+ "types": [
+ {
+ "list": {
+ "type": {
+ "i32": {
+ "nullability": "NULLABILITY_NULLABLE"
+ }
+ },
+ "nullability": "NULLABILITY_NULLABLE"
+ }
+ }
+ ]
+ },
+ "columnTypes": [
+ "NORMAL_COL"
+ ]
+ },
+ "advancedExtension": {
+ "optimization": {
+ "@type": "type.googleapis.com/google.protobuf.StringValue",
+ "value": "isMergeTree=0\n"
+ }
+ }
+ }
+ },
+ "condition": {
+ "scalarFunction": {
+ "outputType": {
+ "bool": {
+ "nullability": "NULLABILITY_REQUIRED"
+ }
+ },
+ "arguments": [
+ {
+ "value": {
+ "selection": {
+ "directReference": {
+ "structField": {}
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "names": [
+ "f#0"
+ ],
+ "outputSchema": {
+ "types": [
+ {
+ "list": {
+ "type": {
+ "i32": {
+ "nullability": "NULLABILITY_NULLABLE"
+ }
+ },
+ "nullability": "NULLABILITY_REQUIRED"
+ }
+ }
+ ],
+ "nullability": "NULLABILITY_REQUIRED"
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]