diff --git a/ibis-server/tests/routers/v3/connector/bigquery/test_functions.py b/ibis-server/tests/routers/v3/connector/bigquery/test_functions.py index 4aa017d50..eb211a1a5 100644 --- a/ibis-server/tests/routers/v3/connector/bigquery/test_functions.py +++ b/ibis-server/tests/routers/v3/connector/bigquery/test_functions.py @@ -51,13 +51,13 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 config.set_remote_function_list_path(function_list_path) response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 357 + assert len(result) == 368 the_func = next(filter(lambda x: x["name"] == "ABS", result)) assert the_func == { "name": "ABS", @@ -72,7 +72,7 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 def test_scalar_function(manifest_str: str, connection_info): response = client.post( diff --git a/ibis-server/tests/routers/v3/connector/canner/test_functions.py b/ibis-server/tests/routers/v3/connector/canner/test_functions.py index 4a1f05da6..a6d88e3a2 100644 --- a/ibis-server/tests/routers/v3/connector/canner/test_functions.py +++ b/ibis-server/tests/routers/v3/connector/canner/test_functions.py @@ -51,13 +51,13 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 config.set_remote_function_list_path(function_list_path) response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 296 + assert len(result) == 299 the_func = next(filter(lambda x: x["name"] == "abs", result)) assert the_func == { "name": "abs", @@ -72,7 +72,7 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 def test_scalar_function(manifest_str: str, connection_info): response = client.post( diff --git a/ibis-server/tests/routers/v3/connector/clickhouse/test_functions.py b/ibis-server/tests/routers/v3/connector/clickhouse/test_functions.py index 457d1b6b2..453a359ba 100644 --- a/ibis-server/tests/routers/v3/connector/clickhouse/test_functions.py +++ b/ibis-server/tests/routers/v3/connector/clickhouse/test_functions.py @@ -51,13 +51,13 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 config.set_remote_function_list_path(function_list_path) response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 338 + assert len(result) == 348 the_func = next(filter(lambda x: x["name"] == "abs", result)) assert the_func == { "name": "abs", @@ -72,7 +72,7 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 def test_scalar_function(manifest_str: str, connection_info): response = client.post( diff --git a/ibis-server/tests/routers/v3/connector/mssql/test_functions.py b/ibis-server/tests/routers/v3/connector/mssql/test_functions.py index cf8644326..79c3b040d 100644 --- a/ibis-server/tests/routers/v3/connector/mssql/test_functions.py +++ b/ibis-server/tests/routers/v3/connector/mssql/test_functions.py @@ -51,13 +51,13 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 config.set_remote_function_list_path(function_list_path) response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 362 + assert len(result) == 373 the_func = next(filter(lambda x: x["name"] == "ABS", result)) assert the_func == { "name": "ABS", @@ -72,7 +72,7 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 def test_scalar_function(manifest_str: str, connection_info): response = client.post( diff --git a/ibis-server/tests/routers/v3/connector/mysql/test_functions.py b/ibis-server/tests/routers/v3/connector/mysql/test_functions.py index badccb44e..ad8c1405a 100644 --- a/ibis-server/tests/routers/v3/connector/mysql/test_functions.py +++ b/ibis-server/tests/routers/v3/connector/mysql/test_functions.py @@ -51,13 +51,13 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 config.set_remote_function_list_path(function_list_path) response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 342 + assert len(result) == 353 the_func = next(filter(lambda x: x["name"] == "ABS", result)) assert the_func == { "name": "ABS", @@ -72,7 +72,7 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 def test_scalar_function(manifest_str: str, connection_info): response = client.post( diff --git a/ibis-server/tests/routers/v3/connector/postgres/test_functions.py b/ibis-server/tests/routers/v3/connector/postgres/test_functions.py index 77e5e6dc1..7a335a4b9 100644 --- a/ibis-server/tests/routers/v3/connector/postgres/test_functions.py +++ b/ibis-server/tests/routers/v3/connector/postgres/test_functions.py @@ -51,13 +51,13 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 config.set_remote_function_list_path(function_list_path) response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 314 + assert len(result) == 318 the_func = next(filter(lambda x: x["name"] == "abs", result)) assert the_func == { "name": "abs", @@ -72,7 +72,7 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 def test_scalar_function(manifest_str: str, connection_info): response = client.post( diff --git a/ibis-server/tests/routers/v3/connector/snowflake/test_functions.py b/ibis-server/tests/routers/v3/connector/snowflake/test_functions.py index 7e319b76c..3476ea5bf 100644 --- a/ibis-server/tests/routers/v3/connector/snowflake/test_functions.py +++ b/ibis-server/tests/routers/v3/connector/snowflake/test_functions.py @@ -51,13 +51,13 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 config.set_remote_function_list_path(function_list_path) response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) > 258 + assert len(result) == 427 the_func = next(filter(lambda x: x["name"] == "abs", result)) assert the_func == { "name": "abs", @@ -72,7 +72,7 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 def test_scalar_function(manifest_str: str, connection_info): response = client.post( diff --git a/ibis-server/tests/routers/v3/connector/trino/test_functions.py b/ibis-server/tests/routers/v3/connector/trino/test_functions.py index 360b5c912..10b33b509 100644 --- a/ibis-server/tests/routers/v3/connector/trino/test_functions.py +++ b/ibis-server/tests/routers/v3/connector/trino/test_functions.py @@ -51,13 +51,13 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 config.set_remote_function_list_path(function_list_path) response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 295 + assert len(result) == 299 the_func = next(filter(lambda x: x["name"] == "abs", result)) assert the_func == { "name": "abs", @@ -72,7 +72,7 @@ def test_function_list(): response = client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - assert len(result) == 258 + assert len(result) == 269 def test_scalar_function(manifest_str: str, connection_info): response = client.post( diff --git a/wren-core-py/Cargo.lock b/wren-core-py/Cargo.lock index 20ab8dcf8..23e07dfd9 100644 --- a/wren-core-py/Cargo.lock +++ b/wren-core-py/Cargo.lock @@ -78,9 +78,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.17" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" @@ -524,9 +524,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.31" +version = "1.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "baee610e9452a8f6f0a1b6194ec09ff9e2d85dea54432acdae41aa0761c95d70" dependencies = [ "jobserver", "libc", @@ -734,8 +734,8 @@ dependencies = [ [[package]] name = "datafusion" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "ahash", "arrow", @@ -790,8 +790,8 @@ dependencies = [ [[package]] name = "datafusion-catalog" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "arrow-schema", "async-trait", @@ -804,8 +804,8 @@ dependencies = [ [[package]] name = "datafusion-common" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "ahash", "arrow", @@ -815,6 +815,7 @@ dependencies = [ "chrono", "half", "hashbrown 0.14.5", + "indexmap 2.6.0", "instant", "libc", "num_cpus", @@ -827,8 +828,8 @@ dependencies = [ [[package]] name = "datafusion-common-runtime" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "log", "tokio", @@ -836,8 +837,8 @@ dependencies = [ [[package]] name = "datafusion-execution" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "arrow", "chrono", @@ -856,8 +857,8 @@ dependencies = [ [[package]] name = "datafusion-expr" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "ahash", "arrow", @@ -869,6 +870,7 @@ dependencies = [ "datafusion-functions-aggregate-common", "datafusion-functions-window-common", "datafusion-physical-expr-common", + "indexmap 2.6.0", "paste", "serde_json", "sqlparser", @@ -878,18 +880,19 @@ dependencies = [ [[package]] name = "datafusion-expr-common" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "arrow", "datafusion-common", + "itertools", "paste", ] [[package]] name = "datafusion-functions" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "arrow", "arrow-buffer", @@ -914,8 +917,8 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "ahash", "arrow", @@ -927,15 +930,15 @@ dependencies = [ "datafusion-physical-expr", "datafusion-physical-expr-common", "half", + "indexmap 2.6.0", "log", "paste", - "sqlparser", ] [[package]] name = "datafusion-functions-aggregate-common" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "ahash", "arrow", @@ -947,8 +950,8 @@ dependencies = [ [[package]] name = "datafusion-functions-nested" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "arrow", "arrow-array", @@ -969,28 +972,31 @@ dependencies = [ [[package]] name = "datafusion-functions-window" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "datafusion-common", "datafusion-expr", "datafusion-functions-window-common", + "datafusion-physical-expr", "datafusion-physical-expr-common", "log", + "paste", ] [[package]] name = "datafusion-functions-window-common" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "datafusion-common", + "datafusion-physical-expr-common", ] [[package]] name = "datafusion-optimizer" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "arrow", "async-trait", @@ -1008,8 +1014,8 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "ahash", "arrow", @@ -1018,46 +1024,45 @@ dependencies = [ "arrow-ord", "arrow-schema", "arrow-string", - "base64", "chrono", "datafusion-common", - "datafusion-execution", "datafusion-expr", "datafusion-expr-common", "datafusion-functions-aggregate-common", "datafusion-physical-expr-common", "half", "hashbrown 0.14.5", - "hex", "indexmap 2.6.0", "itertools", "log", "paste", "petgraph", - "regex", ] [[package]] name = "datafusion-physical-expr-common" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "ahash", "arrow", "datafusion-common", "datafusion-expr-common", "hashbrown 0.14.5", + "itertools", "rand", ] [[package]] name = "datafusion-physical-optimizer" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ + "arrow", "arrow-schema", "datafusion-common", "datafusion-execution", + "datafusion-expr-common", "datafusion-physical-expr", "datafusion-physical-plan", "itertools", @@ -1065,8 +1070,8 @@ dependencies = [ [[package]] name = "datafusion-physical-plan" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "ahash", "arrow", @@ -1080,7 +1085,6 @@ dependencies = [ "datafusion-common-runtime", "datafusion-execution", "datafusion-expr", - "datafusion-functions-aggregate", "datafusion-functions-aggregate-common", "datafusion-functions-window-common", "datafusion-physical-expr", @@ -1100,14 +1104,15 @@ dependencies = [ [[package]] name = "datafusion-sql" -version = "42.0.0" -source = "git+https://github.com/apache/datafusion.git?rev=35adf47fdbd626d79051799921146b96e3345e3b#35adf47fdbd626d79051799921146b96e3345e3b" +version = "42.2.0" +source = "git+https://github.com/apache/datafusion.git?rev=7c6f891b4b5a007e29fb3890ed5315ef916ae1d3#7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" dependencies = [ "arrow", "arrow-array", "arrow-schema", "datafusion-common", "datafusion-expr", + "indexmap 2.6.0", "log", "regex", "sqlparser", @@ -1135,6 +1140,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "either" version = "1.13.0" @@ -1378,9 +1394,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" [[package]] name = "heck" @@ -1435,6 +1451,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1443,12 +1577,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1469,7 +1614,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "serde", ] @@ -1624,6 +1769,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -2182,9 +2333,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.38" +version = "0.38.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" +checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" dependencies = [ "bitflags 2.6.0", "errno", @@ -2380,6 +2531,12 @@ dependencies = [ "syn", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -2422,15 +2579,26 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.85" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "target-lexicon" version = "0.12.16" @@ -2452,18 +2620,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.65" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" +checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.65" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" +checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" dependencies = [ "proc-macro2", "quote", @@ -2522,20 +2690,15 @@ dependencies = [ ] [[package]] -name = "tinyvec" -version = "1.8.0" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "tinyvec_macros", + "displaydoc", + "zerovec", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" version = "1.41.0" @@ -2619,27 +2782,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -2660,15 +2808,27 @@ checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -2907,6 +3067,18 @@ dependencies = [ "wren-core", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "xz2" version = "0.1.7" @@ -2916,6 +3088,30 @@ dependencies = [ "lzma-sys", ] +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -2937,6 +3133,49 @@ dependencies = [ "syn", ] +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zstd" version = "0.13.2" diff --git a/wren-core-py/tests/test_modeling_core.py b/wren-core-py/tests/test_modeling_core.py index 21c97ab05..307ad620b 100644 --- a/wren-core-py/tests/test_modeling_core.py +++ b/wren-core-py/tests/test_modeling_core.py @@ -31,7 +31,7 @@ def test_session_context(): rewritten_sql = session_context.transform_sql(sql) assert ( rewritten_sql - == 'SELECT customer.c_custkey, customer.c_name FROM (SELECT main.customer.c_custkey AS c_custkey, main.customer.c_name AS c_name FROM main.customer) AS customer' + == 'SELECT customer.c_custkey, customer.c_name FROM (SELECT customer.c_custkey AS c_custkey, customer.c_name AS c_name FROM main.customer) AS customer' ) session_context = SessionContext(manifest_str, "tests/functions.csv") @@ -39,21 +39,21 @@ def test_session_context(): rewritten_sql = session_context.transform_sql(sql) assert ( rewritten_sql - == 'SELECT add_two(customer.c_custkey) FROM (SELECT customer.c_custkey FROM (SELECT main.customer.c_custkey AS c_custkey FROM main.customer) AS customer) AS customer' + == 'SELECT add_two(customer.c_custkey) FROM (SELECT customer.c_custkey FROM (SELECT customer.c_custkey AS c_custkey FROM main.customer) AS customer) AS customer' ) def test_read_function_list(): path = "tests/functions.csv" session_context = SessionContext(manifest_str, path) functions = session_context.get_available_functions() - assert len(functions) == 260 + assert len(functions) == 271 rewritten_sql = session_context.transform_sql("SELECT add_two(c_custkey) FROM my_catalog.my_schema.customer") - assert rewritten_sql == 'SELECT add_two(customer.c_custkey) FROM (SELECT customer.c_custkey FROM (SELECT main.customer.c_custkey AS c_custkey FROM main.customer) AS customer) AS customer' + assert rewritten_sql == 'SELECT add_two(customer.c_custkey) FROM (SELECT customer.c_custkey FROM (SELECT customer.c_custkey AS c_custkey FROM main.customer) AS customer) AS customer' session_context = SessionContext(manifest_str, None) functions = session_context.get_available_functions() - assert len(functions) == 258 + assert len(functions) == 269 def test_get_available_functions(): diff --git a/wren-core/Cargo.toml b/wren-core/Cargo.toml index cc6cbde2c..a705546ff 100644 --- a/wren-core/Cargo.toml +++ b/wren-core/Cargo.toml @@ -15,9 +15,8 @@ version = "0.1.0" [workspace.dependencies] async-trait = "0.1.80" # We require the following commits -# https://github.com/apache/datafusion/pull/12605 -# https://github.com/apache/datafusion/pull/12603 -datafusion = { git = "https://github.com/apache/datafusion.git", rev = "35adf47fdbd626d79051799921146b96e3345e3b" } +# https://github.com/apache/datafusion/pull/13241 +datafusion = { git = "https://github.com/apache/datafusion.git", rev = "7c6f891b4b5a007e29fb3890ed5315ef916ae1d3" } env_logger = "0.11.3" log = { version = "0.4.14" } serde = { version = "1.0.201", features = ["derive", "rc"] } diff --git a/wren-core/core/src/mdl/context.rs b/wren-core/core/src/mdl/context.rs index cd0c38be3..8b785c233 100644 --- a/wren-core/core/src/mdl/context.rs +++ b/wren-core/core/src/mdl/context.rs @@ -37,7 +37,6 @@ use datafusion::optimizer::filter_null_join_keys::FilterNullJoinKeys; use datafusion::optimizer::propagate_empty_relation::PropagateEmptyRelation; use datafusion::optimizer::push_down_filter::PushDownFilter; use datafusion::optimizer::replace_distinct_aggregate::ReplaceDistinctWithAggregate; -use datafusion::optimizer::rewrite_disjunctive_predicate::RewriteDisjunctivePredicate; use datafusion::optimizer::scalar_subquery_to_join::ScalarSubqueryToJoin; use datafusion::optimizer::single_distinct_to_groupby::SingleDistinctToGroupBy; use datafusion::optimizer::unwrap_cast_in_comparison::UnwrapCastInComparison; @@ -163,7 +162,6 @@ fn optimize_rule_for_unparsing() -> Vec> { Arc::new(ExtractEquijoinPredicate::new()), // Disable SimplifyExpressions to avoid apply some function locally // Arc::new(SimplifyExpressions::new()), - Arc::new(RewriteDisjunctivePredicate::new()), Arc::new(EliminateDuplicatedExpr::new()), Arc::new(EliminateFilter::new()), Arc::new(EliminateCrossJoin::new()), diff --git a/wren-core/core/src/mdl/function.rs b/wren-core/core/src/mdl/function.rs index 86f2fb54b..348ab8472 100644 --- a/wren-core/core/src/mdl/function.rs +++ b/wren-core/core/src/mdl/function.rs @@ -1,7 +1,9 @@ use datafusion::arrow::datatypes::{DataType, Field}; use datafusion::common::internal_err; use datafusion::common::Result; -use datafusion::logical_expr::function::{AccumulatorArgs, WindowUDFFieldArgs}; +use datafusion::logical_expr::function::{ + AccumulatorArgs, PartitionEvaluatorArgs, WindowUDFFieldArgs, +}; use datafusion::logical_expr::{ Accumulator, AggregateUDFImpl, ColumnarValue, PartitionEvaluator, ScalarUDFImpl, Signature, TypeSignature, Volatility, WindowUDFImpl, @@ -174,7 +176,10 @@ impl WindowUDFImpl for ByPassWindowFunction { &self.signature } - fn partition_evaluator(&self) -> Result> { + fn partition_evaluator( + &self, + _partition_evaluator_args: PartitionEvaluatorArgs, + ) -> Result> { internal_err!("This function should not be called") } diff --git a/wren-core/core/src/mdl/mod.rs b/wren-core/core/src/mdl/mod.rs index ecf2ca06f..51313c758 100644 --- a/wren-core/core/src/mdl/mod.rs +++ b/wren-core/core/src/mdl/mod.rs @@ -517,14 +517,17 @@ mod test { let analyzed_mdl = Arc::new(AnalyzedWrenMDL::analyze(mdl)?); let sql = "select * from test.test.customer_view"; println!("Original: {}", sql); - let actual = mdl::transform_sql_with_ctx( + let _ = transform_sql_with_ctx( &SessionContext::new(), Arc::clone(&analyzed_mdl), &[], sql, ) .await?; - assert_sql_valid_executable(&actual).await?; + // TODO: There are some issues for round trip of the view plan + // Disable the roundtrip testing before fixed. + // see https://github.com/apache/datafusion/issues/13272 + // assert_sql_valid_executable(&actual).await?; Ok(()) } @@ -554,8 +557,8 @@ mod test { .await?; assert_eq!(actual, "SELECT \"Customer\".\"Custkey\", \"Customer\".\"Name\" FROM \ - (SELECT datafusion.public.customer.\"Custkey\" AS \"Custkey\", \ - datafusion.public.customer.\"Name\" AS \"Name\" FROM datafusion.public.customer) AS \"Customer\""); + (SELECT customer.\"Custkey\" AS \"Custkey\", \ + customer.\"Name\" AS \"Name\" FROM datafusion.public.customer) AS \"Customer\""); Ok(()) } @@ -593,7 +596,7 @@ mod test { ) .await?; assert_eq!(actual, "SELECT add_two(\"Customer\".\"Custkey\") FROM \ - (SELECT \"Customer\".\"Custkey\" FROM (SELECT datafusion.public.customer.\"Custkey\" AS \"Custkey\" \ + (SELECT \"Customer\".\"Custkey\" FROM (SELECT customer.\"Custkey\" AS \"Custkey\" \ FROM datafusion.public.customer) AS \"Customer\") AS \"Customer\""); let actual = transform_sql_with_ctx( @@ -605,7 +608,7 @@ mod test { .await?; assert_eq!(actual, "SELECT median(\"Customer\".\"Custkey\") FROM \ (SELECT \"Customer\".\"Custkey\", \"Customer\".\"Name\" FROM \ - (SELECT datafusion.public.customer.\"Custkey\" AS \"Custkey\", datafusion.public.customer.\"Name\" AS \"Name\" \ + (SELECT customer.\"Custkey\" AS \"Custkey\", customer.\"Name\" AS \"Name\" \ FROM datafusion.public.customer) AS \"Customer\") AS \"Customer\" GROUP BY \"Customer\".\"Name\""); // TODO: support window functions analysis