[ https://issues.apache.org/jira/browse/KYLIN-5755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17832054#comment-17832054 ]
pengfei.zhan commented on KYLIN-5755: ------------------------------------- h1. Design Set `kylin.query.using-metadata-answer-minmax-of-dimension=true` as the default behavior. The following query statement will answered with KYLIN metadata by default. we can cat the log in the file of `logs/kylin.query.log` and find "Use kylin metadata to answer query with realization : NDataflow [model1]" {code:sql} select min(LO_ORDERDATE),max(LO_ORDERDATE) FROM "SSB"."LINEORDER" as "LINEORDER" INNER JOIN "SSB"."CUSTOMER" as "CUSTOMER" ON "LINEORDER"."LO_CUSTKEY" = "CUSTOMER"."C_CUSTKEY" {code} However, the query statement as follows will be answered by snapshot of SSB.CUSTOMER. {code:sql} select min(C_CUSTKEY) from "SSB"."CUSTOMER" {code} > Hitting snapshot has a higher priority than answering min/max mesaure with > metadata > ----------------------------------------------------------------------------------- > > Key: KYLIN-5755 > URL: https://issues.apache.org/jira/browse/KYLIN-5755 > Project: Kylin > Issue Type: Improvement > Components: Query Engine > Affects Versions: 5.0-beta > Reporter: pengfei.zhan > Assignee: pengfei.zhan > Priority: Major > Fix For: 5.0-beta > > > KYLIN-5578 using metadata to response min/max aggregation queries. When > querying only columns on the dimension table, the query result from the > snapshot does not match the reuslt from metadata, choose the former one. If > the query result of `min/max` aggregation is based on a left/inner join > flat-table, query result from metadata is preferred. -- This message was sent by Atlassian Jira (v8.20.10#820010)