rui-mo commented on code in PR #5954:
URL: https://github.com/apache/incubator-gluten/pull/5954#discussion_r1650972056
##########
backends-velox/src/test/scala/org/apache/gluten/execution/VeloxScanSuite.scala:
##########
@@ -74,4 +77,34 @@ class VeloxScanSuite extends VeloxWholeStageTransformerSuite
{
}
}
}
+
+ test("unsupported data type scan filter pushdown") {
+ withTempView("t") {
+ withTempDir {
+ dir =>
+ val path = dir.getAbsolutePath
+ val schema = StructType(
+ Array(
+ StructField("short_decimal_field", DecimalType(5, 2), true),
+ StructField("long_decimal_field", DecimalType(32, 8), true),
+ StructField("binary_field", BinaryType, true),
+ StructField("timestamp_field", TimestampType, true)
+ ))
+ RandomParquetDataGenerator(0).generateRandomData(spark, schema, 10,
Some(path))
+ spark.catalog.createTable("t", path, "parquet")
+ runQueryAndCompare(
+ """select * from t where long_decimal_field = 3.14""".stripMargin
+ )(checkGlutenOperatorMatch[FileSourceScanExecTransformer])
+ runQueryAndCompare(
+ """select * from t where short_decimal_field = 3.14""".stripMargin
+ )(checkGlutenOperatorMatch[FileSourceScanExecTransformer])
+ runQueryAndCompare(
+ """select * from t where binary_field = '3.14'""".stripMargin
+ )(checkGlutenOperatorMatch[FileSourceScanExecTransformer])
+ runQueryAndCompare(
+ """select * from t where timestamp_field =
current_timestamp()""".stripMargin
Review Comment:
We have made some updates on the timestamp support. Could you help check if
the pushdown of timestamp is supported?
##########
cpp/velox/substrait/SubstraitToVeloxPlan.h:
##########
@@ -468,6 +468,13 @@ class SubstraitToVeloxPlanConverter {
/// 'or' expression are effective on the same column.
static bool childrenFunctionsOnSameField(const
::substrait::Expression_ScalarFunction& function);
+ /// Check whether the data type is supported to pushdown.
+ static bool isPushdownSupported(TypePtr inputType);
+ /// Check whether the scalar function contains data type that doesn't to
pushdown.
Review Comment:
nit: add one empty line above for readability.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]