[
https://issues.apache.org/jira/browse/CARBONDATA-157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15423753#comment-15423753
]
ASF GitHub Bot commented on CARBONDATA-157:
-------------------------------------------
Github user Jay357089 commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/75#discussion_r75053060
--- Diff:
core/src/main/java/org/apache/carbondata/scan/filter/FilterExpressionProcessor.java
---
@@ -215,6 +215,20 @@ private FilterResolverIntf
createFilterResolverTree(Expression expressionTree,
AbsoluteTableIdentifier tableIdentifier, Expression
intermediateExpression) {
ExpressionType filterExpressionType =
expressionTree.getFilterExpressionType();
BinaryExpression currentExpression = null;
+ if (filterExpressionType == ExpressionType.OR || filterExpressionType
== ExpressionType.AND) {
+ Expression leftExpression = ((BinaryExpression)
expressionTree).getLeft();
+ Expression rightExpression = ((BinaryExpression)
expressionTree).getRight();
+ if (!(leftExpression instanceof BinaryExpression ||
+ leftExpression instanceof ConditionalExpression)) {
+ expressionTree = rightExpression;
+ filterExpressionType = rightExpression.getFilterExpressionType();
+ }
+ else if (!(rightExpression instanceof BinaryExpression ||
--- End diff --
handled
> for decimal(n,n) column, when filter has int value, then will trow exception
> ----------------------------------------------------------------------------
>
> Key: CARBONDATA-157
> URL: https://issues.apache.org/jira/browse/CARBONDATA-157
> Project: CarbonData
> Issue Type: Bug
> Reporter: Jay
> Priority: Minor
>
> when do as following
> create table Test (c1_int int,c2_Bigint Bigint,c3_Decimal Decimal(38,38))
> STORED BY 'org.apache.carbondata.format'
> LOAD DATA INPATH 'hdfs:/Data/Test_Data.csv' INTO table
> TestOPTIONS('DELIMITER'=',','QUOTECHAR'='','FILEHEADER'='')
> select c3_decimal from Test where c3_decimal
> =-0.12345678900987654321123456789009876538 or c3_decimal =2345
> then the query will throw exception
> Error: java.lang.RuntimeException: Exception occurred in query execution ::
> org.carbondata.query.expression.LiteralExpression cannot be cast to
> org.carbondata.query.expression.conditional.ConditionalExpression
> (state=,code=0).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)