carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhavya411 <...@git.apache.org>
Subject [GitHub] incubator-carbondata pull request #616: [CARBONDATA-708] Fixed Between Filte...
Date Tue, 14 Mar 2017 12:03:02 GMT
Github user bhavya411 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/616#discussion_r105888634
  
    --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/CarbonFilters.scala
---
    @@ -110,8 +110,16 @@ object CarbonFilters {
         }
     
         def getCarbonLiteralExpression(name: String, value: Any): CarbonExpression = {
    -      new CarbonLiteralExpression(value,
    -        CarbonScalaUtil.convertSparkToCarbonDataType(dataTypeOf(name)))
    +      val dataTypeOfAttribute = CarbonScalaUtil.convertSparkToCarbonDataType(dataTypeOf(name))
    +      val dataType = if (Option(value).isDefined
    +        && dataTypeOfAttribute == DataType.STRING
    +        && value.isInstanceOf[Double]) {
    --- End diff --
    
    In the scenarios where we have stored the numbers as String (and have included it as a
Dimension) and if we are trying to do operations like >= or <= or between it is not
working correctly 
    and it gives some random results as it is comparing a String with a Double. So for those
cases this fix will work.  


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message