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

    https://github.com/apache/flink/pull/1821#discussion_r57921166
  
    --- Diff: 
flink-libraries/flink-table/src/test/java/org/apache/flink/api/java/table/test/StringExpressionsITCase.java
 ---
    @@ -121,6 +120,66 @@ public void testNonWorkingSubstring2() throws 
Exception {
                resultSet.collect();
        }
     
    +   @Test
    +   public void testStringConcat() throws Exception {
    +           ExecutionEnvironment env = 
ExecutionEnvironment.getExecutionEnvironment();
    +           TableEnvironment tableEnv = new TableEnvironment();
    +
    +           DataSet<Tuple2<String, Integer>> ds = env.fromElements(
    +                   new Tuple2<>("ABCD", 3),
    +                   new Tuple2<>("ABCD", 2));
    +
    +           Table in = tableEnv.fromDataSet(ds, "a, b");
    +
    +           Table result = in
    +                   .select("a + b + 42");
    --- End diff --
    
    `What happens if you do "42 + a" or even "42 + b + a"?`
    
    Am able to make the above work. 
    
    `a + 42.abs().cast(STRING)`
    
    I think as you said 42.abs() also does not work leave alone the .CAST added 
to it. 
    abs() does not work  because it is not added in the ExpressionParser.scala 
itself. Reading the comment on ImplicitExpressionOperations i can see that the 
expressionDsl.scala and ExpressionParser should be in sync. You want me to add 
support for abs in this patch only? Let me know.


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

Reply via email to