You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/07 17:37:52 UTC

[GitHub] [arrow] paleolimbot opened a new pull request, #12828: MINOR: [C++] Fix typo that causes segfault when unknown functions are passed to Substrait

paleolimbot opened a new pull request, #12828:
URL: https://github.com/apache/arrow/pull/12828

   I'm not sure if this is outside the scope of MINOR (I'm also happy to create a JIRA), but there's a typo in `ExtensionSet::Make()` that causes a crash whenever somebody provides an unsupported function into the Substrait consumer.
   
   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)
   ```
   
   <sup>Created on 2022-04-07 by the [reprex package](https://reprex.tidyverse.org) (v2.0.1)</sup>


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] westonpace commented on pull request #12828: MINOR: [C++] Fix typo that causes segfault when unknown functions are passed to Substrait

Posted by GitBox <gi...@apache.org>.
westonpace commented on PR #12828:
URL: https://github.com/apache/arrow/pull/12828#issuecomment-1092344157

   Can you add a unit test to cover this case?  Something like this should do: https://github.com/westonpace/arrow/commit/3e303518e7cbcadac34a75e520ddff31e4b62fd8


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on pull request #12828: MINOR: [C++] Fix typo that causes segfault when unknown functions are passed to Substrait

Posted by GitBox <gi...@apache.org>.
kou commented on PR #12828:
URL: https://github.com/apache/arrow/pull/12828#issuecomment-1092323354

   > I'm not sure if this is outside the scope of MINOR (I'm also happy to create a JIRA)
   
   Could you create a JIRA issue?
   https://github.com/apache/arrow/blob/master/CONTRIBUTING.md#minor-fixes is our MINOR definition.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] paleolimbot closed pull request #12828: MINOR: [C++] Fix typo that causes segfault when unknown functions are passed to Substrait

Posted by GitBox <gi...@apache.org>.
paleolimbot closed pull request #12828: MINOR: [C++] Fix typo that causes segfault when unknown functions are passed to Substrait
URL: https://github.com/apache/arrow/pull/12828


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org