Skip to content

Commit

Permalink
Revert "[GLUTEN-8080][CH]Support function transform_keys/transform_va…
Browse files Browse the repository at this point in the history
…lues (#8…" (#8121)

This reverts commit d75e90f.
  • Loading branch information
taiyang-li authored Dec 2, 2024
1 parent d75e90f commit fedbc72
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 120 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ object CHExpressionUtil {
TO_UTC_TIMESTAMP -> UtcTimestampValidator(),
FROM_UTC_TIMESTAMP -> UtcTimestampValidator(),
STACK -> DefaultValidator(),
TRANSFORM_KEYS -> DefaultValidator(),
TRANSFORM_VALUES -> DefaultValidator(),
RAISE_ERROR -> DefaultValidator(),
WIDTH_BUCKET -> DefaultValidator()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,16 +860,4 @@ class GlutenFunctionValidateSuite extends GlutenClickHouseWholeStageTransformerS
val sql = "select cast(id % 2 = 1 as string) from range(10)"
compareResultsAgainstVanillaSpark(sql, true, { _ => })
}

test("Test transform_keys/transform_values") {
val sql = """
|select
| transform_keys(map_from_arrays(array(id+1, id+2, id+3),
| array(1, id+2, 3)), (k, v) -> k + 1),
| transform_values(map_from_arrays(array(id+1, id+2, id+3),
| array(1, id+2, 3)), (k, v) -> v + 1)
|from range(10)
|""".stripMargin
compareResultsAgainstVanillaSpark(sql, true, { _ => })
}
}
2 changes: 2 additions & 0 deletions cpp-ch/local-engine/Parser/FunctionParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ FunctionParserPtr FunctionParserFactory::get(const String & name, ParserContextP
{
auto res = tryGet(name, ctx);
if (!res)
{
throw Exception(ErrorCodes::UNKNOWN_FUNCTION, "Unknown function parser {}", name);
}

return res;
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,6 @@ class ClickHouseTestSettings extends BackendTestSettings {
.exclude("aggregate function - array for non-primitive type")
.exclude("SPARK-14393: values generated by non-deterministic functions shouldn't change after coalesce or union")
.exclude("SPARK-24734: Fix containsNull of Concat for array type")
.exclude("transform keys function - primitive data types")
.exclude("transform keys function - Invalid lambda functions and exceptions")
.exclude("transform values function - test primitive data types")
.exclude("transform values function - test empty")
enableSuite[GlutenDataFrameHintSuite]
enableSuite[GlutenDataFrameImplicitsSuite]
enableSuite[GlutenDataFrameJoinSuite].exclude(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,6 @@ class ClickHouseTestSettings extends BackendTestSettings {
.exclude("aggregate function - array for non-primitive type")
.exclude("SPARK-14393: values generated by non-deterministic functions shouldn't change after coalesce or union")
.exclude("SPARK-24734: Fix containsNull of Concat for array type")
.exclude("transform keys function - primitive data types")
.exclude("transform keys function - Invalid lambda functions and exceptions")
.exclude("transform values function - test primitive data types")
.exclude("transform values function - test empty")
enableSuite[GlutenDataFrameHintSuite]
enableSuite[GlutenDataFrameImplicitsSuite]
enableSuite[GlutenDataFrameJoinSuite].exclude(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,6 @@ class ClickHouseTestSettings extends BackendTestSettings {
.exclude("aggregate function - array for non-primitive type")
.exclude("SPARK-14393: values generated by non-deterministic functions shouldn't change after coalesce or union")
.exclude("SPARK-24734: Fix containsNull of Concat for array type")
.exclude("transform keys function - primitive data types")
.exclude("transform keys function - Invalid lambda functions and exceptions")
.exclude("transform values function - test primitive data types")
.exclude("transform values function - test empty")
enableSuite[GlutenDataFrameHintSuite]
enableSuite[GlutenDataFrameImplicitsSuite]
enableSuite[GlutenDataFrameJoinSuite].exclude(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,6 @@ class ClickHouseTestSettings extends BackendTestSettings {
.exclude("aggregate function - array for non-primitive type")
.exclude("SPARK-14393: values generated by non-deterministic functions shouldn't change after coalesce or union")
.exclude("SPARK-24734: Fix containsNull of Concat for array type")
.exclude("transform keys function - primitive data types")
.exclude("transform keys function - Invalid lambda functions and exceptions")
.exclude("transform values function - test primitive data types")
.exclude("transform values function - test empty")
enableSuite[GlutenDataFrameHintSuite]
enableSuite[GlutenDataFrameImplicitsSuite]
enableSuite[GlutenDataFrameJoinSuite].exclude(
Expand Down

0 comments on commit fedbc72

Please sign in to comment.