Github user QiangCai commented on a diff in the pull request: https://github.com/apache/incubator-carbondata/pull/697#discussion_r107918771 --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/CarbonFilters.scala --- @@ -111,16 +111,24 @@ 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]) { + DataType.DOUBLE + } + else { + dataTypeOfAttribute + } + new CarbonLiteralExpression(value, dataType) } createFilter(predicate) } // Check out which filters can be pushed down to carbon, remaining can be handled in spark layer. - // Mostly dimension filters are only pushed down since it is faster in carbon. + // Mostly dimension filters are only pushed down since it is faster in carbo n. --- End diff -- redundant blank
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---