Skip to content

Commit d474b46

Browse files
committed
fix: keep ArrayInsertUnsupportedArgs fallback and quiet codegen log
Disable UDF codegen dispatch within the ArrayInsertUnsupportedArgs test so the UDF-derived position stays non-convertible and continues to exercise the ArrayInsert fallback path. With codegen now enabled by default, the UDF was converted to proto, making ArrayInsert fully native and removing the expected fallback reason. Drop the per-compile log in CometBatchKernelCodegen from info to debug now that codegen dispatch is on by default and the message would otherwise be noisy.
1 parent 1f5de3e commit d474b46

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

spark/src/main/scala/org/apache/comet/codegen/CometBatchKernelCodegen.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ object CometBatchKernelCodegen extends Logging with CometExprTraitShim {
199199
t)
200200
throw t
201201
}
202-
logInfo(
202+
logDebug(
203203
s"CometBatchKernelCodegen: compiled ${boundExpr.getClass.getSimpleName} " +
204204
s"-> ${boundExpr.dataType} inputs=" +
205205
inputSchema

spark/src/test/scala/org/apache/comet/CometArrayExpressionSuite.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,11 @@ class CometArrayExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelp
236236
test("ArrayInsertUnsupportedArgs") {
237237
// This test checks that the else branch in ArrayInsert
238238
// mapping to the comet is valid and fallback to spark is working fine.
239-
withSQLConf(CometConf.getExprAllowIncompatConfigKey(classOf[ArrayInsert]) -> "true") {
239+
// Disable UDF codegen dispatch so the UDF-derived position remains
240+
// non-convertible and forces the ArrayInsert fallback path.
241+
withSQLConf(
242+
CometConf.COMET_SCALA_UDF_CODEGEN_ENABLED.key -> "false",
243+
CometConf.getExprAllowIncompatConfigKey(classOf[ArrayInsert]) -> "true") {
240244
withTempDir { dir =>
241245
val path = new Path(dir.toURI.toString, "test.parquet")
242246
makeParquetFileAllPrimitiveTypes(path, dictionaryEnabled = false, 10000)

0 commit comments

Comments
 (0)