Merge branch 'main' into cn/import-export-cleanup

pull/24376/head
kodiakhq[bot] 2023-08-18 11:06:34 +00:00 committed by GitHub
commit 12eac3378f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 76 additions and 46 deletions

38
Cargo.lock generated
View File

@ -869,9 +869,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.3.21"
version = "4.3.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd"
checksum = "b417ae4361bca3f5de378294fc7472d3c4ed86a5ef9f49e93ae722f432aae8d2"
dependencies = [
"clap_builder",
"clap_derive",
@ -902,9 +902,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.3.21"
version = "4.3.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa"
checksum = "9c90dc0f0e42c64bff177ca9d7be6fcc9ddb0f26a6e062174a61c84dd6c644d4"
dependencies = [
"anstream",
"anstyle",
@ -1374,7 +1374,7 @@ dependencies = [
"iox_time",
"observability_deps",
"once_cell",
"ordered-float 3.7.0",
"ordered-float 3.8.0",
"paste",
"percent-encoding",
"proptest",
@ -1390,7 +1390,7 @@ dependencies = [
[[package]]
name = "datafusion"
version = "28.0.0"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=161c6d32824fc87307341f942ffad7b4d452c82f#161c6d32824fc87307341f942ffad7b4d452c82f"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=7a5354fe5908b8ac7db163d6c484dbf1d85a142e#7a5354fe5908b8ac7db163d6c484dbf1d85a142e"
dependencies = [
"ahash",
"arrow",
@ -1438,7 +1438,7 @@ dependencies = [
[[package]]
name = "datafusion-common"
version = "28.0.0"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=161c6d32824fc87307341f942ffad7b4d452c82f#161c6d32824fc87307341f942ffad7b4d452c82f"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=7a5354fe5908b8ac7db163d6c484dbf1d85a142e#7a5354fe5908b8ac7db163d6c484dbf1d85a142e"
dependencies = [
"arrow",
"arrow-array",
@ -1452,7 +1452,7 @@ dependencies = [
[[package]]
name = "datafusion-execution"
version = "28.0.0"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=161c6d32824fc87307341f942ffad7b4d452c82f#161c6d32824fc87307341f942ffad7b4d452c82f"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=7a5354fe5908b8ac7db163d6c484dbf1d85a142e#7a5354fe5908b8ac7db163d6c484dbf1d85a142e"
dependencies = [
"arrow",
"dashmap",
@ -1471,7 +1471,7 @@ dependencies = [
[[package]]
name = "datafusion-expr"
version = "28.0.0"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=161c6d32824fc87307341f942ffad7b4d452c82f#161c6d32824fc87307341f942ffad7b4d452c82f"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=7a5354fe5908b8ac7db163d6c484dbf1d85a142e#7a5354fe5908b8ac7db163d6c484dbf1d85a142e"
dependencies = [
"ahash",
"arrow",
@ -1485,7 +1485,7 @@ dependencies = [
[[package]]
name = "datafusion-optimizer"
version = "28.0.0"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=161c6d32824fc87307341f942ffad7b4d452c82f#161c6d32824fc87307341f942ffad7b4d452c82f"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=7a5354fe5908b8ac7db163d6c484dbf1d85a142e#7a5354fe5908b8ac7db163d6c484dbf1d85a142e"
dependencies = [
"arrow",
"async-trait",
@ -1502,7 +1502,7 @@ dependencies = [
[[package]]
name = "datafusion-physical-expr"
version = "28.0.0"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=161c6d32824fc87307341f942ffad7b4d452c82f#161c6d32824fc87307341f942ffad7b4d452c82f"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=7a5354fe5908b8ac7db163d6c484dbf1d85a142e#7a5354fe5908b8ac7db163d6c484dbf1d85a142e"
dependencies = [
"ahash",
"arrow",
@ -1536,7 +1536,7 @@ dependencies = [
[[package]]
name = "datafusion-proto"
version = "28.0.0"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=161c6d32824fc87307341f942ffad7b4d452c82f#161c6d32824fc87307341f942ffad7b4d452c82f"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=7a5354fe5908b8ac7db163d6c484dbf1d85a142e#7a5354fe5908b8ac7db163d6c484dbf1d85a142e"
dependencies = [
"arrow",
"chrono",
@ -1550,7 +1550,7 @@ dependencies = [
[[package]]
name = "datafusion-sql"
version = "28.0.0"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=161c6d32824fc87307341f942ffad7b4d452c82f#161c6d32824fc87307341f942ffad7b4d452c82f"
source = "git+https://github.com/apache/arrow-datafusion.git?rev=7a5354fe5908b8ac7db163d6c484dbf1d85a142e#7a5354fe5908b8ac7db163d6c484dbf1d85a142e"
dependencies = [
"arrow",
"arrow-schema",
@ -3842,9 +3842,9 @@ dependencies = [
[[package]]
name = "ordered-float"
version = "3.7.0"
version = "3.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fc2dbde8f8a79f2102cc474ceb0ad68e3b80b85289ea62389b60e66777e4213"
checksum = "7417b1484e3641a8791af3c3123cdc083ac60a0d262a2f281b6125d58917caf4"
dependencies = [
"num-traits",
]
@ -5833,18 +5833,18 @@ dependencies = [
[[package]]
name = "thiserror"
version = "1.0.46"
version = "1.0.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9207952ae1a003f42d3d5e892dac3c6ba42aa6ac0c79a6a91a2b5cb4253e75c"
checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.46"
version = "1.0.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1728216d3244de4f14f14f8c15c79be1a7c67867d28d69b719690e2a19fb445"
checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b"
dependencies = [
"proc-macro2",
"quote",

View File

@ -121,8 +121,8 @@ license = "MIT OR Apache-2.0"
[workspace.dependencies]
arrow = { version = "45.0.0" }
arrow-flight = { version = "45.0.0" }
datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev = "161c6d32824fc87307341f942ffad7b4d452c82f", default-features = false }
datafusion-proto = { git = "https://github.com/apache/arrow-datafusion.git", rev = "161c6d32824fc87307341f942ffad7b4d452c82f" }
datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev = "7a5354fe5908b8ac7db163d6c484dbf1d85a142e", default-features = false }
datafusion-proto = { git = "https://github.com/apache/arrow-datafusion.git", rev = "7a5354fe5908b8ac7db163d6c484dbf1d85a142e" }
hashbrown = { version = "0.14.0" }
object_store = { version = "0.6.0" }

View File

@ -9,7 +9,7 @@ license.workspace = true
[dependencies]
http = "0.2.9"
reqwest = { version = "0.11", default-features = false, features = ["stream", "rustls-tls"] }
thiserror = "1.0.46"
thiserror = "1.0.47"
tonic = { workspace = true }
tower = "0.4"
workspace-hack = { version = "0.1", path = "../workspace-hack" }

View File

@ -18,7 +18,7 @@ ordered-float = "3"
schema = { path = "../schema" }
sha2 = "0.10"
sqlx = { version = "0.7.1", features = ["runtime-tokio-rustls", "postgres", "uuid"] }
thiserror = "1.0.46"
thiserror = "1.0.47"
uuid = { version = "1", features = ["v4"] }
workspace-hack = { version = "0.1", path = "../workspace-hack" }
percent-encoding = "2.2.0"

View File

@ -11,7 +11,7 @@ futures = "0.3.28"
hashbrown.workspace = true
metric = { version = "0.1.0", path = "../metric" }
prost = "0.11.9"
thiserror = "1.0.46"
thiserror = "1.0.47"
tokio = { version = "1.32.0", features = ["net", "io-util", "time", "rt", "sync", "macros"] }
tracing = "0.1.37"
uuid = { version = "1.4.1", features = ["v4"] }

View File

@ -17,7 +17,7 @@ object_store = { workspace=true }
observability_deps = { path = "../observability_deps" }
schema = { path = "../schema" }
serde_json = "1.0.105"
thiserror = "1.0.46"
thiserror = "1.0.47"
tokio = { version = "1.32" }
tokio-util = { version = "0.7.8" }
workspace-hack = { version = "0.1", path = "../workspace-hack" }

View File

@ -71,7 +71,7 @@ serde = "1.0.183"
serde_json = "1.0.105"
snafu = "0.7"
tempfile = "3.7.1"
thiserror = "1.0.46"
thiserror = "1.0.47"
tikv-jemalloc-ctl = { version = "0.5.4", optional = true }
tokio = { version = "1.32", features = ["macros", "net", "parking_lot", "rt-multi-thread", "signal", "sync", "time", "io-std"] }
tokio-stream = { version = "0.1", features = ["net"] }

View File

@ -23,6 +23,10 @@ SELECT * from cpu where time > '1970-01-01T00:00:00' ORDER BY time;
-- expect that to get a subset of the columns and in the order specified
SELECT "user", region from cpu where time > to_timestamp('1970-01-01T00:00:00.000000120+00:00');
-- Functions on tags
--
SELECT upper("region"), substring(region, 1, 2) from cpu where time > to_timestamp('1970-01-01T00:00:00.000000120+00:00');
-- basic grouping
SELECT count(*) from cpu group by region;

View File

@ -45,6 +45,12 @@
+------+--------+
| 21.0 | west |
+------+--------+
-- SQL: SELECT upper("region"), substring(region, 1, 2) from cpu where time > to_timestamp('1970-01-01T00:00:00.000000120+00:00');
+-------------------+--------------------------------------+
| upper(cpu.region) | substr(cpu.region,Int64(1),Int64(2)) |
+-------------------+--------------------------------------+
| WEST | we |
+-------------------+--------------------------------------+
-- SQL: SELECT count(*) from cpu group by region;
+----------+
| COUNT(*) |

View File

@ -27,7 +27,7 @@ schema = { path = "../schema" }
serde_json = "1.0.105"
tokio = { version = "1.32", features = ["macros", "parking_lot", "rt-multi-thread"] }
tokio-stream = "0.1.13"
thiserror = "1.0.46"
thiserror = "1.0.47"
tonic = { workspace = true }
[dev-dependencies]

View File

@ -42,7 +42,7 @@ sharder = { version = "0.1.0", path = "../sharder" }
test_helpers = { path = "../test_helpers", features = [
"future_timeout",
], optional = true }
thiserror = "1.0.46"
thiserror = "1.0.47"
tracker = { path = "../tracker" }
tokio = { version = "1.32", features = [
"macros",

View File

@ -21,7 +21,7 @@ siphasher = "0.3"
snafu = "0.7"
sqlx = { version = "0.7.1", features = [ "runtime-tokio-rustls" , "postgres", "uuid", "sqlite" ] }
sqlx-hotswap-pool = { path = "../sqlx-hotswap-pool" }
thiserror = "1.0.46"
thiserror = "1.0.47"
tokio = { version = "1.32", features = ["io-util", "macros", "parking_lot", "rt-multi-thread", "time"] }
uuid = { version = "1", features = ["v4"] }
workspace-hack = { version = "0.1", path = "../workspace-hack" }

View File

@ -18,7 +18,7 @@ iox_query = { version = "0.1.0", path = "../iox_query" }
ioxd_common = { path = "../ioxd_common" }
metric = { path = "../metric" }
parquet_file = { version = "0.1.0", path = "../parquet_file" }
thiserror = "1.0.46"
thiserror = "1.0.47"
tokio = { version = "1.32", features = ["macros", "net", "parking_lot", "rt-multi-thread", "signal", "sync", "time"] }
tokio-util = { version = "0.7.8" }
trace = { path = "../trace" }

View File

@ -30,7 +30,7 @@ trace = { path = "../trace" }
arrow-flight = { workspace = true }
async-trait = "0.1"
hyper = "0.14"
thiserror = "1.0.46"
thiserror = "1.0.47"
tokio = { version = "1.32", features = ["macros", "net", "parking_lot", "rt-multi-thread", "signal", "sync", "time"] }
tonic = { workspace = true }
workspace-hack = { version = "0.1", path = "../workspace-hack" }

View File

@ -19,7 +19,7 @@ metric = { path = "../metric" }
mutable_batch = { path = "../mutable_batch" }
object_store = { workspace = true }
router = { path = "../router" }
thiserror = "1.0.46"
thiserror = "1.0.47"
tokio-util = { version = "0.7.8" }
trace = { path = "../trace" }
workspace-hack = { version = "0.1", path = "../workspace-hack" }

View File

@ -18,7 +18,7 @@ hashbrown = { workspace = true }
itertools = "0.11"
workspace-hack = { version = "0.1", path = "../workspace-hack" }
percent-encoding = "2.2.0"
thiserror = "1.0.46"
thiserror = "1.0.47"
unicode-segmentation = "1.10.1"
[dev-dependencies]

View File

@ -22,7 +22,7 @@ pbjson-types = "0.5"
prost = "0.11"
schema = { path = "../schema" }
snafu = "0.7"
thiserror = "1.0.46"
thiserror = "1.0.47"
thrift = "0.17"
tokio = { version = "1.32", features = ["macros", "parking_lot", "rt", "rt-multi-thread", "sync"] }
uuid = { version = "1", features = ["v4"] }

View File

@ -989,6 +989,18 @@ mod test {
],
)
.await;
run_case(
selector_max().call(vec![col("bool_const"), col("time"), col("bool_value"), col("f64_not_normal_1_value"), col("i64_value")]),
vec![
"+-------------------------------------------------------------------------------------------+",
"| selector_max(t.bool_const,t.time,t.bool_value,t.f64_not_normal_1_value,t.i64_value) |",
"+-------------------------------------------------------------------------------------------+",
"| {value: true, time: 1970-01-01T00:00:00.000001, other_1: true, other_2: NaN, other_3: 20} |",
"+-------------------------------------------------------------------------------------------+",
],
)
.await;
}
#[tokio::test]

View File

@ -222,16 +222,24 @@ impl Selector {
.expect("Second argument was time");
// Note: we still use the MINIMUM timestamp here even if this is the max VALUE aggregator.
self.time = match (array_min(time_arr), self.time) {
(Some(x), Some(y)) if x < y => Some(x),
(Some(_), Some(x)) => Some(x),
(None, Some(x)) => Some(x),
(Some(x), None) => Some(x),
(None, None) => None,
let found_new_time = match (array_min(time_arr), self.time) {
(Some(x), Some(y)) => {
if x < y {
self.time = Some(x);
true
} else {
false
}
}
(Some(x), None) => {
self.time = Some(x);
true
}
(None, _) => false,
};
// update other if required
if !self.other.is_empty() {
if found_new_time && !self.other.is_empty() {
let index = time_arr
.iter()
// arrow doesn't tell us what index had the

View File

@ -11,7 +11,7 @@ clap = { version = "4", features = ["derive", "env"], optional = true }
is-terminal = "0.4.9"
logfmt = { path = "../logfmt" }
observability_deps = { path = "../observability_deps" }
thiserror = "1.0.46"
thiserror = "1.0.47"
tracing-log = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }

View File

@ -11,7 +11,7 @@ hashbrown.workspace = true
mutable_batch = { version = "0.1.0", path = "../mutable_batch" }
parquet_to_line_protocol = { version = "0.1.0", path = "../parquet_to_line_protocol" }
schema = { version = "0.1.0", path = "../schema" }
thiserror = "1.0.46"
thiserror = "1.0.47"
workspace-hack = { version = "0.1", path = "../workspace-hack" }
[dev-dependencies] # In alphabetical order

View File

@ -28,9 +28,9 @@ bytes = { version = "1" }
chrono = { version = "0.4", default-features = false, features = ["alloc", "clock", "serde"] }
crossbeam-utils = { version = "0.8" }
crypto-common = { version = "0.1", default-features = false, features = ["std"] }
datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev = "161c6d32824fc87307341f942ffad7b4d452c82f" }
datafusion-optimizer = { git = "https://github.com/apache/arrow-datafusion.git", rev = "161c6d32824fc87307341f942ffad7b4d452c82f", default-features = false, features = ["crypto_expressions", "regex_expressions", "unicode_expressions"] }
datafusion-physical-expr = { git = "https://github.com/apache/arrow-datafusion.git", rev = "161c6d32824fc87307341f942ffad7b4d452c82f", default-features = false, features = ["crypto_expressions", "encoding_expressions", "regex_expressions", "unicode_expressions"] }
datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev = "7a5354fe5908b8ac7db163d6c484dbf1d85a142e" }
datafusion-optimizer = { git = "https://github.com/apache/arrow-datafusion.git", rev = "7a5354fe5908b8ac7db163d6c484dbf1d85a142e", default-features = false, features = ["crypto_expressions", "regex_expressions", "unicode_expressions"] }
datafusion-physical-expr = { git = "https://github.com/apache/arrow-datafusion.git", rev = "7a5354fe5908b8ac7db163d6c484dbf1d85a142e", default-features = false, features = ["crypto_expressions", "encoding_expressions", "regex_expressions", "unicode_expressions"] }
digest = { version = "0.10", features = ["mac", "std"] }
either = { version = "1", features = ["serde"] }
fixedbitset = { version = "0.4" }