Commits


Dewey Dunnington authored and David Li committed b2853507363
ARROW-16152: [C++] Fix segfault with unknown functions in Substrait Revised from #12828 with proper JIRA and unit test! Reprex (after the change in this PR...before this change it segfaults): ``` r arrow:::do_exec_plan_substrait(' { "extensionUris": [ { "extensionUriAnchor": 1 } ], "extensions": [ { "extensionFunction": { "extensionUriReference": 1, "functionAnchor": 2, "name": "abs_checked" } } ], "relations": [ { "rel": { "project": { "input": { "read": { "baseSchema": { "names": [ "letter", "number" ], "struct": { "types": [ { "string": { } }, { "i32": { } } ] } }, "namedTable": { "names": [ "named_table_1" ] } } }, "expressions": [ { "scalarFunction": { "functionReference": 2, "args": [ { "selection": { "directReference": { "structField": { "field": 1 } } } } ], "outputType": { } } } ] } } } ] } ') #> Error: Invalid: Uri was referenced by an extension but was not declared in the ExtensionSet. #> /Users/deweydunnington/Desktop/rscratch/arrow/cpp/src/arrow/engine/substrait/extension_set.cc:161 set.impl_->CheckHasUri(function_ids[i].uri) #> /Users/deweydunnington/Desktop/rscratch/arrow/cpp/src/arrow/engine/substrait/serde.cc:66 GetExtensionSetFromPlan(plan) ``` Closes #12836 from paleolimbot/cpp-minor-typo Lead-authored-by: Dewey Dunnington <dewey@fishandwhistle.net> Co-authored-by: David Li <li.davidm96@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>