andygrove commented on code in PR #1799:
URL: https://github.com/apache/datafusion-comet/pull/1799#discussion_r2109498280


##########
spark/src/main/scala/org/apache/comet/rules/CometScanRule.scala:
##########
@@ -118,7 +119,18 @@ case class CometScanRule(session: SparkSession) extends 
Rule[SparkPlan] {
           return withInfos(scanExec, fallbackReasons.toSet)
         }
 
-        val typeChecker = new CometScanTypeChecker(scanImpl)
+        val possibleDefaultValues = 
getExistenceDefaultValues(scanExec.requiredSchema)
+        if (possibleDefaultValues.exists(_ != null && !isInstanceOf[Literal])) 
{

Review Comment:
   I'm not 100% sure this code is correct because `isInstanceOf` doesn't appear 
to be called on `_`? Perhaps we could make this more explicit:
   
   ```suggestion
           if (possibleDefaultValues.exists(d != null && 
!d.isInstanceOf[Literal])) {
   ```



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to