carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipesala <...@git.apache.org>
Subject [GitHub] carbondata pull request #1494: [CARBONDATA-1706] Making index merge DDL inse...
Date Wed, 15 Nov 2017 13:53:53 GMT
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1494#discussion_r151131189
  
    --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
---
    @@ -851,13 +851,21 @@ object CommonUtil {
       def mergeIndexFiles(sparkContext: SparkContext,
           segmentIds: Seq[String],
           tablePath: String,
    -      carbonTable: CarbonTable): Unit = {
    -    if (CarbonProperties.getInstance().getProperty(
    -      CarbonCommonConstants.CARBON_MERGE_INDEX_IN_SEGMENT,
    -      CarbonCommonConstants.CARBON_MERGE_INDEX_IN_SEGMENT_DEFAULT).toBoolean) {
    -      new CarbonMergeFilesRDD(sparkContext, AbsoluteTableIdentifier.from(tablePath,
    -        carbonTable.getDatabaseName, carbonTable.getFactTableName).getTablePath,
    -        segmentIds).collect()
    +      carbonTable: CarbonTable,
    +      mergeIndexProperty: Option[Boolean]): Unit = {
    +    mergeIndexProperty match {
    +      case Some(true) =>
    +        new CarbonMergeFilesRDD(sparkContext, AbsoluteTableIdentifier.from(tablePath,
    +          carbonTable.getDatabaseName, carbonTable.getFactTableName).getTablePath,
    +          segmentIds).collect()
    +      case _ =>
    +        if (CarbonProperties.getInstance().getProperty(
    +          CarbonCommonConstants.CARBON_MERGE_INDEX_IN_SEGMENT,
    +          CarbonCommonConstants.CARBON_MERGE_INDEX_IN_SEGMENT_DEFAULT).toBoolean) {
    --- End diff --
    
    Add the validation for boolean in case user pass wrong boolean parameter then take default


---

Mime
View raw message