stefanbuk-db commented on code in PR #46231:
URL: https://github.com/apache/spark/pull/46231#discussion_r1582716492
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/MsSqlServerDialect.scala:
##########
@@ -92,6 +92,7 @@ private case class MsSqlServerDialect() extends JdbcDialect {
case o => inputToSQL(o)
}
visitBinaryComparison(e.name(), l, r)
+ case "CASE_WHEN" =>
super.visitCaseWhen(expressionsToStringArray(e.children())) + " = 1"
Review Comment:
Problem with that is, we don't want to add this every time. We only do this
when "CASE_WHEN" is Predicate. There are cases when "CASE_WHEN" is a
ScalarExpression here, but not Predicate. So, adding this every time in
visitCaseWhen would break every case when "CASE_WHEN" is not visited as a
Predicate.
--
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]