Skip to content

Conversation

@cgivre
Copy link
Contributor

@cgivre cgivre commented Nov 13, 2025

DRILL-XXXX: Convert Hive Unit Tests to Docker

Description

This PR migrates all Hive storage plugin integration tests from the deprecated embedded HiveServer2 approach (which fails on Java 11+ due to URLClassLoader incompatibility) to a Docker-based testing infrastructure using Testcontainers. Note that prior to this PR, the Hive tests were not running at all because of Java version checks that disabled the tests on Java > 8.

This migration is necessary to update the Hive plugin from using the Hive v3. client to Hive v4. Hive v3 is very out of date and has multiple CVEs which are only addressed by updating to version 4.

The migration includes all 6 complex type test classes:

  • TestHiveArrays with 52 tests
  • TestHiveMaps
  • TestHiveStructs
  • TestHiveUnions
    and authorization tests (TestStorageBasedHiveAuthorization, TestSqlStdBasedAuthorization), with all tests rewritten to generate test data via JDBC connections instead of relying on pre-existing embedded data.

To address the 20-30 minute Docker container startup time on ARM64 Macs (due to AMD64 image emulation), the PR adds architecture-aware Maven profiles that automatically skip Hive integration tests on ARM64 while allowing them to run normally on AMD64 systems (CI/CD). Developers can override with -Pforce-hive-tests if needed.

Documentation

No user facing changes.

Testing

@cgivre cgivre added code-cleanup refactoring PR related to code refactoring updates dependencies ci CI backport-to-stable This bug fix is applicable to the latest stable release and should be considered for inclusion there stability labels Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-stable This bug fix is applicable to the latest stable release and should be considered for inclusion there ci CI code-cleanup dependencies refactoring PR related to code refactoring stability updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant