carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackylk <...@git.apache.org>
Subject [GitHub] carbondata pull request #1524: [CARBONDATA-1762] Remove existing column leve...
Date Sat, 18 Nov 2017 06:54:27 GMT
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1524#discussion_r151831369
  
    --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala
---
    @@ -799,18 +799,19 @@ object CarbonDataRDDFactory {
           throw new DataLoadingException("Partition column not found.")
         }
     
    -    val dateFormatMap = CarbonDataProcessorUtil.getDateFormatMap(carbonLoadModel.getDateFormat)
    -    val specificFormat = Option(dateFormatMap.get(partitionColumn.toLowerCase))
    -    val timeStampFormat = if (specificFormat.isDefined) {
    -      new SimpleDateFormat(specificFormat.get)
    -    } else {
    -      val timestampFormatString = CarbonProperties.getInstance().getProperty(CarbonCommonConstants
    -        .CARBON_TIMESTAMP_FORMAT, CarbonCommonConstants.CARBON_TIMESTAMP_DEFAULT_FORMAT)
    -      new SimpleDateFormat(timestampFormatString)
    -    }
    +    val specificTimestampFormat = carbonLoadModel.getTimestampformat
    +    val specificDateFormat = carbonLoadModel.getDateFormat
    +    val timeStampFormat =
    +      if (specificTimestampFormat != null && !specificTimestampFormat.trim.isEmpty)
{
    +        new SimpleDateFormat(specificTimestampFormat)
    +      } else {
    +        val timestampFormatString = CarbonProperties.getInstance().getProperty(CarbonCommonConstants
    --- End diff --
    
    move `CarbonCommonConstants` to next line, give one parameter in one line


---

Mime
View raw message