Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support casting Utf8 to Interval #129

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ FEDORA=33
PYTHON=3.6
LLVM=11
CLANG_TOOLS=8
RUST=nightly-2022-03-08
RUST=nightly-2022-03-22
GO=1.15
NODE=14
MAVEN=3.5.4
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [nightly-2022-03-08]
rust: [nightly-2022-03-22]
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [nightly-2022-03-08]
rust: [nightly-2022-03-22]
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down Expand Up @@ -157,8 +157,8 @@ jobs:
submodules: true
- name: Setup toolchain
run: |
rustup toolchain install nightly-2022-03-08
rustup default nightly-2022-03-08
rustup toolchain install nightly-2022-03-22
rustup default nightly-2022-03-22
- uses: actions/setup-python@v2
with:
python-version: "3.10"
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, macos-latest]
rust: [nightly-2022-03-08]
rust: [nightly-2022-03-22]
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -240,7 +240,7 @@ jobs:
# strategy:
# matrix:
# arch: [amd64]
# rust: [nightly-2022-03-08]
# rust: [nightly-2022-03-22]
# container:
# image: ${{ matrix.arch }}/rust
# env:
Expand Down Expand Up @@ -292,8 +292,8 @@ jobs:
- uses: actions/checkout@v2
- name: Setup toolchain
run: |
rustup toolchain install nightly-2022-03-08
rustup default nightly-2022-03-08
rustup toolchain install nightly-2022-03-22
rustup default nightly-2022-03-22
rustup component add rustfmt
- name: Run
run: cargo fmt --all -- --check
Expand All @@ -305,7 +305,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [nightly-2022-03-08]
rust: [nightly-2022-03-22]
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down Expand Up @@ -348,7 +348,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [nightly-2022-03-08]
rust: [nightly-2022-03-22]
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down Expand Up @@ -396,7 +396,7 @@ jobs:
# strategy:
# matrix:
# arch: [amd64]
# rust: [nightly-2022-03-08]
# rust: [nightly-2022-03-22]
# container:
# image: ${{ matrix.arch }}/rust
# env:
Expand Down Expand Up @@ -449,7 +449,7 @@ jobs:
# strategy:
# matrix:
# arch: [amd64]
# rust: [nightly-2022-03-08]
# rust: [nightly-2022-03-22]
# steps:
# - uses: actions/checkout@v2
# with:
Expand Down
23 changes: 12 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ci/docker/linux-apt-lint.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ COPY ci/scripts/install_iwyu.sh /arrow/ci/scripts/
RUN arrow/ci/scripts/install_iwyu.sh /tmp/iwyu /usr/local ${clang_tools}

# Rust linter
ARG rust=nightly-2022-03-08
ARG rust=nightly-2022-03-22
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain stable -y
ENV PATH /root/.cargo/bin:$PATH
Expand Down
6 changes: 3 additions & 3 deletions datafusion-cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion datafusion-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repository = "https://github.com/apache/arrow-datafusion"
rust-version = "1.59"

[dependencies]
arrow = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "096ef28dde6b1ae43ce89ba2c3a9d98295f2972e" }
arrow = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "7e9519cbe4a994094c142a0a3e254c114df5c9ab" }
clap = { version = "3", features = ["derive", "cargo"] }
datafusion = { path = "../datafusion/core", version = "7.0.0" }
dirs = "4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion datafusion-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ path = "examples/avro_sql.rs"
required-features = ["datafusion/avro"]

[dev-dependencies]
arrow-flight = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "096ef28dde6b1ae43ce89ba2c3a9d98295f2972e" }
arrow-flight = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "7e9519cbe4a994094c142a0a3e254c114df5c9ab" }
async-trait = "0.1.41"
datafusion = { path = "../datafusion/core" }
futures = "0.3"
Expand Down
6 changes: 3 additions & 3 deletions datafusion/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jit = ["cranelift-module"]
pyarrow = ["pyo3"]

[dependencies]
arrow = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "096ef28dde6b1ae43ce89ba2c3a9d98295f2972e", features = ["prettyprint"] }
arrow = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "7e9519cbe4a994094c142a0a3e254c114df5c9ab", features = ["prettyprint"] }
avro-rs = { version = "0.13", features = ["snappy"], optional = true }
cranelift-module = { version = "0.82.0", optional = true }
ordered-float = "2.10"
parquet = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "096ef28dde6b1ae43ce89ba2c3a9d98295f2972e", features = ["arrow"], optional = true }
parquet = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "7e9519cbe4a994094c142a0a3e254c114df5c9ab", features = ["arrow"], optional = true }
pyo3 = { version = "0.16", optional = true }
sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "037562f7975fcc92b725efbfbaaf050272668593" }
sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "2c1becf622f2283514ecbb7e3f01bd858edeaa71" }
8 changes: 8 additions & 0 deletions datafusion/common/src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1339,6 +1339,14 @@ impl ScalarValue {
DataType::Interval(IntervalUnit::YearMonth) => {
typed_cast!(array, index, IntervalYearMonthArray, IntervalYearMonth)
}
DataType::Interval(IntervalUnit::MonthDayNano) => {
typed_cast!(
array,
index,
IntervalMonthDayNanoArray,
IntervalMonthDayNano
)
}
DataType::Timestamp(TimeUnit::Millisecond, tz_opt) => {
typed_cast_tz!(
array,
Expand Down
6 changes: 3 additions & 3 deletions datafusion/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ unicode_expressions = ["datafusion-physical-expr/regex_expressions"]

[dependencies]
ahash = { version = "0.7", default-features = false }
arrow = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "096ef28dde6b1ae43ce89ba2c3a9d98295f2972e", features = ["prettyprint"] }
arrow = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "7e9519cbe4a994094c142a0a3e254c114df5c9ab", features = ["prettyprint"] }
async-trait = "0.1.41"
avro-rs = { version = "0.13", features = ["snappy"], optional = true }
chrono = { version = "0.4", default-features = false }
Expand All @@ -73,13 +73,13 @@ num-traits = { version = "0.2", optional = true }
num_cpus = "1.13.0"
ordered-float = "2.10"
parking_lot = "0.12"
parquet = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "096ef28dde6b1ae43ce89ba2c3a9d98295f2972e", features = ["arrow"] }
parquet = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "7e9519cbe4a994094c142a0a3e254c114df5c9ab", features = ["arrow"] }
paste = "^1.0"
pin-project-lite= "^0.2.7"
pyo3 = { version = "0.16", optional = true }
rand = "0.8"
smallvec = { version = "1.6", features = ["union"] }
sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "037562f7975fcc92b725efbfbaaf050272668593" }
sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "2c1becf622f2283514ecbb7e3f01bd858edeaa71" }
tempfile = "3"
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "fs", "parking_lot"] }
tokio-stream = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/fuzz-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
arrow = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "096ef28dde6b1ae43ce89ba2c3a9d98295f2972e", features = ["prettyprint"] }
arrow = { git = 'https://github.com/cube-js/arrow-rs.git', rev = "7e9519cbe4a994094c142a0a3e254c114df5c9ab", features = ["prettyprint"] }
env_logger = "0.9.0"
rand = "0.8"
Loading
Loading