DefaultOrderByLimit
- Last Updated: March 5, 2024
- 1 minute read
- DataDirect Connectors
- JDBC
- Documentation
Purpose
Specifies the maximum number of rows returned when a SQL statement containing an ORDER BY clause is executed. Apache Impala requires statements containing the ORDER BY clause to limit the number of rows returned. This option allows these statements to return a result set without specifying a limit in the application.
Valid Values
-1 | x
where:
- x
- is a positive integer that represents maximum number of rows returned.
Behavior
If set to -1 (disabled), there is no
default limit to the number of rows returned by a statement containing an ORDER BY clause.
The application must limit the number of rows returned by SQL statements that contain an
ORDER BY clause, or Apache Impala databases will return an error.
If set to x, the number of rows returned by a SQL statement containing an ORDER BY clause are limited to the specified number of rows for the session. To override this value, specify a new value in a LIMIT clause in the statement that is being executed.
Data Source Method
public Integer
getDefaultOrderByLimit()
public void
setDefaultOrderByLimit(Integer)
Default
-1 (Disabled)
Data Type
Int