Skip to content

HIVE-29745: Remove Druid integration#6615

Open
zabetak wants to merge 1 commit into
apache:masterfrom
zabetak:HIVE-29745
Open

HIVE-29745: Remove Druid integration#6615
zabetak wants to merge 1 commit into
apache:masterfrom
zabetak:HIVE-29745

Conversation

@zabetak

@zabetak zabetak commented Jul 17, 2026

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

  • Delete the druid-handler module (storage handler, SerDe, I/O formats, Kafka ingestion support, Kerberos security utilities)
  • Delete the itests/qtest-druid module (MiniDruidCluster, test drivers)
  • Remove all Druid-related query test files (.q and .q.out)
  • Remove hive.druid.* configuration variables from HiveConf
  • Remove Druid constants and calcite-druid dependency
  • Remove Calcite optimizer rules: HiveDruidRules, DruidSqlOperatorConverter, SortedDynPartitionTimeGranularityOptimizer
  • Remove DruidQuery handling from CalcitePlanner, HiveVolcanoPlanner, HiveFilterProjectTransposeRule, HiveRelFieldTrimmer, ASTBuilder, ASTConverter, and HiveMaterializedViewsRegistry
  • Remove DRUID/DRUID_LOCAL/DRUID_KAFKA cluster types from test infra
  • Relocate Kafka test utilities (SingleNodeKafkaCluster, Wikipedia) from itests/qtest-druid to itests/util under org.apache.hadoop.hive.kafka
  • Update itests/util dependencies to use kafka artifacts directly instead of pulling them transitively via hive-it-druid

Why are the changes needed?

The Druid integration is broken for the past 5 years and seemingly unused.

  1. Remove CVE due to the use of old Druid dependencies
  2. Improve compilation performance by removing Druid specific code & rules
  3. Facilitate code maintenance by dropping unused code

Does this PR introduce any user-facing change?

No really, in the sense that Druid integration is already broken in the past few releases.

How was this patch tested?

Existing tests

Remove the Druid storage handler and all associated infrastructure from
the codebase since its broken and no longer used.

Changes include:
- Delete the druid-handler module (storage handler, SerDe, I/O formats,
  Kafka ingestion support, Kerberos security utilities)
- Delete the itests/qtest-druid module (MiniDruidCluster, test drivers)
- Remove all Druid-related query test files (.q and .q.out)
- Remove hive.druid.* configuration variables from HiveConf
- Remove Druid constants and calcite-druid dependency
- Remove Calcite optimizer rules: HiveDruidRules,
  DruidSqlOperatorConverter, SortedDynPartitionTimeGranularityOptimizer
- Remove DruidQuery handling from CalcitePlanner, HiveVolcanoPlanner,
  HiveFilterProjectTransposeRule, HiveRelFieldTrimmer, ASTBuilder,
  ASTConverter, and HiveMaterializedViewsRegistry
- Remove DRUID/DRUID_LOCAL/DRUID_KAFKA cluster types from test infra
- Relocate Kafka test utilities (SingleNodeKafkaCluster, Wikipedia) from
  itests/qtest-druid to itests/util under org.apache.hadoop.hive.kafka
- Update itests/util dependencies to use kafka artifacts directly
  instead of pulling them transitively via hive-it-druid
@sonarqubecloud

Copy link
Copy Markdown

@simhadri-g simhadri-g left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, Thanks @zabetak !

I have done the same once before back in 2022 and this change looks good to me.

+1 LGTM pending tests!

@Aggarwal-Raghav

Copy link
Copy Markdown
Contributor

There are few files which still reference "druid"

  1. Will require thrift code gen:

    const string DRUID_CONFIG_PREFIX = "druid.",

  2. Comment + Code here:

    key.startsWith(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.DRUID_CONFIG_PREFIX) ||

  3. There are few files which contains comments referencing DRUID, please check and take the appropriate call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants