pnowojski commented on a change in pull request #6787: [FLINK-8577][table] 
Implement proctime DataStream to Table upsert conversion
URL: https://github.com/apache/flink/pull/6787#discussion_r236606505
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/ExpressionParser.scala
 ##########
 @@ -535,6 +536,13 @@ object ExpressionParser extends JavaTokenParsers with 
PackratParsers {
       case f ~ _ ~ _ => RowtimeAttribute(f)
     }
 
+  // key
+
+  lazy val key: PackratParser[Expression] =
+    (aliasMapping | "(" ~> aliasMapping <~ ")" | fieldReference) ~ "." ~ KEY 
^^ {
 
 Review comment:
   Yes, I meant that this `(aliasMapping | "(" ~> aliasMapping <~ ")" | 
fieldReference)` is duplicated couple of times here. If it is possible to 
deduplicate it to:
   ```
   lazy val aliasOrFieldReference = aliasMapping | "(" ~> aliasMapping <~ ")" | 
fieldReference
   ```
   I think it would be better to do so.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to