apache / datafusion

Apache DataFusion SQL Query Engine
https://datafusion.apache.org/
Apache License 2.0
5.21k stars 957 forks source link

build(deps): upgrade sqlparser to 0.46.0 #10392

Open tisonkun opened 1 week ago

tisonkun commented 1 week ago

Upgrade sqlparser to 0.46.0. This should handle a few of breaking changes:

This is working in progress.

tisonkun commented 1 week ago

@jmhain Thanks for your patch. I've applied it to this branch. Let us continue fixing the breaking changes here when we have time :D

tisonkun commented 1 week ago

Pushed a commit to handle other breaking changes. Now remains the JsonAccess and Agg func refactor. I'm still understanding how they are logically changed ...

tisonkun commented 5 days ago

Seems that we should merge AggregateExpressionWithFilter and ArrayAgg handle logic into sql_function_to_expr.

alamb commented 4 days ago

I am going to give this PR a look to see if I can help unstick it

alamb commented 4 days ago

There is still a failure which I haven't had a chance to look into:

cargo test --test sqllogictests -- array
...
Running "array_query.slt"
Running "array.slt"
External error: query failed: DataFusion error: SQL error: ParserError("Expected variant object key name, found: 2")
[SQL] select make_array(1, 2, 3)[1:2], make_array(1.0, 2.0, 3.0)[2:3], make_array('h', 'e', 'l', 'l', 'o')[2:4];
at test_files/array.slt:859

Error: Execution("1 failures")
error: test failed, to rerun pass `-p datafusion-sqllogictest --test sqllogictests`

Caused by:
  process didn't exit successfully: `/Users/andrewlamb/Software/datafusion/target/debug/deps/sqllogictests-b3a0a4f302be541c array` (exit status: 1)