Skip to content

Commit

Permalink
backup
Browse files Browse the repository at this point in the history
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
  • Loading branch information
jayzhan211 committed Aug 6, 2024
1 parent 682bc2e commit 6343467
Show file tree
Hide file tree
Showing 87 changed files with 1,159 additions and 809 deletions.
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ members = [
"datafusion/catalog",
"datafusion/core",
"datafusion/expr",
"datafusion/expr-common",
"datafusion/expr-functions-aggregate",
"datafusion/execution",
"datafusion/functions-aggregate",
"datafusion/functions-aggregate-common",
"datafusion/functions",
"datafusion/functions-nested",
"datafusion/optimizer",
Expand Down Expand Up @@ -94,8 +97,11 @@ datafusion-common = { path = "datafusion/common", version = "40.0.0", default-fe
datafusion-common-runtime = { path = "datafusion/common-runtime", version = "40.0.0" }
datafusion-execution = { path = "datafusion/execution", version = "40.0.0" }
datafusion-expr = { path = "datafusion/expr", version = "40.0.0" }
datafusion-expr-common = { path = "datafusion/expr-common", version = "40.0.0" }
datafusion-expr-functions-aggregate = { path = "datafusion/expr-functions-aggregate", version = "40.0.0" }
datafusion-functions = { path = "datafusion/functions", version = "40.0.0" }
datafusion-functions-aggregate = { path = "datafusion/functions-aggregate", version = "40.0.0" }
datafusion-functions-aggregate-common = { path = "datafusion/functions-aggregate-common", version = "40.0.0" }
datafusion-functions-nested = { path = "datafusion/functions-nested", version = "40.0.0" }
datafusion-optimizer = { path = "datafusion/optimizer", version = "40.0.0", default-features = false }
datafusion-physical-expr = { path = "datafusion/physical-expr", version = "40.0.0", default-features = false }
Expand Down
43 changes: 43 additions & 0 deletions datafusion/expr-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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.

[package]
name = "datafusion-expr-common"
description = "Logical plan and expression representation for DataFusion query engine"
keywords = ["datafusion", "logical", "plan", "expressions"]
readme = "README.md"
version = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
rust-version = { workspace = true }

[lints]
workspace = true

[lib]
name = "datafusion_expr_common"
path = "src/lib.rs"

[features]

[dependencies]
arrow = { workspace = true }
datafusion-common = { workspace = true }
paste = "^1.0"
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

//! Vectorized [`GroupsAccumulator`]

use arrow_array::{ArrayRef, BooleanArray};
use arrow::array::{ArrayRef, BooleanArray};
use datafusion_common::{not_impl_err, Result};

/// Describes how many rows should be emitted during grouping.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
//! Interval arithmetic library

use crate::type_coercion::binary::get_result_type;
use crate::Operator;
use arrow_buffer::{IntervalDayTime, IntervalMonthDayNano};
use crate::operator::Operator;
use arrow::datatypes::{IntervalDayTime, IntervalMonthDayNano};
use std::borrow::Borrow;
use std::fmt::{self, Display, Formatter};
use std::ops::{AddAssign, SubAssign};
Expand Down Expand Up @@ -120,12 +120,12 @@ macro_rules! value_transition {
IntervalYearMonth(None)
}
IntervalDayTime(Some(value))
if value == arrow_buffer::IntervalDayTime::$bound =>
if value == arrow::datatypes::IntervalDayTime::$bound =>
{
IntervalDayTime(None)
}
IntervalMonthDayNano(Some(value))
if value == arrow_buffer::IntervalMonthDayNano::$bound =>
if value == arrow::datatypes::IntervalMonthDayNano::$bound =>
{
IntervalMonthDayNano(None)
}
Expand Down Expand Up @@ -1135,12 +1135,12 @@ fn next_value_helper<const INC: bool>(value: ScalarValue) -> ScalarValue {
}
IntervalDayTime(Some(val)) => IntervalDayTime(Some(increment_decrement::<
INC,
arrow_buffer::IntervalDayTime,
arrow::datatypes::IntervalDayTime,
>(val))),
IntervalMonthDayNano(Some(val)) => {
IntervalMonthDayNano(Some(increment_decrement::<
INC,
arrow_buffer::IntervalMonthDayNano,
arrow::datatypes::IntervalMonthDayNano,
>(val)))
}
_ => value, // Unbounded values return without change.
Expand Down
25 changes: 25 additions & 0 deletions datafusion/expr-common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// 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.

pub mod accumulator;
pub mod columnar_value;
pub mod groups_accumulator;
pub mod interval_arithmetic;
pub mod operator;
pub mod signature;
pub mod sort_properties;
pub mod type_coercion;
Loading

0 comments on commit 6343467

Please sign in to comment.