ShreelekhyaG commented on code in PR #4257: URL: https://github.com/apache/carbondata/pull/4257#discussion_r847975668
########## integration/spark/src/main/scala/org/apache/spark/sql/optimizer/MVRewrite.scala: ########## @@ -434,6 +436,23 @@ class MVRewrite(catalog: MVCatalogInSpark, logicalPlan: LogicalPlan, } } + // Currently, the user query is modified if it contains avg aggregate. + // modifiedLogicalPlan is created from modified query which can be used to derive sum or count + // columns from MV in case avg is not present. + private def getLogicalPlan(schemaWrapper: MVSchemaWrapper, + plan: ModularPlan): LogicalPlan = { + val queryOutput = plan.output + val sumOrCountCol = queryOutput.find(x => x.sql.contains(CarbonCommonConstants.SUM + "(") || Review Comment: yes, by default spark is parsing to lowercase -- 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: dev-unsubscr...@carbondata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org