You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "hudi-bot (via GitHub)" <gi...@apache.org> on 2025/11/30 13:42:24 UTC

[I] Refactor code in ExpressionIndexSupport to avoid duplicate code [hudi]

hudi-bot opened a new issue, #17323:
URL: https://github.com/apache/hudi/issues/17323

   HUDI-8463 adds filtration for records with from_unixtime function and expression index. There is some duplicate code with ColumnStatsIndexSupport and function like `fetchQueryWithAttribute` which can be refactored to avoid duplicate.
   
   ## JIRA info
   
   - Link: https://issues.apache.org/jira/browse/HUDI-8649
   - Type: Sub-task
   - Parent: https://issues.apache.org/jira/browse/HUDI-9101
   - Fix version(s):
     - 1.1.0


-- 
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: commits-unsubscribe@hudi.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Refactor code in ExpressionIndexSupport to avoid duplicate code [hudi]

Posted by "rangareddy (via GitHub)" <gi...@apache.org>.
rangareddy commented on issue #17323:
URL: https://github.com/apache/hudi/issues/17323#issuecomment-5365823503

   This issue was reviewed as part of the JIRA-migrated backlog triage (HUDI-8649).
   
   **Findings: confirmed, the duplication is still there.**
   
   Four methods are defined separately in both `ExpressionIndexSupport.scala` and `ColumnStatsIndexSupport.scala` (both under `hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/`):
   
   | method | in `ExpressionIndexSupport` |
   | --- | --- |
   | `loadTransposed` | `:157` |
   | `transpose` | `:233` |
   | `composeIndexSchema` | `:322` |
   | `loadColumnStatsIndexRecords` | `:346` |
   
   Both classes extend `SparkBaseIndexSupport`, which is the natural home for whatever is genuinely common between them.
   
   **One note for whoever picks this up:** `fetchQueryWithAttribute`, named in the description, no longer exists under that name anywhere in the tree. The nearest current equivalents in `ExpressionIndexSupport` are `filterQueriesWithFunctionalFilterKey` (`:391`), `getExpressionIndexPartitionAndLiterals` (`:417`) and `extractQueryAndLiterals` (`:445`). Worth updating the description so the ticket stays findable.
   
   Keeping this open.
   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org