Skip to content

Commit

Permalink
refactor test
Browse files Browse the repository at this point in the history
  • Loading branch information
baibaichen committed Jun 21, 2024
1 parent 23d9599 commit 227fa58
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions cpp-ch/local-engine/tests/gtest_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ std::string splitBinaryFromJson(const std::string & json)
return binary;
}

TEST(SerializedPlanParser, CLICKHOUSE_65234)
std::string JsonPlanFor65234()
{
String json = R"(
// Plan for https://github.com/ClickHouse/ClickHouse/pull/65234
return R"(
{
"extensions": [{
"extensionFunction": {
Expand Down Expand Up @@ -307,9 +308,13 @@ TEST(SerializedPlanParser, CLICKHOUSE_65234)
}]
}
)";
std::string split
= R"({"items":[{"uriFile":"file:///home/chang/SourceCode/rebase_gluten/backends-clickhouse/target/scala-2.12/test-classes/tests-working-home/tpch-data/supplier/part-00000-16caa751-9774-470c-bd37-5c84c53373c8-c000.snappy.parquet","length":"84633","parquet":{},"schema":{},"metadataColumns":[{}]}]}")";
}

TEST(SerializedPlanParser, PR65234)
{
const std::string split
= R"({"items":[{"uriFile":"file:///part-00000-16caa751-9774-470c-bd37-5c84c53373c8-c000.snappy.parquet","length":"84633","parquet":{},"schema":{},"metadataColumns":[{}]}]}")";
SerializedPlanParser parser(SerializedPlanParser::global_context);
parser.addSplitInfo(splitBinaryFromJson(split));
parser.parseJson(json);
parser.parseJson(JsonPlanFor65234());
}

0 comments on commit 227fa58

Please sign in to comment.