You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2019/07/02 06:58:11 UTC

[GitHub] [carbondata] akashrn5 commented on a change in pull request #3312: [CARBONDATA-3457][MV] Fix Column not found issue with Query having Cast Expression

akashrn5 commented on a change in pull request #3312: [CARBONDATA-3457][MV] Fix Column not found issue with Query having Cast Expression
URL: https://github.com/apache/carbondata/pull/3312#discussion_r299327834
 
 

 ##########
 File path: datamap/mv/core/src/main/scala/org/apache/carbondata/mv/rewrite/DefaultMatchMaker.scala
 ##########
 @@ -53,6 +53,13 @@ abstract class DefaultMatchPattern extends MatchPattern[ModularPlan] {
             (a.child.asInstanceOf[Attribute], a.toAttribute)
           })
 
+    // Create aliasMap with Cast Expression to alias reference attribute
+    val aliasMapCast =
+      subsumer.outputList.collect {
+        case a: Alias if a.child.isInstanceOf[Cast] =>
 
 Review comment:
   i think, you cannot just restrict it to cast, because cast is in this case, for example, if i just have query as 
   `select floor(m_month) as a, c_code as abc from maintable` (query derived from your test case) , then this also fails. Because here you will have project as `[FLOOR(cast(age#7 as double)) AS a#44L]`. So again this scenario needs to be handled in generalized way i  think

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services