Debugging Queries

When developing any complex application on a computer system, you are unlikely to get it right on the first try. Most Excel users have, at some point, had a #REF error appear. Anyone who has tried Python has inserted errant whitespace, and every Java programmer has missed a semi-colon. Writing a new application or exploring data with Deephaven is no different -- inevitably, something is not going to work on the first try. Your operation could produce an error, provide an unexpected answer, or even crash the worker process. When an error or unexpected behavior occurs, you need to debug the problem.

When someone says, "My Deephaven query failed," they most often mean one of two things:

  1. An individual query operation like select or natural_join failed. A common way that you might encounter these kinds of errors is when exploring data in a Code Studio. The commands that you type are new and generally unique, so they are untested until you actually run them for the first time.

  2. An application, such as a Persistent Query (PQ) in Deephaven, failed. This is often caused by an operation within the application failing. PQ failures may also be caused by system-level problems, which an administrator may need to help you debug.

In this debugging guide, the first step is to locate your error. The instructions for locating the error differ between a Persistent Query and a Code Studio. After you've located the error, the next step is to interpret any stack trace or trace back.

We then describe various classes of errors: