Skip to content

Conversation

@jadami10
Copy link
Contributor

this is a small UI improvement to include "Primary Key" in the schema UI. This is useful for upsert and dedup tables so you can see this without having to look at the json format.

I ran this on test cluster where we can see true for this case.
image

@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.17%. Comparing base (b3b72ae) to head (2f97b7b).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17566      +/-   ##
============================================
+ Coverage     63.14%   63.17%   +0.03%     
  Complexity     1476     1476              
============================================
  Files          3172     3172              
  Lines        189783   189783              
  Branches      29041    29041              
============================================
+ Hits         119842   119902      +60     
+ Misses        60629    60568      -61     
- Partials       9312     9313       +1     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 63.14% <ø> (+0.02%) ⬆️
java-21 63.14% <ø> (+0.03%) ⬆️
temurin 63.17% <ø> (+0.03%) ⬆️
unittests 63.17% <ø> (+0.03%) ⬆️
unittests1 55.52% <ø> (+0.02%) ⬆️
unittests2 34.02% <ø> (+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
Contributor

@yashmayya yashmayya left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the enhancement!

@yashmayya yashmayya requested a review from Copilot January 26, 2026 17:28
Copy link
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 adds "Primary Key" as a new column in the schema UI table to make it easier to identify primary key columns for upsert and dedup tables without needing to inspect the JSON format.

Changes:

  • Added "Primary Key" column to the schema table display
  • Updated the column headers and data mapping to include primary key information

Reviewed changes

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

File Description
pinot-controller/src/main/resources/app/utils/Utils.tsx Added logic to extract primary key columns and include them in the schema table data
pinot-controller/src/main/resources/app/pages/TenantDetails.tsx Updated empty state schema table to include the new "Primary Key" column header

columns: ['Column', 'Type', 'Field Type', 'Multi Value', 'Primary Key'],
records: columnList.map((field) => {
return [field.name, field.dataType, field.fieldType, getMultiValueField(field)];
return [field.name, field.dataType, field.fieldType, getMultiValueField(field), primaryKeys.has(field.name)];
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The primary key value is returned as a boolean (true/false) which is inconsistent with the 'Multi Value' column that uses getMultiValueField(). Consider creating a similar helper function like getPrimaryKeyValue() to maintain consistency in how boolean values are formatted and displayed across columns.

Copilot uses AI. Check for mistakes.
columns: ['Column', 'Type', 'Field Type', 'Multi Value', 'Primary Key'],
records: columnList.map((field) => {
return [field.name, field.dataType, field.fieldType, getMultiValueField(field)];
return [field.name, field.dataType, field.fieldType, getMultiValueField(field), primaryKeys.has(field.name)];
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The primary key column only appears when showFieldType is true, but there's no corresponding update for the case when showFieldType is false. This creates an inconsistent API where the primary key information is conditionally available. Consider adding the primary key column to both code paths to ensure consistent data structure.

Copilot uses AI. Check for mistakes.
@Jackie-Jiang Jackie-Jiang merged commit ef52ee8 into apache:master Jan 27, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants