Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1546#discussion_r157155037
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonPreAggregateRules.scala
 ---
    @@ -311,6 +314,27 @@ case class CarbonPreAggregateQueryRules(sparkSession: 
SparkSession) extends Rule
         }
       }
     
    +  /**
    +   * Below method will be used to check whether specific segment is set 
for maintable
    +   * if it is present then not no need to transform the plan. Query will 
be executed on
    +   * maintable
    +   * @param carbonTable
    +   *                    parent table
    +   * @return is specific segment is present in session params
    +   */
    +  def isSpecificSegmentPresent(carbonTable: CarbonTable) : Boolean = {
    +    val carbonSessionInfo = ThreadLocalSessionInfo.getCarbonSessionInfo
    +    if (carbonSessionInfo != null) {
    +      carbonSessionInfo.getSessionParams
    +        .getProperty(CarbonCommonConstants.CARBON_INPUT_SEGMENTS +
    +                     
carbonTable.getAbsoluteTableIdentifier.getCarbonTableIdentifier
    +                       .getDatabaseName + "." +
    +                     carbonTable.getTableName, "").isEmpty
    --- End diff --
    
    Please format properly


---

Reply via email to