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
Currently, #5556 implements it as
MaterializedViewQueryandMaterializedViewQueryQueryToolChest, i. e. in the same type framework asQueryandQueryToolChest. However,MaterializedViewQueryandMaterializedViewQueryQueryToolChestare shallow and pass-through classes.MaterializedViewQueryQueryToolChestcouldn't sensibly return something fromgetResultTypeReference(), so I wonder why it didn't throw NPE inDirectDruidClientbefore, 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