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

Check arg type against Py UDF signature at query compile time #5254

Merged
merged 10 commits into from
Mar 25, 2024
Prev Previous commit
Next Next commit
Skip vermin check for explictly ver checked code
jmao-denver committed Mar 22, 2024
commit f69f7c4c5c38c061072ab49c028d5294c666d12b
4 changes: 2 additions & 2 deletions py/server/deephaven/_udf.py
jmao-denver marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ def _component_np_dtype_char(t: type) -> Optional[str]:

if sys.version_info > (3, 8):
import types
if isinstance(t, types.GenericAlias) and issubclass(t.__origin__, Sequence):
if isinstance(t, types.GenericAlias) and issubclass(t.__origin__, Sequence): # novermin
component_type = t.__args__[0]

if not component_type:
@@ -172,7 +172,7 @@ def _is_union_type(t: type) -> bool:
"""Return True if the type is a Union type"""
if sys.version_info.major == 3 and sys.version_info.minor >= 10:
chipkent marked this conversation as resolved.
Show resolved Hide resolved
import types
if isinstance(t, types.UnionType):
if isinstance(t, types.UnionType): # novermin
return True

return isinstance(t, _GenericAlias) and t.__origin__ == Union