Apache Doris Common Technical Queries and Solutions

SQL Queries

Q1: Is MySQL's WITH ROLLUP syntax supported?
Apache Doris does not currently support the WITH ROLLUP clause. As an alteernative, use the GROUP BY ROLLUP construct:

SELECT a, b, c, SUM(d) FROM tab1 GROUP BY ROLLUP(a, b, c);

Q2: Why do decimal field queries truncate to six decimal places?
By default, decimal values retain six fractional digits to preserve integer precision. To increase this limit when overflow occurs, modify the session variable decimal_overflow_scale (default 6).

Q3: Resolving workload group access errors
The error Access denied; you need (at least one of) the USAGE/ADMIN privilege(s) to use workload group 'normal' indicates insufficient permissions. Grannt the necessary privilege:

GRANT USAGE_PRIV ON WORKLOAD GROUP 'normal' TO 'username'@'%';

Q4: Valid values for the storage_format parameter
The storage_format parameter defaults to V2. V1 is deprecated, and V3 is not yet available.

Data Operations

Q5: Table model changes in version 2.1
After upgrading to Apache Doris 2.1, unique model tables automatically convert to Merge-on-Write (MOW) tables, while aggregate model tables remain unchanged. Refer to the 2.1 release notes for details.

Q6: Workload group memory management
In version 2.1, workload groups cancel queries under memory pressure rather than queuing them. Memory throttling via spill functionality is planned for future updates. Consult the workload group documentation for current capabilities.

Q7: Impact of high-frequency JDBC batch writes
Frequent JDBC insert operations do not cause data loss but may increase system load, version merge overhead, and resource consumption. Avoid high-frequency JDBC inserts in versions prior to 2.1. Review the 2.1 release notes for optimizations.

Q8: Writting to temporary partitions with Spark connector
The Spark-Doris connector supports temporary partition writes by setting the doris.sink.properties.temporary_partitions parameter to specify target partitions. Details are in the connector documentation.

Operational Considerations

Q9: Disabling swap partitions in deployments
Swap partitions allow the kernel to move memory data to disk under memory pressure, which can degrade database performance due to uninformed kernel decisions. Disabling swap is recommended for stable performance.

Tooling and Resources

Q10: Using the PyDoris client
Install the PyDoris client via pip and refer to the PyPI documentation for usage:

pip install pydoris-client

Tags: Apache Doris sql database faq Data Engineering

Posted on Sat, 05 Sep 2026 16:17:20 +0000 by lesmith