Skip to main content

Module error

Module error 

Source
Expand description

Error messages for people, not programmers.

DataFusion’s Display for an error prefixes it with the variant it came from (“Error during planning: “, “Arrow error: “, “External error: “) and, for a SQL syntax error, prints the parser error’s Debug form (ParserError("…")). user_message walks the error instead and keeps only what happened. It reads the error’s variants, not its text.

Where DataFusion offers no typed error, the engine matches its text. Every such string is in matched, with a test that makes DataFusion (or sqlparser) produce the message itself and checks the string is still in it, so an upgrade that rewords one fails there rather than quietly showing the user DataFusion’s raw message.

Modules§

matched
The DataFusion and sqlparser messages the engine and the CLI recognize by their text, because no typed error says the same (#265).

Functions§

shown_path
location, an object store location, as the local path the user wrote when it is one (Users/me/x.csv is /Users/me/x.csv if that exists).
user_message
The message to show a user for err: what went wrong, without the names of the internal error types it passed through.