[
https://issues.apache.org/jira/browse/ARROW-17994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17616097#comment-17616097
]
Weston Pace commented on ARROW-17994:
-------------------------------------
Duplicate of ARROW-17966?
> [C++] Add overflow argument is required when it shouldn't be
> ------------------------------------------------------------
>
> Key: ARROW-17994
> URL: https://issues.apache.org/jira/browse/ARROW-17994
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Reporter: Will Jones
> Priority: Major
> Labels: acero, substrait
> Fix For: 11.0.0
>
>
> If I pass a substrait plan that contains an add function, but don't provide
> the nullablity argument, I get the following error:
> {code:none}
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "pyarrow/_substrait.pyx", line 140, in pyarrow._substrait.run_query
> File "pyarrow/error.pxi", line 144, in
> pyarrow.lib.pyarrow_internal_check_status
> File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
> pyarrow.lib.ArrowInvalid: Expected Substrait call to have an enum argument at
> index 0 but the argument was not an enum.
> /Users/willjones/Documents/arrows/arrow/cpp/src/arrow/engine/substrait/extension_set.cc:684
> call.GetEnumArg(arg_index)
> /Users/willjones/Documents/arrows/arrow/cpp/src/arrow/engine/substrait/extension_set.cc:702
> ParseEnumArg(call, 0, kOverflowParser)
> /Users/willjones/Documents/arrows/arrow/cpp/src/arrow/engine/substrait/relation_internal.cc:332
> FromProto(expr, ext_set, conversion_options)
> /Users/willjones/Documents/arrows/arrow/cpp/src/arrow/engine/substrait/serde.cc:156
> FromProto(plan_rel.has_root() ? plan_rel.root().input() : plan_rel.rel(),
> ext_set, conversion_options)
> /Users/willjones/Documents/arrows/arrow/cpp/src/arrow/engine/substrait/util.cc:106
> engine::DeserializePlans(substrait_buffer, consumer_factory, registry,
> nullptr, conversion_options_)
> /Users/willjones/Documents/arrows/arrow/cpp/src/arrow/engine/substrait/util.cc:130
> executor.Init(substrait_buffer, registry)
> {code}
> Yet in the spec, this argument is supposed to be optional:
> https://github.com/substrait-io/substrait/blob/f3f6bdc947e689e800279666ff33f118e42d2146/extensions/functions_arithmetic.yaml#L11
> If I modify the plan to include the argument, it works as expected.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)