[GitHub] incubator-carbondata pull request #666: [CARBONDATA-530] Keep the CarbonDeco...

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #666: [CARBONDATA-530] Keep the CarbonDeco...

qiuchenjian-2
GitHub user ravipesala opened a pull request:

    https://github.com/apache/incubator-carbondata/pull/666

    [CARBONDATA-530] Keep the CarbonDecoder on top of limit in case of limit+sort plan

    There is a new optimization in spark2.1, it can group limit and sort together and get the topN efficiently. so we should put outer decoder above limit to make use of this optimization.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ravipesala/incubator-carbondata limitplan-push

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-carbondata/pull/666.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #666
   
----
commit efc6887306db0eb555607fdcce5c13b9249691cc
Author: ravipesala <[hidden email]>
Date:   2017-03-16T19:18:26Z

    Modified optimizer to place decoder on top of limit in case of sort and limit.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #666: [CARBONDATA-530] Keep the CarbonDecoder on ...

qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/666
 
    Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1199/



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #666: [CARBONDATA-530] Keep the CarbonDecoder on ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/666
 
    Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1210/



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #666: [CARBONDATA-530] Keep the CarbonDecoder on ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/666
 
    Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1211/



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #666: [CARBONDATA-530] Keep the CarbonDeco...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/666#discussion_r106629310
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/CarbonDictionaryDecoder.scala ---
    @@ -371,6 +307,79 @@ case class CarbonDictionaryDecoder(
     
     }
     
    +object CarbonDictionaryDecoder {
    +
    +  def convertOutput(output: Seq[Attribute],
    --- End diff --
   
    please give some description comment for this function


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #666: [CARBONDATA-530] Keep the CarbonDeco...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/666#discussion_r106629326
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/CarbonDictionaryDecoder.scala ---
    @@ -371,6 +307,79 @@ case class CarbonDictionaryDecoder(
     
     }
     
    +object CarbonDictionaryDecoder {
    +
    +  def convertOutput(output: Seq[Attribute],
    +      relations: Seq[CarbonDecoderRelation],
    +      profile: CarbonProfile,
    +      aliasMap: CarbonAliasDecoderRelation): Seq[Attribute] = {
    +    output.map { a =>
    +      val attr = aliasMap.getOrElse(a, a)
    +      val relation = relations.find(p => p.contains(attr))
    +      if (relation.isDefined && canBeDecoded(attr, profile)) {
    +        val carbonTable = relation.get.carbonRelation.carbonRelation.metaData.carbonTable
    +        val carbonDimension = carbonTable
    +          .getDimensionByName(carbonTable.getFactTableName, attr.name)
    +        if (carbonDimension != null &&
    +            carbonDimension.hasEncoding(Encoding.DICTIONARY) &&
    +            !carbonDimension.hasEncoding(Encoding.DIRECT_DICTIONARY) &&
    +            !carbonDimension.isComplex()) {
    +          val newAttr = AttributeReference(a.name,
    +            convertCarbonToSparkDataType(carbonDimension,
    +              relation.get.carbonRelation.carbonRelation),
    +            a.nullable,
    +            a.metadata)(a.exprId).asInstanceOf[Attribute]
    +          newAttr
    +        } else {
    +          a
    +        }
    +      } else {
    +        a
    +      }
    +    }
    +  }
    +
    +  def canBeDecoded(attr: Attribute, profile: CarbonProfile): Boolean = {
    --- End diff --
   
    please give some description comment for this function


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #666: [CARBONDATA-530] Keep the CarbonDecoder on ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/666
 
    LGTM except for adding comments


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #666: [CARBONDATA-530] Keep the CarbonDecoder on ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/666
 
    Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1214/



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---