huaxingao commented on code in PR #36330:
URL: https://github.com/apache/spark/pull/36330#discussion_r868803520


##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/H2Dialect.scala:
##########
@@ -41,6 +41,11 @@ private object H2Dialect extends JdbcDialect {
         case _ => super.visitSQLFunction(funcName, inputs)
       }
     }
+
+    override def visitOverlay(inputs: Array[String]): String = {
+      val functionInfo = super.visitOverlay(inputs)
+      throw QueryCompilationErrors.noSuchFunctionError("H2", functionInfo)

Review Comment:
   I don't have any good ideas for this. 
   I guess if we want to stick to the current policy of pushing down SQL 
standard functions by default, then we probably need to turn off pushing  down 
a specific function in all the databases that don't support it. For example, in 
addition to turn off pushing down  `overlay` in H2, we probably should also 
turn off push down `overlay` in MySQL, TeraData, SqlServer. But if anybody 
happens to use `overlay` in SQLite, this still seems to be a breaking change to 
me because the `overlay` function used to work doesn't work any more.
   Probably the policy should be by default, we push down the SQL standard 
functions that are supported by all the major databases?



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