pritampan opened a new pull request, #6843:
URL: https://github.com/apache/iceberg/pull/6843
In case of `Boolean` binding column following expression
`Expressions.convert_string_to_expr("dt='2023-02-13' and is_auth_action=true")`
throwing following error -
``` file_scan_tasks =
list(table.new_scan().filter(Expressions.convert_string_to_expr(partition)).plan_files())
File
"/usr/local/lib/python3.7/dist-packages/iceberg/core/data_table_scan.py", line
72, in plan_files
return super(DataTableScan, self).plan_files()
File
"/usr/local/lib/python3.7/dist-packages/iceberg/core/base_table_scan.py", line
164, in plan_files
return self.plan_files(ops, snapshot, row_filter)
File
"/usr/local/lib/python3.7/dist-packages/iceberg/core/data_table_scan.py", line
74, in plan_files
matching_manifests = [manifest for manifest in snapshot.manifests
File
"/usr/local/lib/python3.7/dist-packages/iceberg/core/data_table_scan.py", line
75, in <listcomp>
if self.cache_loader(manifest.spec_id).eval(manifest)]
File
"/usr/local/lib/python3.7/dist-packages/iceberg/core/data_table_scan.py", line
105, in cache_loader
return InclusiveManifestEvaluator(spec, self.row_filter)
File
"/usr/local/lib/python3.7/dist-packages/iceberg/api/expressions/inclusive_manifest_evaluator.py",
line 35, in __init__
.project(row_filter)),
File
"/usr/local/lib/python3.7/dist-packages/iceberg/api/expressions/projections.py",
line 50, in project
return ExpressionVisitors.visit(ExpressionVisitors.visit(expr,
RewriteNot.get()), self)
File
"/usr/local/lib/python3.7/dist-packages/iceberg/api/expressions/expressions.py",
line 170, in visit
ExpressionVisitors.visit(expr.right, visitor))
File
"/usr/local/lib/python3.7/dist-packages/iceberg/api/expressions/expressions.py",
line 160, in visit
return visitor.predicate(expr)
File
"/usr/local/lib/python3.7/dist-packages/iceberg/api/expressions/projections.py",
line 84, in predicate
return super(InclusiveProjection, self).predicate(pred)
File
"/usr/local/lib/python3.7/dist-packages/iceberg/api/expressions/projections.py",
line 68, in predicate
bound = pred.bind(self.spec.schema.as_struct(),
case_sensitive=self.case_sensitive)
File
"/usr/local/lib/python3.7/dist-packages/iceberg/api/expressions/predicate.py",
line 228, in bind
return self.bind_literal_operation(bound)
File
"/usr/local/lib/python3.7/dist-packages/iceberg/api/expressions/predicate.py",
line 278, in bind_literal_operation
(bound_term.type, self.lit, self.lit.__class__.__name__))
File
"/usr/local/lib/python3.7/dist-packages/iceberg/exceptions/exceptions.py", line
44, in check
raise ValidationException(message, args)
iceberg.exceptions.exceptions.ValidationException: Invalid Value for
conversion to type boolean: "true" (StringLiteral)```
Created the PR to mitigate the issue, this bug is also present in
`pyiceberg` api, I will create separate PR to resolve the same. After the
change tests are passing.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]