carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manishgupta88 <>
Subject [GitHub] carbondata pull request #1023: [carbondata-1149] Fix issue of mismatch type ...
Date Wed, 14 Jun 2017 06:27:43 GMT
Github user manishgupta88 commented on a diff in the pull request:
    --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
    @@ -179,6 +193,68 @@ object CommonUtil {
    +  def validateTypeConvert(desType: Option[String], value: String): Boolean = {
    +    var flag = true
    +    val result = desType match {
    +      case Some("IntegerType") =>
    +        DataTypeUtil.getDataBasedOnDataType(value.trim, DataType.INT)
    +      case Some("StringType") =>
    +        DataTypeUtil.getDataBasedOnDataType(value.trim, DataType.STRING)
    --- End diff --
    Please correct me if I am wrong....While validating the values you are trimming the values
but in the actual range info can still contain the spaces as the object is not getting refilled
with the trimmed values and therefore can lead to an inconsistent state. For e.g I have Int
type column with rangeInfo = 1, 2 , 3,4...while parsing it will pass as trim function is used
but original object still will have the same values...

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message