Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
Description
If I pass a substrait plan that contains an add function, but don't provide the nullablity argument, I get the following error:
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)
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.