You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@bahir.apache.org by GitBox <gi...@apache.org> on 2023/01/05 10:06:37 UTC

[GitHub] [bahir-flink] thebalu commented on a diff in pull request #161: [BAHIR-321] Make KuduFilterInfo handle String literals

thebalu commented on code in PR #161:
URL: https://github.com/apache/bahir-flink/pull/161#discussion_r1062304376


##########
flink-connector-kudu/src/main/java/org/apache/flink/connectors/kudu/connector/KuduFilterInfo.java:
##########
@@ -65,7 +65,7 @@ private KuduPredicate predicateComparator(ColumnSchema column) {
 
         switch (column.getType()) {
             case STRING:
-                predicate = KuduPredicate.newComparisonPredicate(column, comparison, (String) this.value);
+                predicate = KuduPredicate.newComparisonPredicate(column, comparison, String.valueOf(this.value));

Review Comment:
   Good point, I've updated it as suggested.
   I'm not sure if such a case is possible, as there is some type checking done at earlier points as well, so only String-like types will be able to get to this point; but I haven't looked too much into it yet. So I agree that the minimal change is the safer/better solution here.



-- 
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: reviews-unsubscribe@bahir.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org