Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more math functions and unit tests to python crate #748

Merged
merged 3 commits into from
Jul 20, 2021

Conversation

jimexist
Copy link
Member

@jimexist jimexist commented Jul 18, 2021

Which issue does this PR close?

add more math functions and unit tests to python crate.

based on #742 so review that first

Closes #.

Rationale for this change

  • bind more already defined math functions
  • add unit tests

What changes are included in this PR?

In [3]: from datafusion import functions as f

In [4]: dir(f)
Out[4]:
['__all__',
 '__doc__',
 '__loader__',
 '__name__',
 '__package__',
 '__spec__',
 'abs',
 'acos',
 'array',
 'ascii',
 'asin',
 'atan',
 'avg',
 'bit_length',
 'btrim',
 'ceil',
 'character_length',
 'chr',
 'col',
 'concat_ws',
 'cos',
 'count',
 'exp',
 'floor',
 'in_list',
 'initcap',
 'left',
 'lit',
 'ln',
 'log10',
 'log2',
 'lower',
 'lpad',
 'ltrim',
 'max',
 'md5',
 'min',
 'now',
 'octet_length',
 'random',
 'regexp_replace',
 'repeat',
 'replace',
 'reverse',
 'right',
 'round',
 'rpad',
 'rtrim',
 'sha224',
 'sha256',
 'sha384',
 'sha512',
 'signum',
 'sin',
 'split_part',
 'sqrt',
 'starts_with',
 'strpos',
 'substr',
 'sum',
 'tan',
 'to_hex',
 'translate',
 'trim',
 'trunc',
 'udaf',
 'udf',
 'upper']

Are there any user-facing changes?

@houqp
Copy link
Member

houqp commented Jul 18, 2021

really strange that the equality test is failing due to different object memory addresses but only for column 7 🤔

@jimexist jimexist force-pushed the add-py-funs branch 2 times, most recently from 572ddd3 to d68e807 Compare July 20, 2021 01:21
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alamb
Copy link
Contributor

alamb commented Jul 20, 2021

Thanks @jimexist

@alamb alamb merged commit 6cfaa29 into apache:master Jul 20, 2021
@jimexist jimexist deleted the add-py-funs branch July 20, 2021 15:42
@houqp houqp added enhancement New feature or request python labels Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants