paleolimbot commented on PR #14295:
URL: https://github.com/apache/arrow/pull/14295#issuecomment-1265821810

   Thanks!
   
   I now get a different issue (also probably related to the Substrait that I'm 
generating!)
   
   ``` r
   library(arrow, warn.conflicts = FALSE)
   #> Some features are not enabled in this build of Arrow. Run `arrow_info()` 
for more information.
   
   plan_as_json <- '{
     "extensionUris": [
       {
         "extensionUriAnchor": 1,
         "uri": 
"https://github.com/apache/arrow/blob/master/format/substrait/extension_types.yaml";
       }
     ],
     "relations": [
       {
         "rel": {
           "project": {
             "common": {
               "emit": {"outputMapping": [2]
               }
             },
             "input": {
               "read": {
                 "baseSchema": {
                   "names": ["int"],
                   "struct": {
                     "types": [{"i32": {"nullability": "NULLABILITY_NULLABLE"}}]
                   }
                 },
                 "localFiles": {
                   "items": [
                     {
                       "uriFile": 
"file:///var/folders/gt/l87wjg8s7312zs9s7c1fgs900000gn/T//Rtmph5wiTQ/file1260f24ace0d2",
                       "parquet": {
   
                       }
                     }
                   ]
                 }
               }
             },
             "expressions": [
               {"selection": {"directReference": {"structField": {"field": 0}}}}
             ]
           }
         }
       }
     ]
   }'
   
   temp_parquet <- tempfile()
   write_parquet(data.frame(int = 1:5), temp_parquet)
   plan_as_json <- gsub("THIS_IS_THE_TEMP_FILE", temp_parquet, plan_as_json)
   arrow:::do_exec_plan_substrait(plan_as_json)
   #> Error: Invalid: No match for FieldRef.FieldPath(2) in FieldPath(0): int32
   #> FieldPath(0): int32
   #> /Users/deweydunnington/Desktop/rscratch/arrow/cpp/src/arrow/type.h:1796  
CheckNonEmpty(matches, root)
   #> 
/Users/deweydunnington/Desktop/rscratch/arrow/cpp/src/arrow/compute/exec/expression.cc:437
  ref->FindOne(in)
   #> 
/Users/deweydunnington/Desktop/rscratch/arrow/cpp/src/arrow/compute/exec/project_node.cc:68
  expr.Bind(*inputs[0]->output_schema(), plan->exec_context())
   #> 
/Users/deweydunnington/Desktop/rscratch/arrow/cpp/src/arrow/compute/exec/exec_plan.cc:535
  MakeExecNode(this->factory_name, plan, std::move(inputs), *this->options, 
registry)
   #> 
/Users/deweydunnington/Desktop/rscratch/arrow/cpp/src/arrow/compute/exec/exec_plan.cc:530
  std::get<Declaration>(input).AddToPlan(plan, registry)
   ```
   
   <sup>Created on 2022-10-03 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to