Skip to content

Commit e80fb37

Browse files
paleolimbotCopilot
andauthored
feat(r/sedonadb): Translate R expressions to DataFusion logical Expr (#468)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c25a377 commit e80fb37

19 files changed

Lines changed: 1412 additions & 3 deletions

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ repos:
2525
- id: check-yaml
2626
- id: detect-private-key
2727
- id: end-of-file-fixer
28+
# R snapshot test files may have arbitrary file endings based on test results
29+
exclude: "_snaps"
2830
- id: fix-byte-order-marker
2931
- id: trailing-whitespace
3032

@@ -34,7 +36,7 @@ repos:
3436
- id: codespell
3537
# types_or: [markdown, c, c++, rust, python]
3638
additional_dependencies: [tomli]
37-
exclude: "^c/(sedona-geoarrow-c/src/geoarrow|sedona-geoarrow-c/src/nanoarrow|sedona-libgpuspatial/libgpuspatial|sedona-tg/src/tg)/.*|^docs/image/sedonadb-architecture\\.svg$"
39+
exclude: "^c/(sedona-geoarrow-c/src/geoarrow|sedona-geoarrow-c/src/nanoarrow|sedona-libgpuspatial/libgpuspatial|sedona-tg/src/tg)/.*|^docs/image/sedonadb-architecture\\.svg$|^r/sedonadb/tools/savvy-update.sh$"
3840
args: ["--ignore-words-list=thirdparty"]
3941

4042
- repo: https://github.com/astral-sh/ruff-pre-commit

dev/release/rat_exclude_files.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ r/sedonadb/.Rbuildignore
2525
r/sedonadb/DESCRIPTION
2626
r/sedonadb/NAMESPACE
2727
r/sedonadb/src/sedonadb-win.def
28+
r/sedonadb/tests/testthat/_snaps/*
2829
submodules/geoarrow-data/*

r/sedonadb/.gitattributes

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
R/000-wrappers.R linguist-generated
19+
src/init.c linguist-generated
20+
src/rust/api.h linguist-generated

r/sedonadb/NAMESPACE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,41 @@ S3method(as_sedonadb_dataframe,nanoarrow_array)
1010
S3method(as_sedonadb_dataframe,nanoarrow_array_stream)
1111
S3method(as_sedonadb_dataframe,sedonadb_dataframe)
1212
S3method(as_sedonadb_dataframe,sf)
13+
S3method(as_sedonadb_literal,"NULL")
14+
S3method(as_sedonadb_literal,character)
15+
S3method(as_sedonadb_literal,double)
16+
S3method(as_sedonadb_literal,integer)
17+
S3method(as_sedonadb_literal,nanoarrow_array)
18+
S3method(as_sedonadb_literal,raw)
19+
S3method(as_sedonadb_literal,wk_wkb)
1320
S3method(dim,sedonadb_dataframe)
1421
S3method(dimnames,sedonadb_dataframe)
1522
S3method(head,sedonadb_dataframe)
1623
S3method(infer_nanoarrow_schema,sedonadb_dataframe)
1724
S3method(print,"sedonadb::InternalContext__bundle")
1825
S3method(print,"sedonadb::InternalDataFrame__bundle")
26+
S3method(print,"sedonadb::SedonaDBExprFactory__bundle")
27+
S3method(print,"sedonadb::SedonaDBExpr__bundle")
28+
S3method(print,SedonaDBExpr)
1929
S3method(print,sedonadb_dataframe)
30+
export(as_sd_expr)
2031
export(as_sedonadb_dataframe)
32+
export(as_sedonadb_literal)
33+
export(is_sd_expr)
2134
export(sd_collect)
2235
export(sd_compute)
2336
export(sd_configure_proj)
2437
export(sd_count)
2538
export(sd_drop_view)
39+
export(sd_expr_aggregate_function)
40+
export(sd_expr_alias)
41+
export(sd_expr_binary)
42+
export(sd_expr_cast)
43+
export(sd_expr_column)
44+
export(sd_expr_factory)
45+
export(sd_expr_literal)
46+
export(sd_expr_negative)
47+
export(sd_expr_scalar_function)
2648
export(sd_preview)
2749
export(sd_read_parquet)
2850
export(sd_register_udf)

r/sedonadb/R/000-wrappers.R

Lines changed: 123 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)