Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/3066#discussion_r19721009
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala ---
@@ -146,6 +146,31 @@ package object dsl {
def upper(e: Expression) = Upper(e)
def lower(e: Expression) = Lower(e)
+ /*
+ * Conversions to provide the standard operators in the special case
+ * where a literal is being combined with a symbol. Without these an
+ * expression such as 0 < 'x is not recognized.
+ */
+ implicit class InitialLiteral(x: Any) {
--- End diff --
How about `LhsLiteral` (left hand side literal)? Also, converting `Any` to
this class implicitly seems a bit dangerous. I'd prefer this style:
```scala
case class LhsLiteral(x: Any) {
...
}
// Similar to all the xxToLiteral implicit conversions:
implicit booleanToLhsLiteral(b: Boolean) = new LhsLiteral(b)
implicit byteToLhsLiteral(b: Byte) = new LhsLiteral(b)
...
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]