caicancai commented on code in PR #4043:
URL: https://github.com/apache/calcite/pull/4043#discussion_r1852424916


##########
arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowTable.java:
##########
@@ -185,18 +188,24 @@ private static RelDataType deduceRowType(Schema schema,
   }
 
   private static TreeNode makeLiteralNode(String literal, String type) {
-    switch (type) {
-    case "integer":
+    if (type.startsWith("decimal")) {

Review Comment:
   @mihaibudiu @NobiGo Hi !
   In the `ArrowTranslator `class, we will translate the corresponding filter 
conditions according to the logical plan and return a string list, such as 
`decimalField equal 1 decimal(19,0)`. Then I need to parse this string array 
and execute the corresponding arrow API in `ArrowTable`.
   
   Since the parameters I received in `ArrowTable` are already string arrays, I 
can only process strings, which is why the parameters of `makeLiteralNode` are 
all strings.
   
   Of course. the method mentioned by @NobiGo seems to be achievable, but I am 
not sure whether it should be implemented in the PR. I have already recorded a 
[jira](https://issues.apache.org/jira/browse/CALCITE-6701) case based on this 
optimization.
   



-- 
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]

Reply via email to