haruki-830 commented on code in PR #4503:
URL: https://github.com/apache/flink-cdc/pull/4503#discussion_r3772145146
##########
flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/parser/TransformParser.java:
##########
@@ -575,6 +606,22 @@ public static String
translateFilterExpressionToJaninoExpression(
List<UserDefinedFunctionDescriptor> udfDescriptors,
SupportedMetadataColumn[] supportedMetadataColumns,
Map<String, String> columnNameMap) {
+ return translateFilterExpressionToJaninoExpression(
+ filterExpression,
+ columns,
+ udfDescriptors,
+ supportedMetadataColumns,
+ columnNameMap,
+ DecimalPrecisionMode.UP_TO_19);
+ }
+
+ public static String translateFilterExpressionToJaninoExpression(
+ String filterExpression,
+ List<Column> columns,
+ List<UserDefinedFunctionDescriptor> udfDescriptors,
+ SupportedMetadataColumn[] supportedMetadataColumns,
+ Map<String, String> columnNameMap,
+ DecimalPrecisionMode decimalPrecisionMode) {
if (isNullOrWhitespaceOnly(filterExpression)) {
return "";
}
Review Comment:
I verified this path with DECIMAL arithmetic exceeding 19 digits. Filter
expressions ultimately produce BOOLEAN, and both precision modes generate the
same Janino expression. The arithmetic is evaluated using BigDecimal and no
inferred DECIMAL result type is materialized or converted in the filter path.
The mode-dependent precision difference applies to projection result type
inference, which is covered by
`testGenerateProjectionColumnsWithDecimalPrecisionMode` and the runtime
projection tests. Therefore, I don't think an additional mode-specific filter
translation test is necessary for this change.
--
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]