This is an automated email from the ASF dual-hosted git repository.

kamille pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-horaedb.git


The following commit(s) were added to refs/heads/main by this push:
     new a7560876 fix: bump influxql, fix query priority (#1495)
a7560876 is described below

commit a75608760badb042a126b5443b3dc3915aad5958
Author: Jiacai Liu <[email protected]>
AuthorDate: Wed Mar 6 10:11:38 2024 +0800

    fix: bump influxql, fix query priority (#1495)
    
    ## Rationale
    When time column is not in `select`, `extract_time_range` will not find
    time range of one query
    
    ## Detailed Changes
    - https://github.com/CeresDB/influxql/pull/16
    
    ## Test Plan
    CI
---
 .github/workflows/ci.yml                             |  2 ++
 Cargo.lock                                           | 20 ++++++++++----------
 Cargo.toml                                           |  8 ++++----
 .../cases/env/local/ddl/query-plan.result            | 10 ++++++++++
 integration_tests/cases/env/local/ddl/query-plan.sql |  6 ++++++
 5 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3ee690b6..14ca52b4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -28,12 +28,14 @@ on:
       - 'src/**'
       - 'integration_tests/**'
       - 'Cargo.toml'
+      - 'Cargo.lock'
       - '.github/workflows/ci.yml'
   pull_request:
     paths:
       - 'src/**'
       - 'integration_tests/**'
       - 'Cargo.toml'
+      - 'Cargo.lock'
       - '.github/workflows/ci.yml'
 
 # Common environment variables
diff --git a/Cargo.lock b/Cargo.lock
index 47acfbe4..08c2698a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -690,7 +690,7 @@ dependencies = [
 [[package]]
 name = "arrow_util"
 version = "0.1.0"
-source = 
"git+https://github.com/CeresDB/influxql.git?rev=b9fb3ca#b9fb3ca59fda99997a51cab7a56d34fb2126dd08";
+source = 
"git+https://github.com/CeresDB/influxql.git?rev=05a8a9f#05a8a9f79c5b8e3c6d324b214e7ccf910c2f6b73";
 dependencies = [
  "ahash 0.8.3",
  "arrow 49.0.0",
@@ -2193,7 +2193,7 @@ dependencies = [
 [[package]]
 name = "datafusion_util"
 version = "0.1.0"
-source = 
"git+https://github.com/CeresDB/influxql.git?rev=b9fb3ca#b9fb3ca59fda99997a51cab7a56d34fb2126dd08";
+source = 
"git+https://github.com/CeresDB/influxql.git?rev=05a8a9f#05a8a9f79c5b8e3c6d324b214e7ccf910c2f6b73";
 dependencies = [
  "async-trait",
  "datafusion",
@@ -2815,7 +2815,7 @@ checksum = 
"8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
 [[package]]
 name = "generated_types"
 version = "0.1.0"
-source = 
"git+https://github.com/CeresDB/influxql.git?rev=b9fb3ca#b9fb3ca59fda99997a51cab7a56d34fb2126dd08";
+source = 
"git+https://github.com/CeresDB/influxql.git?rev=05a8a9f#05a8a9f79c5b8e3c6d324b214e7ccf910c2f6b73";
 dependencies = [
  "pbjson",
  "pbjson-build",
@@ -3321,7 +3321,7 @@ dependencies = [
 [[package]]
 name = "influxdb_influxql_parser"
 version = "0.1.0"
-source = 
"git+https://github.com/CeresDB/influxql.git?rev=b9fb3ca#b9fb3ca59fda99997a51cab7a56d34fb2126dd08";
+source = 
"git+https://github.com/CeresDB/influxql.git?rev=05a8a9f#05a8a9f79c5b8e3c6d324b214e7ccf910c2f6b73";
 dependencies = [
  "chrono",
  "chrono-tz",
@@ -3414,7 +3414,7 @@ dependencies = [
 [[package]]
 name = "iox_query"
 version = "0.1.0"
-source = 
"git+https://github.com/CeresDB/influxql.git?rev=b9fb3ca#b9fb3ca59fda99997a51cab7a56d34fb2126dd08";
+source = 
"git+https://github.com/CeresDB/influxql.git?rev=05a8a9f#05a8a9f79c5b8e3c6d324b214e7ccf910c2f6b73";
 dependencies = [
  "arrow 49.0.0",
  "arrow_util",
@@ -3438,7 +3438,7 @@ dependencies = [
 [[package]]
 name = "iox_query_influxql"
 version = "0.1.0"
-source = 
"git+https://github.com/CeresDB/influxql.git?rev=b9fb3ca#b9fb3ca59fda99997a51cab7a56d34fb2126dd08";
+source = 
"git+https://github.com/CeresDB/influxql.git?rev=05a8a9f#05a8a9f79c5b8e3c6d324b214e7ccf910c2f6b73";
 dependencies = [
  "arrow 49.0.0",
  "chrono",
@@ -4541,7 +4541,7 @@ dependencies = [
 [[package]]
 name = "observability_deps"
 version = "0.1.0"
-source = 
"git+https://github.com/CeresDB/influxql.git?rev=b9fb3ca#b9fb3ca59fda99997a51cab7a56d34fb2126dd08";
+source = 
"git+https://github.com/CeresDB/influxql.git?rev=05a8a9f#05a8a9f79c5b8e3c6d324b214e7ccf910c2f6b73";
 dependencies = [
  "tracing",
 ]
@@ -5536,7 +5536,7 @@ dependencies = [
 [[package]]
 name = "query_functions"
 version = "0.1.0"
-source = 
"git+https://github.com/CeresDB/influxql.git?rev=b9fb3ca#b9fb3ca59fda99997a51cab7a56d34fb2126dd08";
+source = 
"git+https://github.com/CeresDB/influxql.git?rev=05a8a9f#05a8a9f79c5b8e3c6d324b214e7ccf910c2f6b73";
 dependencies = [
  "arrow 49.0.0",
  "chrono",
@@ -6199,7 +6199,7 @@ dependencies = [
 [[package]]
 name = "schema"
 version = "0.1.0"
-source = 
"git+https://github.com/CeresDB/influxql.git?rev=b9fb3ca#b9fb3ca59fda99997a51cab7a56d34fb2126dd08";
+source = 
"git+https://github.com/CeresDB/influxql.git?rev=05a8a9f#05a8a9f79c5b8e3c6d324b214e7ccf910c2f6b73";
 dependencies = [
  "arrow 49.0.0",
  "hashbrown 0.13.2",
@@ -7002,7 +7002,7 @@ dependencies = [
 [[package]]
 name = "test_helpers"
 version = "0.1.0"
-source = 
"git+https://github.com/CeresDB/influxql.git?rev=b9fb3ca#b9fb3ca59fda99997a51cab7a56d34fb2126dd08";
+source = 
"git+https://github.com/CeresDB/influxql.git?rev=05a8a9f#05a8a9f79c5b8e3c6d324b214e7ccf910c2f6b73";
 dependencies = [
  "dotenvy",
  "observability_deps",
diff --git a/Cargo.toml b/Cargo.toml
index deb63e11..ec6fcd4e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -121,10 +121,10 @@ hash_ext = { path = "src/components/hash_ext" }
 hex = "0.4.3"
 hyperloglog = { git = "https://github.com/jedisct1/rust-hyperloglog.git";, rev 
= "425487ce910f26636fbde8c4d640b538431aad50" }
 id_allocator = { path = "src/components/id_allocator" }
-influxql-logical-planner = { git = "https://github.com/CeresDB/influxql.git";, 
rev = "b9fb3ca", package = "iox_query_influxql" }
-influxql-parser = { git = "https://github.com/CeresDB/influxql.git";, rev = 
"b9fb3ca", package = "influxdb_influxql_parser" }
-influxql-query = { git = "https://github.com/CeresDB/influxql.git";, rev = 
"b9fb3ca", package = "iox_query" }
-influxql-schema = { git = "https://github.com/CeresDB/influxql.git";, rev = 
"b9fb3ca", package = "schema" }
+influxql-logical-planner = { git = "https://github.com/CeresDB/influxql.git";, 
rev = "05a8a9f", package = "iox_query_influxql" }
+influxql-parser = { git = "https://github.com/CeresDB/influxql.git";, rev = 
"05a8a9f", package = "influxdb_influxql_parser" }
+influxql-query = { git = "https://github.com/CeresDB/influxql.git";, rev = 
"05a8a9f", package = "iox_query" }
+influxql-schema = { git = "https://github.com/CeresDB/influxql.git";, rev = 
"05a8a9f", package = "schema" }
 interpreters = { path = "src/interpreters" }
 itertools = "0.10.5"
 lz4_flex = { version = "0.11", default-features = false, features = ["frame"] }
diff --git a/integration_tests/cases/env/local/ddl/query-plan.result 
b/integration_tests/cases/env/local/ddl/query-plan.result
index 1f632184..ba092c26 100644
--- a/integration_tests/cases/env/local/ddl/query-plan.result
+++ b/integration_tests/cases/env/local/ddl/query-plan.result
@@ -45,6 +45,16 @@ plan_type,plan,
 String("Plan with Metrics"),String("ScanTable: 
table=03_dml_select_real_time_range, parallelism=8, priority=High, 
partition_count=UnknownPartitioning(8), metrics=[\nPredicate { exprs:[t >= 
TimestampMillisecond(1695348001000, None), t < 
TimestampMillisecond(1695348002000, None)], time_range:TimeRange { 
inclusive_start: Timestamp(1695348001000), exclusive_end: 
Timestamp(1695348002000) } }\nscan_table:\n    do_merge_sort=true\n    
iter_num=1\n    merge_iter_0:\n        init_duration=xxs\n   [...]
 
 
+-- This query should have higher priority
+-- SQLNESS REPLACE duration=\d+.?\d*(µ|m|n) duration=xx
+-- SQLNESS REPLACE metrics=\[.*?s\] metrics=xx
+explain analyze select name from `03_dml_select_real_time_range`
+where t >= 1695348001000 and t < 1695348002000;
+
+plan_type,plan,
+String("Plan with Metrics"),String("ProjectionExec: expr=[name@0 as name], 
metrics=xx\n  ScanTable: table=03_dml_select_real_time_range, parallelism=8, 
priority=High, partition_count=UnknownPartitioning(8), metrics=[\nPredicate { 
exprs:[t >= TimestampMillisecond(1695348001000, None), t < 
TimestampMillisecond(1695348002000, None)], time_range:TimeRange { 
inclusive_start: Timestamp(1695348001000), exclusive_end: 
Timestamp(1695348002000) } }\nscan_table:\n    do_merge_sort=true\n    iter_nu 
[...]
+
+
 -- This query should not include memtable
 -- SQLNESS REPLACE duration=\d+.?\d*(µ|m|n) duration=xx
 -- SQLNESS REPLACE metrics=\[.*?s\] metrics=xx
diff --git a/integration_tests/cases/env/local/ddl/query-plan.sql 
b/integration_tests/cases/env/local/ddl/query-plan.sql
index 5217b1a0..772e3dc8 100644
--- a/integration_tests/cases/env/local/ddl/query-plan.sql
+++ b/integration_tests/cases/env/local/ddl/query-plan.sql
@@ -28,6 +28,12 @@ where t > 1695348001000;
 explain analyze select t from `03_dml_select_real_time_range`
 where t >= 1695348001000 and t < 1695348002000;
 
+-- This query should have higher priority
+-- SQLNESS REPLACE duration=\d+.?\d*(µ|m|n) duration=xx
+-- SQLNESS REPLACE metrics=\[.*?s\] metrics=xx
+explain analyze select name from `03_dml_select_real_time_range`
+where t >= 1695348001000 and t < 1695348002000;
+
 -- This query should not include memtable
 -- SQLNESS REPLACE duration=\d+.?\d*(µ|m|n) duration=xx
 -- SQLNESS REPLACE metrics=\[.*?s\] metrics=xx


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to