HI all: I materialize the count distinct query result to a cache, then when user query the count distinct , a specific rule will translate the query to the cache. It turns out right when the query has only one count (distinct ) operator ,but when it has two count (distinct ) ,it causes error .The error info is here: https://gist.github.com/weijietong/1b8ed12db9490bf006e8b3fe0ee52269
Best Regards.