feat(pyamber): support Python UDF UI parameters#5603
Open
carloea2 wants to merge 1 commit into
Open
Conversation
6 tasks
Contributor
Author
|
@Xiao-zhen-Liu could you review it? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5603 +/- ##
============================================
+ Coverage 52.42% 53.80% +1.37%
+ Complexity 2481 1424 -1057
============================================
Files 1070 802 -268
Lines 41359 33333 -8026
Branches 4441 3345 -1096
============================================
- Hits 21682 17934 -3748
+ Misses 18406 14533 -3873
+ Partials 1271 866 -405
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
This PR adds Python runtime support for Python UDF UI parameters.
It introduces:
self.UiParameter(...)support on Python UDF operator base classes._texera_injected_ui_parametersbase hook that the Scala injector overrides.AttributeType.Dict,Any, andAttributeTypethroughfrom pytexera import *, so generated code from the Scala injector loads correctly.AttributeType.INTEGERandAttributeType.BOOLEAN, matching the frontend parser’s accepted tokens.This PR is stacked after the merged frontend foundation PR #5043 and Scala backend injection PR #5141. It does not wire UI parameters into operator execution end to end; that integration is handled by the next PR in the stack.
Any related issues, documentation, discussions?
Part of the Python UDF UI parameter feature split from
feat/ui-parameter.Related tracking issue / stack: #5044
Stack order:
How was this PR tested?
Commands run:
cd amber ruff check src/main/python/core/models/schema/attribute_type.py src/main/python/pytexera/udf/udf_operator.py src/test/python/pytexera/udf/test_udf_operator.py pytest src/test/python/pytexera/udf/test_udf_operator.py -q pytest src/test/python/pytexera/udf -q