You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
We still have a few classes that do not yet have wrapper functions. Namely datafusion.object_store and datafusion.common. Additionally in datafusion.substrait we reference LogicalPlan that is not exposed.
Also worth doing is reviewing the excellent PR #751 to see how it now fits in with the updated python wrappers.
Describe the solution you'd like
Add missing wrappers and validate namespace corrections
import datafusion
import datafusion.functions
import datafusion.object_store
import datafusion.substrait
def missing_exports(internal_obj, wrapped_obj):
for attr in dir(internal_obj):
if attr not in dir(wrapped_obj):
print(f"Missing attribute. Object name: {wrapped_obj.__name__}, Attribute name: {attr}")
continue
internal_attr = getattr(internal_obj, attr)
wrapped_attr = getattr(wrapped_obj, attr)
if internal_attr is not None and wrapped_attr is None:
print(f"Attribute exists but is None. Object name: {wrapped_obj.__name__}, Attribute name: {attr}")
if attr in ["__self__", "__class__"]:
continue
if isinstance(internal_attr, list):
for val in internal_attr:
if val not in wrapped_attr:
print(f"Missing value in list. Object name: {wrapped_obj.__name__}, Attribute name: {attr}, Value: {val}")
elif hasattr(internal_attr, '__dict__'):
missing_exports(internal_attr, wrapped_attr)
missing_exports(datafusion._internal, datafusion)
I can work on adding these tomorrow morning and I can also add this code as a unit test.
Activity
Michael-J-Ward commentedon Jul 26, 2024
Question: Have you ever used or do you know of a tool to run queries over python / rust codebases?
It would be nice if we could generate a concrete report of what is not exposed.
timsaucer commentedon Jul 26, 2024
No, but I did write a small script to check and this is what I see missing:
Code to generate:
I can work on adding these tomorrow morning and I can also add this code as a unit test.
timsaucer commentedon Jul 26, 2024
FWIW I don't know if all of these need to be exported. It's probably worth looking through each one.
Spaarsh commentedon Mar 6, 2025
Just an update on this one. Upon running the script, this is the output: