apache / datafusion-python

Apache DataFusion Python Bindings
https://datafusion.apache.org/python
Apache License 2.0
320 stars 63 forks source link

Tracking Upgrade to Datafusion 37 #663

Closed Michael-J-Ward closed 1 month ago

Michael-J-Ward commented 2 months ago

I sketched out some of the upgrade in #662 and wanted to share what I encountered.

Some major changes in between datafusion 36 and 37.

Needs Completing

1) Porting BuiltinFunctions

See this epic https://github.com/apache/datafusion/issues/9285.

That means much of datafusion-python::functions.rs needs an update. An incomplete first pass is https://github.com/apache/datafusion-python/pull/662/commits/83249fe9a4e809bb6065671bcaee543065d2d356

2) SectionContext::tables

It was removed in https://github.com/apache/datafusion/pull/9627

Many of the tests rely on this method. Does each test get updated to a new API or do we implement our own version to start and then update the tests until it's not necessary?

3) New Trait Methods

I just marked these as TODO to get the upgrade to compile. See https://github.com/apache/datafusion-python/pull/662/commits/8cd4fd43c57a8b3fb6733a85da3aac068b73dcd1

Michael-J-Ward commented 1 month ago

Current Status

The initial steps are completed and python -m pytest now passing in #662 (modulo 1, discussed below).

TODO

Besides the failing test