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

feat(query): add python udf script runtime #15494

Merged
merged 28 commits into from
May 28, 2024
Merged

Conversation

sundy-li
Copy link
Member

@sundy-li sundy-li commented May 13, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

  1. add python script runtime
  2. disable bendpy cause it's conflicted with python script runtime

Now we don't support python udf by default features.

We can enable it by using:

cargo build --bin databend-query --features "default,python-udf"

And the binary will contains the libpython3.12.so.1.0 link:

root@3d7690dd6269:/workspace# ldd ./target/debug/databend-query
        linux-vdso.so.1 (0x00007ffca2b96000)
        libpython3.12.so.1.0 => /usr/local/lib/libpython3.12.so.1.0 (0x0000787000993000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007870007c6000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007870007a9000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000078700078f000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x000078700076d000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000787000629000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x0000787000621000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000078700044d000)
        /lib64/ld-linux-x86-64.so.2 (0x000078701e532000)
        libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x0000787000448000)
  • Fixes #[Link the issue here]

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label May 13, 2024
@sundy-li sundy-li changed the title feat(query): add python script runtime feat(query): add python udf script runtime May 13, 2024
@sundy-li
Copy link
Member Author

closing because we don't want to have /usr/lib/libpython3.12.so.1.0 dynamic link in binary

@sundy-li sundy-li reopened this May 24, 2024
@sundy-li sundy-li requested review from everpcpc and b41sh May 25, 2024 12:37
@BohuTANG BohuTANG merged commit fb4bc61 into databendlabs:main May 28, 2024
69 checks passed
@BohuTANG
Copy link
Member

Could we add some logic tests for the Python script to prevent it from failing unexpectedly? This would be crucial for users running the python script on the production. cc @sundy-li @everpcpc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants