A query can potentially result in one of the following errors:
identifier resolution error,
If the query processor runs into any error, it will terminate the ongoing processing of the query and immediately return an error message to the client.
A valid query must satisfy the grammar rules of the query language. Otherwise, a syntax error will be raised.
SELECT * GleambookUsers user
Since the query misses a
FROM keyword before the dataset
we will get a syntax error as follows:
Syntax error: In line 2 >>GleambookUsers user;<< Encountered <IDENTIFIER> \"GleambookUsers\" at column 1.
SELECT * FROM GleambookUsers user WHERE type="advertiser";
Since "type" is a reserved keyword in the query parser, we will get a syntax error as follows:
Error: Syntax error: In line 3 >>WHERE type="advertiser";<< Encountered 'type' "type" at column 7. ==> WHERE type="advertiser";
Referring to an undefined identifier can cause an error if the identifier cannot be successfully resolved as a valid field access.
SELECT * FROM GleambookUser user;
If we have a typo as above in "GleambookUsers" that misses the dataset name’s ending "s", we will get an identifier resolution error as follows:
Error: Cannot find dataset GleambookUser in dataverse Default nor an alias with name GleambookUser!
SELECT name, message FROM GleambookUsers u JOIN GleambookMessages m ON m.authorId = u.id;
If the compiler cannot figure out how to resolve an unqualified field name, which will occur if there is more than one variable in scope (e.g.,
GleambookUsers u and
GleambookMessages m as above),
we will get an identifier resolution error as follows:
Error: Cannot resolve ambiguous alias reference for undefined identifier name
The query compiler does type checks based on its available type information. In addition, the query runtime also reports type errors if a data model instance it processes does not satisfy the type requirement.
abs can only process numeric input values,
we will get a type error as follows:
Error: Type mismatch: function abs expects its 1st input parameter to be of type tinyint, smallint, integer, bigint, float or double, but the actual input type is string
A query can potentially exhaust system resources, such as the number of open files and disk spaces. For instance, the following two resource errors could be potentially be seen when running the system:
Error: no space left on device Error: too many open files
The "no space left on device" issue usually can be fixed by cleaning up disk spaces and reserving more disk spaces for the system. The "too many open files" issue usually can be fixed by a system administrator, following the instructions here.
For a full list of error codes, see Analytics Error Codes.