westonpace commented on a change in pull request #12564:
URL: https://github.com/apache/arrow/pull/12564#discussion_r836968905



##########
File path: r/tests/testthat/test-query-engine.R
##########
@@ -0,0 +1,86 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+test_that("do_exec_plan_substrait can evaluate a simple plan", {
+  skip_if_not_available("engine")
+
+  df <- data.frame(i = 1:5, b = rep_len(c(TRUE, FALSE), 5))
+  table <- arrow_table(df, schema = schema(i = int64(), b = bool()))
+
+  tf <- tempfile()
+  on.exit(unlink(tf))
+  write_parquet(table, tf)
+
+  substrait_json <- sprintf('{
+    "relations": [
+      {"rel": {
+        "read": {
+          "base_schema": {
+            "struct": {
+              "types": [ {"i64": {}}, {"bool": {}} ]
+            },
+            "names": ["i", "b"]
+          },
+          "local_files": {
+            "items": [
+              {
+                "uri_file": "file://%s",
+                "format": "FILE_FORMAT_PARQUET"
+              }
+            ]
+          }
+        }
+      }}
+    ],
+    "extension_uris": [
+      {
+        "extension_uri_anchor": 7,
+        "uri": 
"https://github.com/apache/arrow/blob/master/format/substrait/extension_types.yaml";

Review comment:
       Long term we will want this to be a hosted, versioned URL I think.  
Something like `https://arrow.apache.org/v1.0.0/extension_types.yaml`.  
Practically speaking this is just a namespace (XML does the same thing with 
xmlns) and so it is  important that producers and consumers agree on the exact 
same string.  It's useful, but not essential, that the URI is actually 
resolvable.

##########
File path: r/tests/testthat/test-query-engine.R
##########
@@ -0,0 +1,86 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+test_that("do_exec_plan_substrait can evaluate a simple plan", {
+  skip_if_not_available("engine")
+
+  df <- data.frame(i = 1:5, b = rep_len(c(TRUE, FALSE), 5))
+  table <- arrow_table(df, schema = schema(i = int64(), b = bool()))
+
+  tf <- tempfile()
+  on.exit(unlink(tf))
+  write_parquet(table, tf)
+
+  substrait_json <- sprintf('{
+    "relations": [
+      {"rel": {
+        "read": {
+          "base_schema": {
+            "struct": {
+              "types": [ {"i64": {}}, {"bool": {}} ]
+            },
+            "names": ["i", "b"]
+          },
+          "local_files": {
+            "items": [
+              {
+                "uri_file": "file://%s",
+                "format": "FILE_FORMAT_PARQUET"
+              }
+            ]
+          }
+        }
+      }}
+    ],
+    "extension_uris": [
+      {
+        "extension_uri_anchor": 7,
+        "uri": 
"https://github.com/apache/arrow/blob/master/format/substrait/extension_types.yaml";

Review comment:
       Long term we will want this to be a hosted, versioned URL I think.  
Something like 
`https://arrow.apache.org/v1.0.0/substrait/extension_types.yaml`.  Practically 
speaking this is just a namespace (XML does the same thing with xmlns) and so 
it is  important that producers and consumers agree on the exact same string.  
It's useful, but not essential, that the URI is actually resolvable.




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