[ 
https://issues.apache.org/jira/browse/FLINK-4070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15361440#comment-15361440
 ] 

ASF GitHub Bot commented on FLINK-4070:
---------------------------------------

Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2120#discussion_r69470601
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/expressions/Expression.scala
 ---
    @@ -54,6 +54,12 @@ abstract class Expression extends TreeNode[Expression] {
           s"${this.getClass.getName} cannot be transformed to RexNode"
         )
     
    +  /**
    +    * To support literals on left side of binary expressions, i.e. 
12.toExpr % 'a
    +    * @return
    +    */
    +  def toExpr: Expression = this
    +
    --- End diff --
    
    This should not be put here but in `expressionDsl.scala`.
    Btw. I recognized that there is already a function that does exactly what 
we want. It is called `expr` in `expressionDsl.scala`. You can rename it.


> Support literals on left side of binary expressions
> ---------------------------------------------------
>
>                 Key: FLINK-4070
>                 URL: https://issues.apache.org/jira/browse/FLINK-4070
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>            Reporter: Timo Walther
>            Assignee: Jark Wu
>            Priority: Minor
>
> The Table API does not support binary expressions like {{12 < 'f0}} in Scala 
> DSL where the left side is a literal. Maybe this can be solved by implicits 
> or at least by a {{12.toExpr}} method.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to