Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-530

Query with ordery by and limit is not optimized properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.1.0
    • None
    • None

    Description

      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

      Attachments

        Activity

          People

            ashok.blend Ashok Kumar
            ashok.blend Ashok Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 5h
                5h