felixloesing commented on code in PR #12279:
URL: https://github.com/apache/gluten/pull/12279#discussion_r3399827461


##########
gluten-ut/spark33/src/test/scala/org/apache/spark/sql/gluten/GlutenFallbackSuite.scala:
##########
@@ -59,6 +60,22 @@ class GlutenFallbackSuite extends GlutenSQLTestsTrait with 
AdaptiveSparkPlanHelp
     }
   }
 
+  testGluten("fail job on fallback when failOnFallback is enabled") {
+    withTable("t") {
+      spark.range(10).write.format("parquet").saveAsTable("t")
+      withSQLConf(GlutenConfig.COLUMNAR_FILESCAN_ENABLED.key -> "false") {
+        // Default failOnFallback=false: same fallback should not throw.
+        sql("SELECT * FROM t").collect()
+        withSQLConf(GlutenConfig.FALLBACK_FAIL_ON_FALLBACK.key -> "true") {
+          val ex = intercept[GlutenException] {
+            sql("SELECT * FROM t").collect()
+          }
+          
assert(ex.getMessage.contains(GlutenConfig.FALLBACK_FAIL_ON_FALLBACK.key))
+        }
+      }
+    }
+  }

Review Comment:
   Thanks, @philo-he for your quick review! I addressed both of your comments. 
Please take another look.



-- 
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]

Reply via email to