This error occurs when a SQL statement or feature is incompatible with the current execution mode in MaxCompute. Each variant has a distinct cause and resolution.
SESSION2 fallback from service mode to offline mode since there is udf in the map task
Error message:
ODPS-1850001: Unsupported feature in session mode - SESSION2 switches from service mode to offline mode because a UDF is present in the map task.
Cause: SESSION2 detected a User-Defined Function (UDF) in the map task and fell back from service mode to offline mode.
Impact: For common SQL jobs, this fallback does not affect the job result — the job continues to run in offline mode. However, if SQL query acceleration (SQLRT) is enabled, the task fails and does not execute.
Solution: To prevent SQLRT tasks from failing, disable query acceleration before the SQL statement:
set odps.mcqa.disable=true;
Non select query not supported
Error message:
ODPS-1850001: Unsupported feature in session mode - Non-select queries are not supported.
Cause: A Data Manipulation Language (DML) statement, such as INSERT, was executed in query acceleration mode. Query acceleration mode only supports the following statement types:
| Statement type | Examples |
|---|---|
| Data Definition Language (DDL) | CREATE |
| Data Query Language (DQL) | SELECT |
DML statements (such as INSERT) are not supported in query acceleration mode.
Impact: The task fails and does not execute.
Solution: Disable query acceleration mode before running DML statements.