diff --git a/Cargo.lock b/Cargo.lock index 5c6effd58c..09f658c8cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -444,23 +444,6 @@ dependencies = [ "zstd 0.12.3+zstd.1.5.2", ] -[[package]] -name = "arrow_util" -version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql?branch=chore-log#0f589eae3c530ded4367ae667ed5c85bb68dd723" -dependencies = [ - "ahash 0.8.3", - "arrow 38.0.0", - "chrono", - "comfy-table", - "hashbrown 0.13.2", - "num-traits", - "once_cell", - "regex", - "snafu 0.7.4", - "uuid 1.3.0", -] - [[package]] name = "arrow_util" version = "0.1.0" @@ -2007,20 +1990,6 @@ dependencies = [ "sqlparser", ] -[[package]] -name = "datafusion_util" -version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql?branch=chore-log#0f589eae3c530ded4367ae667ed5c85bb68dd723" -dependencies = [ - "async-trait", - "datafusion", - "futures 0.3.28", - "observability_deps 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", - "pin-project", - "tokio", - "tokio-stream", -] - [[package]] name = "datafusion_util" version = "0.1.0" @@ -2029,7 +1998,7 @@ dependencies = [ "async-trait", "datafusion", "futures 0.3.28", - "observability_deps 0.1.0 (git+https://github.com/CeresDB/influxql)", + "observability_deps", "pin-project", "tokio", "tokio-stream", @@ -2573,7 +2542,7 @@ checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" [[package]] name = "generated_types" version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql?branch=chore-log#0f589eae3c530ded4367ae667ed5c85bb68dd723" +source = "git+https://github.com/CeresDB/influxql#4cef2d2fb84fc77af1a7a88ad4c978a5b344ad23" dependencies = [ "pbjson", "pbjson-build", @@ -2966,7 +2935,7 @@ dependencies = [ [[package]] name = "influxdb_influxql_parser" version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql?branch=chore-log#0f589eae3c530ded4367ae667ed5c85bb68dd723" +source = "git+https://github.com/CeresDB/influxql#4cef2d2fb84fc77af1a7a88ad4c978a5b344ad23" dependencies = [ "chrono", "chrono-tz", @@ -3034,51 +3003,26 @@ dependencies = [ "libc", ] -[[package]] -name = "iox_query" -version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql?branch=chore-log#0f589eae3c530ded4367ae667ed5c85bb68dd723" -dependencies = [ - "arrow 38.0.0", - "arrow_util 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", - "async-trait", - "chrono", - "datafusion", - "datafusion_util 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", - "futures 0.3.28", - "hashbrown 0.13.2", - "log", - "observability_deps 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", - "once_cell", - "parking_lot 0.12.1", - "query_functions 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", - "schema 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", - "snafu 0.7.4", - "test_helpers 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", - "tokio", - "tokio-stream", -] - [[package]] name = "iox_query" version = "0.1.0" source = "git+https://github.com/CeresDB/influxql#4cef2d2fb84fc77af1a7a88ad4c978a5b344ad23" dependencies = [ "arrow 38.0.0", - "arrow_util 0.1.0 (git+https://github.com/CeresDB/influxql)", + "arrow_util", "async-trait", "chrono", "datafusion", - "datafusion_util 0.1.0 (git+https://github.com/CeresDB/influxql)", + "datafusion_util", "futures 0.3.28", "hashbrown 0.13.2", - "observability_deps 0.1.0 (git+https://github.com/CeresDB/influxql)", + "observability_deps", "once_cell", "parking_lot 0.12.1", - "query_functions 0.1.0 (git+https://github.com/CeresDB/influxql)", - "schema 0.1.0 (git+https://github.com/CeresDB/influxql)", + "query_functions", + "schema", "snafu 0.7.4", - "test_helpers 0.1.0 (git+https://github.com/CeresDB/influxql)", + "test_helpers", "tokio", "tokio-stream", ] @@ -3086,22 +3030,22 @@ dependencies = [ [[package]] name = "iox_query_influxql" version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql?branch=chore-log#0f589eae3c530ded4367ae667ed5c85bb68dd723" +source = "git+https://github.com/CeresDB/influxql#4cef2d2fb84fc77af1a7a88ad4c978a5b344ad23" dependencies = [ "arrow 38.0.0", "chrono", "chrono-tz", "datafusion", - "datafusion_util 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", + "datafusion_util", "generated_types", "influxdb_influxql_parser", - "iox_query 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", + "iox_query", "itertools", - "observability_deps 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", + "observability_deps", "once_cell", - "query_functions 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", + "query_functions", "regex", - "schema 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", + "schema", "serde_json", ] @@ -4154,14 +4098,6 @@ dependencies = [ "zstd 0.11.2+zstd.1.5.2", ] -[[package]] -name = "observability_deps" -version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql?branch=chore-log#0f589eae3c530ded4367ae667ed5c85bb68dd723" -dependencies = [ - "tracing", -] - [[package]] name = "observability_deps" version = "0.1.0" @@ -5009,7 +4945,7 @@ dependencies = [ "datafusion", "df_operator", "futures 0.3.28", - "iox_query 0.1.0 (git+https://github.com/CeresDB/influxql)", + "iox_query", "log", "query_frontend", "serde", @@ -5042,30 +4978,13 @@ dependencies = [ "prom-remote-api", "regex", "regex-syntax 0.6.29", - "schema 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", + "schema", "snafu 0.6.10", "sqlparser", "table_engine", "tokio", ] -[[package]] -name = "query_functions" -version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql?branch=chore-log#0f589eae3c530ded4367ae667ed5c85bb68dd723" -dependencies = [ - "arrow 38.0.0", - "chrono", - "datafusion", - "itertools", - "observability_deps 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", - "once_cell", - "regex", - "regex-syntax 0.6.29", - "schema 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", - "snafu 0.7.4", -] - [[package]] name = "query_functions" version = "0.1.0" @@ -5075,11 +4994,11 @@ dependencies = [ "chrono", "datafusion", "itertools", - "observability_deps 0.1.0 (git+https://github.com/CeresDB/influxql)", + "observability_deps", "once_cell", "regex", "regex-syntax 0.6.29", - "schema 0.1.0 (git+https://github.com/CeresDB/influxql)", + "schema", "snafu 0.7.4", ] @@ -5764,19 +5683,6 @@ dependencies = [ "parking_lot 0.12.1", ] -[[package]] -name = "schema" -version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql?branch=chore-log#0f589eae3c530ded4367ae667ed5c85bb68dd723" -dependencies = [ - "arrow 38.0.0", - "hashbrown 0.13.2", - "indexmap", - "itertools", - "observability_deps 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", - "snafu 0.7.4", -] - [[package]] name = "schema" version = "0.1.0" @@ -5786,7 +5692,7 @@ dependencies = [ "hashbrown 0.13.2", "indexmap", "itertools", - "observability_deps 0.1.0 (git+https://github.com/CeresDB/influxql)", + "observability_deps", "snafu 0.7.4", ] @@ -6586,26 +6492,13 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "test_helpers" -version = "0.1.0" -source = "git+https://github.com/CeresDB/influxql?branch=chore-log#0f589eae3c530ded4367ae667ed5c85bb68dd723" -dependencies = [ - "dotenvy", - "observability_deps 0.1.0 (git+https://github.com/CeresDB/influxql?branch=chore-log)", - "parking_lot 0.12.1", - "tempfile", - "tracing-log", - "tracing-subscriber 0.3.16", -] - [[package]] name = "test_helpers" version = "0.1.0" source = "git+https://github.com/CeresDB/influxql#4cef2d2fb84fc77af1a7a88ad4c978a5b344ad23" dependencies = [ "dotenvy", - "observability_deps 0.1.0 (git+https://github.com/CeresDB/influxql)", + "observability_deps", "parking_lot 0.12.1", "tempfile", "tracing-log", diff --git a/Cargo.toml b/Cargo.toml index 5755b65c2a..c17228c9e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -89,6 +89,10 @@ lazy_static = "1.4.0" log = "0.4" logger = { path = "components/logger" } lru = "0.7.6" +influxql-logical-planner = { git = "https://github.com/CeresDB/influxql", package = "iox_query_influxql" } +influxql-parser = { git = "https://github.com/CeresDB/influxql", package = "influxdb_influxql_parser" } +influxql-query = { git = "https://github.com/CeresDB/influxql", package = "iox_query" } +influxql-schema = { git = "https://github.com/CeresDB/influxql", package = "schema" } interpreters = { path = "interpreters" } itertools = "0.10.5" meta_client = { path = "meta_client" } diff --git a/analytic_engine/src/sst/parquet/hybrid.rs b/analytic_engine/src/sst/parquet/hybrid.rs index 523786b080..df0b3808af 100644 --- a/analytic_engine/src/sst/parquet/hybrid.rs +++ b/analytic_engine/src/sst/parquet/hybrid.rs @@ -74,9 +74,8 @@ impl ArrayHandle { } // Note: this require primitive array - - fn data_slice(&self) -> &[u8] { - unimplemented!() + fn data_slice(&self) -> Vec { + self.array.to_data().buffers()[0].as_slice().to_vec() } fn nulls(&self) -> Option<&NullBuffer> { diff --git a/query_engine/Cargo.toml b/query_engine/Cargo.toml index abb1b210dc..796a4433ba 100644 --- a/query_engine/Cargo.toml +++ b/query_engine/Cargo.toml @@ -20,7 +20,7 @@ common_util = { workspace = true } datafusion = { workspace = true } df_operator = { workspace = true } futures = { workspace = true } -iox_query = { git = "https://github.com/CeresDB/influxql" } +influxql-query = { workspace = true } log = { workspace = true } query_frontend = { workspace = true } serde = { workspace = true } diff --git a/query_engine/src/context.rs b/query_engine/src/context.rs index f7aad2779c..568b8719f6 100644 --- a/query_engine/src/context.rs +++ b/query_engine/src/context.rs @@ -69,7 +69,7 @@ impl Context { .with_query_planner(Arc::new(QueryPlannerAdapter)) .with_analyzer_rules(Self::analyzer_rules()) .with_optimizer_rules(logical_optimize_rules); - let state = iox_query::logical_optimizer::register_iox_logical_optimizers(state); + let state = influxql_query::logical_optimizer::register_iox_logical_optimizers(state); let physical_optimizer = Self::apply_adapters_for_physical_optimize_rules(state.physical_optimizers()); SessionContext::with_state(state.with_physical_optimizer_rules(physical_optimizer)) diff --git a/query_engine/src/df_planner_extension/mod.rs b/query_engine/src/df_planner_extension/mod.rs index c6e1f294ed..be17f52a91 100644 --- a/query_engine/src/df_planner_extension/mod.rs +++ b/query_engine/src/df_planner_extension/mod.rs @@ -30,7 +30,7 @@ impl QueryPlanner for QueryPlannerAdapter { let extension_planners: Vec> = vec![ Arc::new(table_scan_by_primary_key::Planner), Arc::new(prom_align::PromAlignPlanner), - Arc::new(iox_query::exec::context::IOxExtensionPlanner {}), + Arc::new(influxql_query::exec::context::IOxExtensionPlanner {}), ]; let physical_planner = DefaultPhysicalPlanner::with_extension_planners(extension_planners); diff --git a/query_frontend/Cargo.toml b/query_frontend/Cargo.toml index a5203337d6..9832c23f29 100644 --- a/query_frontend/Cargo.toml +++ b/query_frontend/Cargo.toml @@ -26,9 +26,9 @@ datafusion = { workspace = true } datafusion-proto = { workspace = true } df_operator = { workspace = true } hashbrown = { version = "0.12", features = ["raw"] } -influxql-logical-planner = { git = "https://github.com/CeresDB/influxql", branch = "chore-log", package = "iox_query_influxql" } -influxql-parser = { git = "https://github.com/CeresDB/influxql", branch = "chore-log", package = "influxdb_influxql_parser" } -influxql-schema = { git = "https://github.com/CeresDB/influxql", branch = "chore-log", package = "schema" } +influxql-logical-planner = { workspace = true } +influxql-parser = { workspace = true } +influxql-schema = { workspace = true } itertools = { workspace = true } lazy_static = { workspace = true } log = { workspace = true }