haruki-830 commented on PR #4482: URL: https://github.com/apache/flink-cdc/pull/4482#issuecomment-5091010527
> > > rvalue.toString() is for debugging purposes only and may not generate Java code with correct parentheses. > > For example, SQL statement (a - b) / (c + 1) will be converted to a - b / c + 1. > > Seems this is an existing bug, not introduced by changes in this PR. Could you please investigate this later? Thanks for pointing out this bug! I confirmed that `BinaryOperation.toString()` does lose parentheses when a sub-expression has lower precedence than its parent operator. This affects the existing `translateSqlNodeToJaninoExpression` path as well. I'll open a separate PR to fix it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
