yanghua commented on a change in pull request #6585: 
[FLINK-10172][table]re-adding asc & desc suffix expression to expressionParser
URL: https://github.com/apache/flink/pull/6585#discussion_r212796106
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/ExpressionParser.scala
 ##########
 @@ -324,6 +332,8 @@ object ExpressionParser extends JavaTokenParsers with 
PackratParsers {
     suffixToDate |
     // expression for log
     suffixLog |
+    // expression for ordering
+    suffixAsc | suffixDesc |
 
 Review comment:
   @walterddr when you add the keyword `ASC` and allow it as a suffix, my ASCII 
scalar function test case : 
   
   ```
   testAllApis(
         'f0.ascii(),
         "f0.ascii()",                  //here
         "ASCII(f0)",
         "84")
   ```
   
   will report this error:
   
   ```
   org.apache.flink.table.api.ExpressionParserException: Could not parse 
expression at column 7: string matching regex `(?i)\Qas\E' expected but `i' 
found F0.ascii()
   ```
   
   After commenting `suffixAsc |` , my test case will pass, but your test will 
throw an exception.
   
   I think I should rename `ASCII` to other name, such as `ASICII`?  cc 
@fhueske @twalthr @xccui 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to