You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/01/11 16:17:01 UTC

[GitHub] [iceberg] puchengy commented on a change in pull request #3875: [python legacy] Stripping quotes in convert_string_to_expr() when predicate value is a string type

puchengy commented on a change in pull request #3875:
URL: https://github.com/apache/iceberg/pull/3875#discussion_r782307931



##########
File path: python_legacy/iceberg/api/expressions/expression_parser.py
##########
@@ -143,8 +143,10 @@ def get_expr(node, expr_map):
         return mapped_op(*get_expr(node[op], expr_map))
     elif isinstance(node, (list, tuple)):
         return (get_expr(item, expr_map) for item in node)
-    elif isinstance(node, (str, int, float)):
+    elif isinstance(node, (int, float)):
         return node
+    elif isinstance(node, str):
+        return node.strip("'").strip('"')

Review comment:
       I might need to double check on cases such as `"'abc"`




-- 
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: issues-unsubscribe@iceberg.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org