Skip to content
Open
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 @@ -192,7 +192,6 @@ object CHExpressionUtil {
URL_DECODE -> DefaultValidator(),
URL_ENCODE -> DefaultValidator(),
FORMAT_STRING -> FormatStringValidator(),
SKEWNESS -> DefaultValidator(),
MAKE_YM_INTERVAL -> DefaultValidator(),
MAP_ZIP_WITH -> DefaultValidator(),
KURTOSIS -> DefaultValidator(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ class GlutenClickhouseCountDistinctSuite extends GlutenClickHouseWholeStageTrans
// skewness agg is not supported, will cause fallback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls remove this comment

val sql = "select count(distinct(a,b)) , skewness(b) from " +
"values (0, null,1), (0,null,1), (1, 1,1), (2, 2, 1) ,(2,2,2),(3,3,3) as data(a,b,c)"
assertThrows[UnsupportedOperationException] {
spark.sql(sql).show
}
compareResultsAgainstVanillaSpark(sql, true, { _ => })

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

besides, pls make sure skewness related uts in spark are enabled in gluten + CH


}

test("check count distinct with expr fallback") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,14 @@ class AggregateFunctionParserStddev final : public AggregateFunctionParser
return func_node;
}
};
// for skewness
struct SkewnessNameStruct
{
static constexpr auto spark_name = "skewness";
static constexpr auto ch_name = "skewSamp";
};

static const AggregateFunctionParserRegister<AggregateFunctionParserStddev<SkewnessNameStruct>> registerer_skewness;
Comment on lines +66 to +73
static const AggregateFunctionParserRegister<AggregateFunctionParserStddev<StddevNameStruct>> registerer_stddev;
static const AggregateFunctionParserRegister<AggregateFunctionParserStddev<StddevSampNameStruct>> registerer_stddev_samp;
}
Loading