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

QueryScope May Overwrite NULL Constants Causing Permanent Compilation Errors #6169

Open
nbauernfeind opened this issue Oct 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working core Core development tasks query engine

Comments

@nbauernfeind
Copy link
Member

nbauernfeind commented Oct 3, 2024

For example:

from deephaven import new_table
from deephaven.column import float_col
from deephaven.constants import NULL_FLOAT # <-- IF I IMPORT THIS IT WONT WORK, OTHERWISE IT DOES

my_table = (
    new_table([float_col("MyFloat", [0, 1, 2, 3])])
    .update(["MyFloat = (MyFloat == 0) ? null : MyFloat"])
)

To work around, import the constant with a rename:

from deephaven.constants import NULL_FLOAT as DH_NULL_FLOAT

Fails due to the conversion of null to NULL_FLOAT within the QLP and now NULL_FLOAT is resolving as a query scope variable (which it should never do).

You can also trip it up with a variable such as NULL_FLOAT = "a".

I would expect the QLP to never resolve the special NULL values as variables.

@nbauernfeind nbauernfeind added bug Something isn't working query engine core Core development tasks labels Oct 3, 2024
@nbauernfeind nbauernfeind self-assigned this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core Core development tasks query engine
Projects
None yet
Development

No branches or pull requests

1 participant