Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLUTEN-1632][CH]Daily Update Clickhouse Version (20240817) #6903

Merged
merged 2 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp-ch/clickhouse.version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CH_ORG=Kyligence
CH_BRANCH=rebase_ch/20240815
CH_COMMIT=d87dbba64fc
CH_BRANCH=rebase_ch/20240817
CH_COMMIT=ed191291681
Binary file added cpp-ch/local-engine/tests/data/68131.parquet
Binary file not shown.
24 changes: 22 additions & 2 deletions cpp-ch/local-engine/tests/gtest_clickhouse_pr_verify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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":[{}]}]})";
Expand Down Expand Up @@ -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();
Expand Down
95 changes: 95 additions & 0 deletions cpp-ch/local-engine/tests/json/clickhouse_pr_68131.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
]
}
Loading