Float Data Type Support in carbondata Querry

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Float Data Type Support in carbondata Querry

rahul_kumar
Hello Ravindra,

I am working on *CARBONDATA-390*(to support Float data type).
I have made following changes *and its working fine with Spark 1.6*.

https://github.com/apache/incubator-carbondata/compare/maste
r...rahulforallp:CARBONDATA-390?expand=1

But when i have tested it for Spark 2.0 .
It works fine if i execute create and load(insert) command .
Select query also works fine and gives the object of DataSet.
Schema of Table and dataset is correct with float datatype.
But when i try dataSet.show() , it gives me following error:

*Exception in thread "main" org.apache.spark.SparkException: Job aborted
due to stage failure: Task 0 in stage 4.0 failed 1 times, most recent
failure: Lost task 0.0 in stage 4.0 (TID 5, localhost):
java.lang.ClassCastException: java.lang.Double cannot be cast to
java.lang.Float*


*My observation is  Dataset is strongly typed collection . So when we
selects record from table it gives correct result , but somewhere float has
been converted to Double and during the dataSet.show() gives cast exception
because dataset schema has float datatype.*


          Thanks and Regards

*   Rahul Kumar <http://www.knoldus.com/about/team/rahul.knol>     *

*        Software Consultant*       *Knoldus Software LLP
<http://www.knoldus.com/home.knol>  *

*        [image: https://www.linkedin.com/in/rahulforallp]
<https://www.linkedin.com/in/rahulforallp>    [image:
https://twitter.com/RahulKu71223673] <https://twitter.com/RahulKu71223673>
   <https://github.com/rahulforallp>
<http:///rahulforallp@...>*            * : 8800897566*
Reply | Threaded
Open this post in threaded view
|

Re: Float Data Type Support in carbondata Querry

ravipesala
Hi,

From carbon it supposed to return float data when you use float data type.
Please check whether you are converting the data to float or not
in ScannedResultCollector implementation classes.

Regards,
Ravindra

On 27 December 2016 at 20:23, Rahul Kumar <[hidden email]> wrote:

> Hello Ravindra,
>
> I am working on *CARBONDATA-390*(to support Float data type).
> I have made following changes *and its working fine with Spark 1.6*.
>
> https://github.com/apache/incubator-carbondata/compare/maste
> r...rahulforallp:CARBONDATA-390?expand=1
>
> But when i have tested it for Spark 2.0 .
> It works fine if i execute create and load(insert) command .
> Select query also works fine and gives the object of DataSet.
> Schema of Table and dataset is correct with float datatype.
> But when i try dataSet.show() , it gives me following error:
>
> *Exception in thread "main" org.apache.spark.SparkException: Job aborted
> due to stage failure: Task 0 in stage 4.0 failed 1 times, most recent
> failure: Lost task 0.0 in stage 4.0 (TID 5, localhost):
> java.lang.ClassCastException: java.lang.Double cannot be cast to
> java.lang.Float*
>
>
> *My observation is  Dataset is strongly typed collection . So when we
> selects record from table it gives correct result , but somewhere float has
> been converted to Double and during the dataSet.show() gives cast exception
> because dataset schema has float datatype.*
>
>
>           Thanks and Regards
>
> *   Rahul Kumar <http://www.knoldus.com/about/team/rahul.knol>     *
>
> *        Software Consultant*       *Knoldus Software LLP
> <http://www.knoldus.com/home.knol>  *
>
> *        [image: https://www.linkedin.com/in/rahulforallp]
> <https://www.linkedin.com/in/rahulforallp>    [image:
> https://twitter.com/RahulKu71223673] <https://twitter.com/RahulKu71223673>
>    <https://github.com/rahulforallp>
> <http:///rahulforallp@...>*            * : 8800897566*
>



--
Thanks & Regards,
Ravi