Skip to content

Enable Json Index for MAP data type#16808

Merged
xiangfu0 merged 3 commits intoapache:masterfrom
raghavyadav01:map-index-fixes
Sep 13, 2025
Merged

Enable Json Index for MAP data type#16808
xiangfu0 merged 3 commits intoapache:masterfrom
raghavyadav01:map-index-fixes

Conversation

@raghavyadav01
Copy link
Copy Markdown
Collaborator

Enable Json Index for MAP data type columns.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 12, 2025

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.36%. Comparing base (93de8f0) to head (9f6bd9a).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
.../pinot/core/operator/filter/MapFilterOperator.java 0.00% 4 Missing ⚠️
...t/index/loader/invertedindex/JsonIndexHandler.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #16808      +/-   ##
============================================
- Coverage     63.36%   63.36%   -0.01%     
  Complexity     1399     1399              
============================================
  Files          3055     3055              
  Lines        178916   178920       +4     
  Branches      27419    27421       +2     
============================================
+ Hits         113377   113378       +1     
- Misses        56789    56796       +7     
+ Partials       8750     8746       -4     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 63.34% <0.00%> (+7.04%) ⬆️
java-21 63.33% <0.00%> (+<0.01%) ⬆️
temurin 63.36% <0.00%> (-0.01%) ⬇️
unittests 63.36% <0.00%> (-0.01%) ⬇️
unittests1 56.29% <0.00%> (-0.04%) ⬇️
unittests2 33.39% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@kishoreg kishoreg left a comment

Choose a reason for hiding this comment

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

lets add a test case

@xiangfu0 xiangfu0 requested a review from Copilot September 13, 2025 01:56
@xiangfu0 xiangfu0 added index Related to indexing (general) json Related to JSON column support labels Sep 13, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables JSON index support for MAP data type columns in Apache Pinot. Previously, JSON indexes were only supported for STRING and JSON data types.

  • Modified JSON index validation to accept MAP data type columns
  • Added fallback logic to use composite JSON index when standard JSON index is unavailable
  • Extended MAP filter operator to leverage JSON indexing capabilities for improved query performance

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
JsonIndexHandler.java Updated validation logic to allow JSON index creation for MAP data type columns
MapFilterOperator.java Added fallback mechanism to use composite JSON index and imported required dependencies

…al/segment/index/loader/invertedindex/JsonIndexHandler.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@xiangfu0 xiangfu0 merged commit 9286da2 into apache:master Sep 13, 2025
17 of 18 checks passed
xiangfu0 pushed a commit to xiangfu0/pinot that referenced this pull request Nov 13, 2025
* Fix an issue in update indices for Composite Json Index for MAP column.

* Fix an issue in update indices for  Json Index for MAP column.

* Update pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/invertedindex/JsonIndexHandler.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

index Related to indexing (general) json Related to JSON column support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants