carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravindra Pesala (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CARBONDATA-530) Query with ordery by and limit is not optimized properly
Date Tue, 09 May 2017 06:37:04 GMT

     [ https://issues.apache.org/jira/browse/CARBONDATA-530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ravindra Pesala resolved CARBONDATA-530.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.1.0

> Query with ordery by and limit is not optimized properly
> --------------------------------------------------------
>
>                 Key: CARBONDATA-530
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-530
>             Project: CarbonData
>          Issue Type: Bug
>            Reporter: Ashok Kumar
>            Assignee: Ashok Kumar
>            Priority: Minor
>             Fix For: 1.1.0
>
>          Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> for order by query having limit, spark optimizes the plan. 
> But since we put Decoder in between Limit and TungstenSort  plan, check the plan as below,
its not able to optimize the plan
> |== Physical Plan ==                                                                
                                                                                         
                                                                                         
                                                               |
> |Limit 2                                                                            
                                                                                         
                                                                                         
                                                               |
> | ConvertToSafe                                                                     
                                                                                         
                                                                                         
                                                               |
> |  CarbonDictionaryDecoder [CarbonDecoderRelation(Map(name#3 -> name#3),CarbonDatasourceRelation(`default`.`dict`,None))],
ExcludeProfile(ArrayBuffer(name#3)), CarbonAliasDecoderRelation()                        
                                                                                         
                         |
> |   TungstenSort [name#3 ASC], true, 0                                              
                                                                                         
                                                                                         
                                                               |
> |    ConvertToUnsafe                                                                
                                                                                         
                                                                                         
                                                               |
> |     Exchange rangepartitioning(name#3 ASC)                                        
                                                                                         
                                                                                         
                                                               |
> |      ConvertToSafe                                                                
                                                                                         
                                                                                         
                                                               |
> |       CarbonDictionaryDecoder [CarbonDecoderRelation(Map(name#3 -> name#3),CarbonDatasourceRelation(`default`.`dict`,None))],
IncludeProfile(ArrayBuffer(name#3)), CarbonAliasDecoderRelation()                        
                                                                                         
                    |
> |        CarbonScan [name#3], (CarbonRelation default, dict, CarbonMetaData(ArrayBuffer(name),ArrayBuffer(default_dummy_measure),org.apache.carbondata.core.carbon.metadata.schema.table.CarbonTable@6021d179,DictionaryMap(Map(name
-> true))), org.apache.carbondata.spark.merger.TableMeta@4c3f903d, None), [(name#3 = hello)],
false|
> |                                                                                   
                                                                                         
                                                                                         
                                                               |
> |Code Generation: true                                                              
                                                                                         
                                                                                         
                                                               |
> +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
> We should put outer decoder on top of limit



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message