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/05/30 23:22:47 UTC

[GitHub] [arrow] donghekang opened a new issue, #13268: First-class functions in substrait

donghekang opened a new issue, #13268:
URL: https://github.com/apache/arrow/issues/13268

   Hi all,
   
   I am trying to execute an example Substrait plan in Arrow. The example plan is shown as the following. We define a filter operator to compare an attribute with one constant value 1. The operator uses the `gt` function defined in https://github.com/substrait-io/substrait/blob/main/extensions/functions_comparison.yaml. 
   
   However, it looks like Arrow does not implement the first-class functions defined in Substrait. Arrow reports **Uri 'https://github.com/substrait-io/substrait/blob/main/extensions/functions_comparison.yaml' not found in registry** when I execute the plan. I use the Arrow release-8.0.0.
   
   I am curious how to describe the `gt` funciton in the Substrait message that can be consumed by Arrow. Thanks in advance!
   
   > {
   >  "extensionUris": [
   >   {
   >    "extensionUriAnchor": 7,
   >    "uri": "https://github.com/substrait-io/substrait/blob/main/extensions/functions_comparison.yaml"
   >   }
   >  ],
   >  "extensions": [
   >   {
   >    "extensionFunction": {
   >     "extensionUriReference": 7,
   >     "functionAnchor": 42,
   >     "name": "gt"
   >    }
   >   }
   >  ],
   >  "relations": [
   >   {
   >    "rel": {
   >     "filter": {
   >      "input": {
   >       "read": {
   >        "baseSchema": {
   >         "names": [
   >          "i",
   >          "b"
   >         ],
   >         "struct": {
   >          "types": [
   >           {
   >            "i64": {}
   >           },
   >           {
   >            "bool": {}
   >           }
   >          ]
   >         }
   >        },
   >        "localFiles": {
   >         "items": [
   >          {
   >           "uriFile": "file:///home/daniel/20220512-arrow-substrait-example/example.parquet",
   >           "format": "FILE_FORMAT_PARQUET"
   >          }
   >         ]
   >        }
   >       }
   >      },
   >      "condition": {
   >       "scalarFunction": {
   >        "functionReference": 42,
   >        "args": [
   >         {
   >          "selection": {
   >           "directReference": {
   >            "structField": {}
   >           },
   >           "rootReference": {}
   >          }
   >         },
   >         {
   >          "literal": {
   >           "i64": "1"
   >          }
   >         }
   >        ],
   >        "outputType": {
   >         "bool": {
   >          "nullability": "NULLABILITY_REQUIRED"
   >         }
   >        }
   >       }
   >      }
   >     }
   >    }
   >   }
   >  ]
   > }
   


-- 
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.apache.org

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


[GitHub] [arrow] westonpace commented on issue #13268: First-class functions in substrait

Posted by GitBox <gi...@apache.org>.
westonpace commented on issue #13268:
URL: https://github.com/apache/arrow/issues/13268#issuecomment-1142681038

   Mapping of functions is not yet fully implemented.  There is some discussion on approach in [ARROW-15582](https://issues.apache.org/jira/browse/ARROW-15582) and [ARROW-15538](https://issues.apache.org/jira/browse/ARROW-15538) and these JIRAs are in progress (though no PR is yet available)


-- 
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] donghekang closed issue #13268: First-class functions in substrait

Posted by GitBox <gi...@apache.org>.
donghekang closed issue #13268: First-class functions in substrait
URL: https://github.com/apache/arrow/issues/13268


-- 
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