-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-41692: [Python] Improve substrait extended expressions support #41693
base: main
Are you sure you want to change the base?
Conversation
|
@@ -56,7 +56,7 @@ Status ParseFromBufferImpl(const Buffer& buf, const std::string& full_name, | |||
if (message->ParseFromZeroCopyStream(&buf_stream)) { | |||
return Status::OK(); | |||
} | |||
return Status::IOError("ParseFromZeroCopyStream failed for ", full_name); | |||
return Status::Invalid("ParseFromZeroCopyStream failed for ", full_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seemed odd that it failed with an IOError
given that the ArrayInputStream
was built from already in-memory Buffer, so no IO
was involved. If it fails, it actually means that the Substrait data is invalid
Marking as ready for review as the failures seem to be unrelated, @jorisvandenbossche would you mind reviewing this when you have the chance? |
Addresses some missing features and usability issues when using PyArrow with Substrait ExtendedExpressions
BoundExpressions
forScanner(columns=X)
instead of a dict of expressions.BoundExpressions
forScanner(filter=X)
so that user doesn't have to distinguish betweenExpression
andBoundExpressions
and can always just usepyarrow.substrait.deserialize_expressions
pyarrow.BoundExpressions
directly fromprotobuf.Message
, thus allowing to use substrait-python objects.memoryview
from methods encoding substrait, so that those can be directly passed to substrait-python (or more in general other python libraries) without a copy being involved.memoryview
so that the output of encoding functions can be sent back to dencoding functions.