rangareddy commented on issue #16652:
URL: https://github.com/apache/hudi/issues/16652#issuecomment-5434694308

   This issue was reviewed as part of the JIRA-migrated backlog triage 
(HUDI-8302).
   
   **Findings: confirmed, and the restriction is asserted in one place then 
assumed downstream.**
   
   
`hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/HoodieIndexUtils.java:661`:
   
   ```java
   checkArgument(columns.size() == 1, "Only one column can be indexed for 
functional or secondary index.");
   ```
   
   and immediately after, at `:687`:
   
   ```java
   String columnName = sourceFields.get(0); // We know there's only one column 
from the check above
   ```
   
   So relaxing the guard alone is not enough - the code that follows takes 
`get(0)` on the strength of it. Both need to change together, and any other 
site making the same assumption should be audited.
   
   On the second half of the ask (the metadata-table validator handling 
multiple secondary-index columns), two open tickets are adjacent: #17269 
(HUDI-8177) wants the validator generalised so new index types are cheap to 
add, and #17275 (HUDI-8263) adds expression-index validation. Doing the 
generalisation first would make this cheaper.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to