Design of MaterializedViewQuery
- Dominant language
- Java
- Stars
- 14.1k
- Forks
- 3.8k
- Avg merge
- 2d 58m
- Merged PRs (30d)
- 233
Description
Currently, #5556 implements it as `MaterializedViewQuery` and `MaterializedViewQueryQueryToolChest`, i. e. in the same type framework as `Query` and `QueryToolChest`. However, `MaterializedViewQuery` and `MaterializedViewQueryQueryToolChest` are shallow and pass-through classes. `MaterializedViewQueryQueryToolChest` couldn't sensibly return something from `getResultTypeReference()`, so I wonder why it didn't throw NPE in `DirectDruidClient` before, but I hit this problem in my change #6898.
There should probably be an abstraction like "query modifier" and other parts of the infrastructure should recognize it.
cc @zhangxinyu1 @jihoonson
Contributor guide
Research direction
Start with MaterializedViewQuery and MaterializedViewQueryQueryToolChest from #5556, then trace how DirectDruidClient uses getResultTypeReference(). Review the interaction with change #6898 and the existing Query and QueryToolChest abstractions. Done means the query-modifier design is defined and the affected infrastructure handles materialized-view queries without requiring an inappropriate result type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design, databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100