Skip to content

function module in python binding is broken in 6.0 #1328

Closed

Description

@jimexist

Describe the bug

the function module in python binding is broken in 6.0

To Reproduce

In [1]: import datafusion
f
In [2]: from datafusion import functions

In [3]: dir(functions)
Out[3]:
['__builtins__',
 '__cached__',
 '__doc__',
 '__file__',
 '__getattr__',
 '__loader__',
 '__name__',
 '__package__',
 '__spec__',
 'functions']

Expected behavior

expect the function module to be only one level below Datafusion.

Additional context

related

  1. Rework the python bindings [WIP] #856
  2. Rework the python bindings using conversion traits from arrow-rs  #873

Activity

  1. houqp commented on Nov 18, 2021

    @houqp
    Member

    @jimexist this was intentional, see #1287 (comment).

  2. houqp commented on Nov 18, 2021

    @houqp
    Member

    I don't have a strong opinion on this though, if you think there is a valid use-case for having the functions module, we can add it back.

  3. houqp commented on Nov 18, 2021

    @houqp
    Member

    #1287 (comment) is the comment that made me change my mind on my original PR :)

  4. jimexist commented on Nov 18, 2021

    @jimexist
    MemberAuthor

    I don't have a strong opinion on this though, if you think there is a valid use-case for having the functions module, we can add it back.

    so you are saying that we should use:

     from datafusion.functions import functions as f

    instead of

     from datafusion import functions as f

    having two layers of functions is unintuitive

  5. jimexist commented on Nov 18, 2021

    @jimexist
    MemberAuthor

    ah I see now that I can do

    from datafusion.functions import md5
  6. houqp commented on Nov 18, 2021

    @houqp
    Member

    from datafusion import functions as f should still work, it's just that datafusion.functions won't work anymore.

  7. houqp commented on Nov 18, 2021

    @houqp
    Member

    oh, i see what confused you. yeah, it would be better if dir works with functions module :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions