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

[CH] Support bit_get/bit_count function #5636

Merged
merged 1 commit into from
Jul 1, 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
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,13 @@ class GlutenClickHouseTPCHSaltNullParquetSuite extends GlutenClickHouseTPCHAbstr
}
}

test("bit_get/bit_count") {
runQueryAndCompare(
"select bit_count(id), bit_get(id, 0), bit_get(id, 1), bit_get(id, 2), bit_get(id, 3) from range(100)") {
checkGlutenOperatorMatch[ProjectExecTransformer]
}
}

test("test 'EqualNullSafe'") {
runQueryAndCompare("select l_linenumber <=> l_orderkey, l_linenumber <=> null from lineitem") {
checkGlutenOperatorMatch[ProjectExecTransformer]
Expand Down
2 changes: 2 additions & 0 deletions cpp-ch/local-engine/Parser/SerializedPlanParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ static const std::map<std::string, std::string> SCALAR_FUNCTIONS
{"bitwise_and", "bitAnd"},
{"bitwise_or", "bitOr"},
{"bitwise_xor", "bitXor"},
{"bit_get", "bitTest"},
{"bit_count", "bitCount"},
{"sqrt", "sqrt"},
{"cbrt", "cbrt"},
{"degrees", "degrees"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ class ClickHouseTestSettings extends BackendTestSettings {
.exclude("SPARK-28322: IntegralDivide supports decimal type")
.exclude("SPARK-33008: division by zero on divide-like operations returns incorrect result")
.exclude("SPARK-34920: error class")
enableSuite[GlutenBitwiseExpressionsSuite].exclude("BitGet")
enableSuite[GlutenBitwiseExpressionsSuite]
enableSuite[GlutenCastSuite]
.exclude("null cast")
.exclude("cast string to date")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ class ClickHouseTestSettings extends BackendTestSettings {
.exclude("SPARK-36920: Support day-time intervals by ABS")
.exclude("SPARK-36921: Support YearMonthIntervalType by div")
.exclude("SPARK-36921: Support DayTimeIntervalType by div")
enableSuite[GlutenBitwiseExpressionsSuite].exclude("BitGet")
enableSuite[GlutenBitwiseExpressionsSuite]
enableSuite[GlutenCastSuite]
.exclude("null cast")
.exclude("cast string to date")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ class ClickHouseTestSettings extends BackendTestSettings {
.exclude("SPARK-36920: Support day-time intervals by ABS")
.exclude("SPARK-36921: Support YearMonthIntervalType by div")
.exclude("SPARK-36921: Support DayTimeIntervalType by div")
enableSuite[GlutenBitwiseExpressionsSuite].exclude("BitGet")
enableSuite[GlutenBitwiseExpressionsSuite]
enableSuite[GlutenCastSuite]
.exclude("null cast")
.exclude("cast string to date")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ class ClickHouseTestSettings extends BackendTestSettings {
.exclude("SPARK-36920: Support day-time intervals by ABS")
.exclude("SPARK-36921: Support YearMonthIntervalType by div")
.exclude("SPARK-36921: Support DayTimeIntervalType by div")
enableSuite[GlutenBitwiseExpressionsSuite].exclude("BitGet")
enableSuite[GlutenBitwiseExpressionsSuite]
enableSuite[GlutenCastSuite]
.exclude("null cast")
.exclude("cast string to date")
Expand Down
Loading