You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by twalthr <gi...@git.apache.org> on 2016/07/04 15:13:55 UTC

[GitHub] flink pull request #2120: [FLINK-4070] [tableApi] Support literals on left s...

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.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---