IMPALA-15157: Avoid decompressing a page that is fully skipped at a page boundary

During late materialization / row-level skipping, when the rows to skip
end exactly on a Parquet page boundary (e.g. an entire row group is
filtered out by row-level predicates), BaseScalarColumnReader::
SkipRowsInternal() would fall out of the page-skipping loop and then
decompress that final page via ReadCurrentDataPage() only to then skip
all of its values.

This changes the loop guard from '>' to '>=' so a page whose values are
all skipped is discarded as a whole compressed page (counted in
NumPagesSkippedByLateMaterialization) without decompressing it. When the
skip lands exactly on the page boundary we short-circuit and return
before reading the next page header. Query results are unchanged; this
only removes the unnecessary decompression and in-page value skipping.

Testing:
- Updated and extended parquet-late-materialization-unique-db.test to
  cover skipping to a page boundary (whole-page discard) and in-page
  value skipping.

Assisted-by: Claude Opus 4.8
Change-Id: I18f0e69c267c9bf041ff9f6a3d677239ae43971a
Reviewed-on: http://gerrit.cloudera.org:8080/24566
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
3 files changed
tree: 0e9b1b37f2852056c16c3be73dc78630e58e8e4e
  1. .agents/
  2. .devcontainer/
  3. be/
  4. bin/
  5. cmake_modules/
  6. common/
  7. docker/
  8. docs/
  9. fe/
  10. helm/
  11. infra/
  12. java/
  13. lib/
  14. operator/
  15. package/
  16. security/
  17. shell/
  18. ssh_keys/
  19. testdata/
  20. tests/
  21. www/
  22. .asf.yaml
  23. .clang-format
  24. .clang-tidy
  25. .gitattributes
  26. .gitignore
  27. .isort.cfg
  28. AGENTS.md
  29. buildall.sh
  30. CMakeLists.txt
  31. EXPORT_CONTROL.md
  32. LICENSE.txt
  33. LOGS.md
  34. NOTICE.txt
  35. README-build.md
  36. README.md
  37. SECURITY.md
  38. setup.cfg
README.md

Welcome to Impala

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:

More about Impala

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.

Supported Platforms

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.

Supported OS Distributions

Impala runs on Linux systems only. The supported distros are

  • Ubuntu 20.04/22.04/24.04
  • Rocky/RHEL 8/9/10

Other systems, e.g. SLES15/16, may also be supported but are not tested by the community.

Export Control Notice

This distribution uses cryptographic software and may be subject to export controls. Please refer to EXPORT_CONTROL.md for more information.

Build Instructions

See Impala's developer documentation to get started.

Detailed build notes has some detailed information on the project layout and build.