When running SQL queries with MaxCompute built-in functions, you may encounter the following errors. Each entry explains what triggers the error and how to resolve it.
Error index
| Error code | Description |
|---|---|
ODPS-0130071 | A data type is not supported in the current compatibility mode |
ODPS-0130221 | Wrong number of arguments passed to a function |
ODPS-0130121 | An argument has an incompatible data type for the function |
ODPS-0130071 | A function or view name cannot be resolved |
ODPS-0130071: type not enabled in current mode
Full message: Semantic analysis exception - X type is not enabled in current mode
This error occurs when you use a data type that is not supported in the current MaxCompute compatibility mode.
Check whether the data type is supported in your project's compatibility mode and upgrade the mode if needed.
ODPS-0130221: invalid number of arguments
Full message: Invalid number of arguments - function Y needs m parameters, actually have n
The function received the wrong number of arguments. The error message identifies the function name, the expected count (m), and the actual count (n) you provided.
Review the function signature and correct the number of arguments in your query.
ODPS-0130121: invalid argument type
Full message: Invalid argument type - invalid type X of argument m for function Y
The data type of one of the arguments is incompatible with what the function expects. The error message identifies the argument position (m), the unsupported type (X), and the function name (Y).
Cast the argument to the expected type or replace it with a compatible value.
ODPS-0130071: function or view cannot be resolved
Full message: Semantic analysis exception - function or view Y cannot be resolved
MaxCompute cannot find the function or view referenced in your query. This typically happens when the name is misspelled, the function is not registered in the current project, or the view has been deleted.
Verify the function or view name and confirm it exists in the current project.