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

Errors from query strings should contain the original query strings #4918

Closed
chipkent opened this issue Dec 6, 2023 · 0 comments · Fixed by #5070
Closed

Errors from query strings should contain the original query strings #4918

chipkent opened this issue Dec 6, 2023 · 0 comments · Fixed by #5070
Assignees
Labels
bug Something isn't working core Core development tasks query engine
Milestone

Comments

@chipkent
Copy link
Member

chipkent commented Dec 6, 2023

When query strings yield errors, DH is currently returning a variant of the string after some query translation. It would be much more greppable if the user's original query string was returned.

Consider this example:

from deephaven import empty_table

def gain(start:float, end:float) -> float:
    raise Exception("Broke")
    # return (end - start) / start * 100.0

t = empty_table(10).update(["avg_rate = 1.3", "op_rate = 2.6", "Change = gain(avg_rate, op_rate) / 100"])

I would expect the error string to contain Change = gain(avg_rate, op_rate) / 100. In reality, the following error is returned, which contains only Change = divide(doubleCast(gain.call(avg_rate, op_rate)), 100). Not very greppable by users.

r-Scheduler-Serial-1 | .c.ConsoleServiceGrpcImpl | Error running script: java.lang.RuntimeException: Error in Python interpreter:
Type: <class 'deephaven.dherror.DHError'>
Value: table update operation failed. : java.lang.RuntimeException: Error in Python interpreter:
Traceback (most recent call last):
  File "/opt/deephaven/venv/lib/python3.10/site-packages/deephaven/table.py", line 913, in update
    return Table(j_table=self.j_table.update(*formulas))
RuntimeError: io.deephaven.engine.table.impl.select.FormulaEvaluationException: In formula: Change = divide(doubleCast(gain.call(avg_rate, op_rate)), 100)
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

Successfully merging a pull request may close this issue.

4 participants