IMPALA-9153: Generate CUP parser Java source via CMake

This moves the code generation for the CUP parser from a
Maven plugin to CMake. The Maven plugin is old and always
regenerates the sources even if they haven't changed. This
means that Maven rebuilds many source files on each run,
slowing down the iteration cycle when running frontend
tests.

Fixing the Maven CUP plugin is possible, but it involves
maintaining our own custom Maven plugin for our version
of CUP. The CMake version is less code and almost as good.
Since Maven doesn't generate the files, they never change
and Maven won't rebuild source files on each run. However,
it means that if a developer is actually changing sql-parser.cup,
then Maven won't notice itself. Instead, the developer
needs to run "make java" to regenerate the CUP sources and
rebuild the Java code. This properly specifies the inputs /
outputs, so it will only be regenerated if necessary.

As part of this, it moves the sql-parser.cup from fe/src/main/cup
to common/cup. This is not strictly necessary, but it matches
how Thrift and other code generation is structured.

Testing:
 - Ran local build / local tests
 - Compared generated source for both methods and only the
   timestamps are different

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