Thanks for the stack trace, it helped to find the root cause of this
problem.
Decimal values in parquet table are stored using BINARY primitive type, but
currently, Drill does not support decimals stored as binary.
The good news is that it will be fixed in DRILL-6094.
Kind regards,
Volodymyr
Hi
Here is the stacktrace on the server side
error_type: SYSTEM
message: "SYSTEM ERROR: ClassCastException:
org.apache.drill.exec.vector.NullableDecimal28SparseVector cannot be cast to
org.apache.drill.exec.vector.VariableWidthVector\n\nFragment 2:8\n\n[Error Id:
1010].
> ... 21 more
>
>
> This message has been marked as CONFIDENTIAL on Monday, April 30, 2018 @
> 8:44:22 AM
>
> -Original Message-
> From: Vova Vysotskyi <vvo...@gmail.com>
> Sent: Friday, April 27, 2018 5:29 PM
> To: user@drill.apa
he.org
Subject: Re: Exception While Querying Decimal Fields in Apache Drill
Hi Peter,
Could you please also share a stacktrace?
Does the specified table
contain pan, terminal_id, source_node_name, tran_completed, tran_reversed and
tran_type columns? If it contains them, which types do they have?
echt <aengelbre...@mapr.com>
>
> Sent: Friday, April 27, 2018 3:41 PM
>
> To: user@drill.apache.org
>
> Subject: Re: Exception While Querying Decimal Fields in Apache Drill
>
>
>
> What version of Drill are you using?
>
> Also is planner.enable_decimal_dat
Friday, April 27, 2018 @
3:24:36 PM
-Original Message-
From: Andries Engelbrecht <aengelbre...@mapr.com>
Sent: Friday, April 27, 2018 3:07 PM
To: user@drill.apache.org
Subject: Re: Exception While Querying Decimal Fields in Apache Drill
Perhaps try to
Edike
This message has been marked as CONFIDENTIAL on Friday, April 27, 2018 @
3:24:36 PM
-Original Message-
From: Andries Engelbrecht <aengelbre...@mapr.com>
Sent: Friday, April 27, 2018 3:07 PM
To: user@drill.apache.org
Subject: Re: Exception While Querying Decimal Fields in Apache
Perhaps try to convert the predicate and select operations involving the
decimal types to float or similar.
i.e tran_completed = 1.0 and ((cast(SETTLE_AMOUNT_IMPACT as double)
*(-1.0))/100.0)
Alternatively you may have to cast the decimals as float, but that will be more
cumbersome.
I am trying to run the following query in apache drill, I am querying data
stored in parquet files using the following query
select pan, count(*) as number_of_transactions ,
terminal_id,SUM((cast(SETTLE_AMOUNT_IMPACT as double) *-1)/100) AS
settle_amount_impact
from