-
Notifications
You must be signed in to change notification settings - Fork 22
Add python UDF helpers #59
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 python UDF helpers #59
Conversation
kesmit13
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few requested changes. I'm not clear on what the ConnectionInfo class is for and what makes the PythonUdfConnectionInfo different.
| valid_values=['managed', 'remote', 'collocated'], | ||
| ), | ||
| 'remote', | ||
| 'managed', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would leave the default as remote and set it explicitly to that in the application code. This app needs to run on-prem as well and the typical way is done using remote.
| url: Optional[str] = None, | ||
| data_format: str = 'rowdat_1', | ||
| app_mode: str = 'remote', | ||
| app_mode: str = 'managed', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above.
| 'external_function.url', 'string', check_str, 'http://localhost:8000/invoke', | ||
| 'Specifies the URL of the external function application.', | ||
| environ=['SINGLESTOREDB_EXT_FUNC_URL'], | ||
| environ=['SINGLESTOREDB_EXT_FUNC_URL' ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stray space
|
|
||
|
|
||
| @dataclass | ||
| class PythonUdfAppConfig: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think naming this UDFAppConfig would be better. Since there is no other option than Python. Udf is a bit too Java-esque. I prefer UDF .
| token: Optional[str] | ||
|
|
||
| @dataclass | ||
| class PythonUdfConnectionInfo: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove Python prefix
|
Closing this Pull request, created this one instead |
This MR