IMPALA-15076: Fix JDBC scan duplication in UNION ALL and ResultSet race After IMPALA-14523 patch (shared JDBC cursor fetching), UNION ALL queries with JDBC tables produced incorrect results due to duplicate table scans. The scheduler assigned each JDBC scan node to a different executor based on node_id, causing UNPARTITIONED union fragments to spawn instances on multiple executors. Each instance would execute all scan nodes in the union, but only one had assigned ranges, leading to 3x result duplication in queries. The fix changes JDBC executor selection to hash fragment_idx instead of node_id, ensuring all JDBC scans within a union fragment are co-located on the same executor. This preserves the shared connection optimization while preventing duplicate reads. Additionally, fixed a race condition in JdbcRecordIterator where multiple threads could call ResultSet.next() after end-of-stream. Per JDBC spec, this behavior is vendor-specific for TYPE_FORWARD_ONLY result sets and may throw SQLException. Added an endOfStream flag guarded by fetchLock to prevent post-EOS next() calls. Testing: - Core TPC-DS JDBC tests now pass - All tests passed with exhaustive exploration strategy using release build - Added JDBC UNION ALL planner tests Change-Id: I60ed011faa2177af67ea681c2cd2967648e4a963 Reviewed-on: http://gerrit.cloudera.org:8080/24464 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Lightning-fast, distributed SQL queries for petabytes of data stored in open data and table formats.
Impala is a modern, massively-distributed, massively-parallel, C++ query engine that lets you analyze, transform and combine data from a variety of data sources:
The fastest way to try out Impala is a quickstart Docker container. You can try out running queries and processing data sets in Impala on a single machine without installing dependencies. It can automatically load test data sets into Apache Kudu and Apache Parquet formats and you can start playing around with Apache Impala SQL within minutes.
To learn more about Impala as a user or administrator, or to try Impala, please visit the Impala homepage. Detailed documentation for administrators and users is available at Apache Impala documentation.
If you are interested in contributing to Impala as a developer, or learning more about Impala's internals and architecture, visit the Impala wiki.
Impala only supports Linux at the moment. Impala supports x86_64 and arm64 (as of Impala 4.4). Impala Requirements contains more detailed information on the minimum CPU requirements.
Impala runs on Linux systems only. The supported distros are
Other systems, e.g. SLES15, may also be supported but are not tested by the community.
This distribution uses cryptographic software and may be subject to export controls. Please refer to EXPORT_CONTROL.md for more information.
See Impala's developer documentation to get started.
Detailed build notes has some detailed information on the project layout and build.