From 15d1a5d5469e5230830aea916e23b8732715855f Mon Sep 17 00:00:00 2001 From: taiyang-li <654010905@qq.com> Date: Thu, 11 Jul 2024 16:43:32 +0800 Subject: [PATCH] fix failed uts --- .../scala/org/apache/gluten/utils/CHExpressionUtil.scala | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/backends-clickhouse/src/main/scala/org/apache/gluten/utils/CHExpressionUtil.scala b/backends-clickhouse/src/main/scala/org/apache/gluten/utils/CHExpressionUtil.scala index 2b7e1e57da03..22e86fc2468b 100644 --- a/backends-clickhouse/src/main/scala/org/apache/gluten/utils/CHExpressionUtil.scala +++ b/backends-clickhouse/src/main/scala/org/apache/gluten/utils/CHExpressionUtil.scala @@ -169,17 +169,13 @@ case class ArrayJoinValidator() extends FunctionValidator { case class PercentileValidator() extends FunctionValidator { override def doValidate(expr: Expression): Boolean = { + // Currently clickhouse backend doesn't support quantileExact with frequency argument + // unless frequencyExpression is literal val freqExpr = expr.asInstanceOf[Percentile].frequencyExpression if (!freqExpr.isInstanceOf[Literal]) { return false } - // Currently clickhouse backend doesn't support quantileExact with frequency argument - val freqLiteral = freqExpr.asInstanceOf[Literal] - if (freqLiteral.value.asInstanceOf[Int] != 1) { - return false - } - true } }