[jira] [Commented] (SPARK-28748) 0 as decimal (n , n) in Hive tables shows as NULL in Spark

2019-08-16 Thread Dongjoon Hyun (JIRA)


[ 
https://issues.apache.org/jira/browse/SPARK-28748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16908973#comment-16908973
 ] 

Dongjoon Hyun commented on SPARK-28748:
---

Thanks! Then, I'll resolve this as an issue superseded by SPARK-23710 .

> 0 as decimal (n , n) in Hive tables shows as NULL in Spark
> --
>
> Key: SPARK-28748
> URL: https://issues.apache.org/jira/browse/SPARK-28748
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 2.1.0, 2.2.1, 2.3.1, 2.3.2, 2.4.3
>Reporter: Rohit Sindhu
>Priority: Minor
> Attachments: image-2019-08-16-18-18-19-279.png
>
>
> Zeros(0) inserted as decimal (n , n) in hive tables shows as null in spark 
> sql.
> Repro Steps
> *Hive Shell*
> {code}
> create table test_dec (name string , id decimal(3,3));
> insert into test_dec values ('c1' , 0) , ('c2' , 0.0) , ('c3' , 0.1);
> select * from test_dec;
> {code}
> {code}
> c1 0.000
> c2 0.000
> c3 0.100
> {code} 
> *Spark* Shell
> {code}
> spark.sqlContext.sql("select * from test_dec").show;
> {code}
> {code}
> ++-+                                                                  
>   
> |name|   id|
> ++-+
> |  c1| null|
> |  c2| null|
> |  c3|0.100|
> ++-+
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Commented] (SPARK-28748) 0 as decimal (n , n) in Hive tables shows as NULL in Spark

2019-08-16 Thread Yuming Wang (JIRA)


[ 
https://issues.apache.org/jira/browse/SPARK-28748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16908970#comment-16908970
 ] 

Yuming Wang commented on SPARK-28748:
-

Yes

> 0 as decimal (n , n) in Hive tables shows as NULL in Spark
> --
>
> Key: SPARK-28748
> URL: https://issues.apache.org/jira/browse/SPARK-28748
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 2.1.0, 2.2.1, 2.3.1, 2.3.2, 2.4.3
>Reporter: Rohit Sindhu
>Priority: Minor
> Attachments: image-2019-08-16-18-18-19-279.png
>
>
> Zeros(0) inserted as decimal (n , n) in hive tables shows as null in spark 
> sql.
> Repro Steps
> *Hive Shell*
> {code}
> create table test_dec (name string , id decimal(3,3));
> insert into test_dec values ('c1' , 0) , ('c2' , 0.0) , ('c3' , 0.1);
> select * from test_dec;
> {code}
> {code}
> c1 0.000
> c2 0.000
> c3 0.100
> {code} 
> *Spark* Shell
> {code}
> spark.sqlContext.sql("select * from test_dec").show;
> {code}
> {code}
> ++-+                                                                  
>   
> |name|   id|
> ++-+
> |  c1| null|
> |  c2| null|
> |  c3|0.100|
> ++-+
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Commented] (SPARK-28748) 0 as decimal (n , n) in Hive tables shows as NULL in Spark

2019-08-16 Thread Dongjoon Hyun (JIRA)


[ 
https://issues.apache.org/jira/browse/SPARK-28748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16908969#comment-16908969
 ] 

Dongjoon Hyun commented on SPARK-28748:
---

Thank you for pinging me, [~yumwang]. So, the fix is only available in Apache 
Spark 3.0.0 with Hadoop 3.2 profile build. Did I understand correctly?

> 0 as decimal (n , n) in Hive tables shows as NULL in Spark
> --
>
> Key: SPARK-28748
> URL: https://issues.apache.org/jira/browse/SPARK-28748
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 2.1.0, 2.2.1, 2.3.1, 2.3.2, 2.4.3
>Reporter: Rohit Sindhu
>Priority: Minor
> Attachments: image-2019-08-16-18-18-19-279.png
>
>
> Zeros(0) inserted as decimal (n , n) in hive tables shows as null in spark 
> sql.
> Repro Steps
> *Hive Shell*
> {code}
> create table test_dec (name string , id decimal(3,3));
> insert into test_dec values ('c1' , 0) , ('c2' , 0.0) , ('c3' , 0.1);
> select * from test_dec;
> {code}
> {code}
> c1 0.000
> c2 0.000
> c3 0.100
> {code} 
> *Spark* Shell
> {code}
> spark.sqlContext.sql("select * from test_dec").show;
> {code}
> {code}
> ++-+                                                                  
>   
> |name|   id|
> ++-+
> |  c1| null|
> |  c2| null|
> |  c3|0.100|
> ++-+
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Commented] (SPARK-28748) 0 as decimal (n , n) in Hive tables shows as NULL in Spark

2019-08-16 Thread Yuming Wang (JIRA)


[ 
https://issues.apache.org/jira/browse/SPARK-28748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16908940#comment-16908940
 ] 

Yuming Wang commented on SPARK-28748:
-

cc [~dongjoon] We really hit this issue.

> 0 as decimal (n , n) in Hive tables shows as NULL in Spark
> --
>
> Key: SPARK-28748
> URL: https://issues.apache.org/jira/browse/SPARK-28748
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 2.1.0, 2.2.1, 2.3.1, 2.3.2, 2.4.3
>Reporter: Rohit Sindhu
>Priority: Minor
> Attachments: image-2019-08-16-18-18-19-279.png
>
>
> Zeros(0) inserted as decimal (n , n) in hive tables shows as null in spark 
> sql.
> Repro Steps
> *Hive Shell*
> {code}
> create table test_dec (name string , id decimal(3,3));
> insert into test_dec values ('c1' , 0) , ('c2' , 0.0) , ('c3' , 0.1);
> select * from test_dec;
> {code}
> {code}
> c1 0.000
> c2 0.000
> c3 0.100
> {code} 
> *Spark* Shell
> {code}
> spark.sqlContext.sql("select * from test_dec").show;
> {code}
> {code}
> ++-+                                                                  
>   
> |name|   id|
> ++-+
> |  c1| null|
> |  c2| null|
> |  c3|0.100|
> ++-+
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Commented] (SPARK-28748) 0 as decimal (n , n) in Hive tables shows as NULL in Spark

2019-08-16 Thread Yuming Wang (JIRA)


[ 
https://issues.apache.org/jira/browse/SPARK-28748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16908937#comment-16908937
 ] 

Yuming Wang commented on SPARK-28748:
-

We fixed it by upgrade built-in Hive to 2.3.5 and we has ported test: 
SPARK-28460

!image-2019-08-16-18-18-19-279.png!

> 0 as decimal (n , n) in Hive tables shows as NULL in Spark
> --
>
> Key: SPARK-28748
> URL: https://issues.apache.org/jira/browse/SPARK-28748
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 2.1.0, 2.2.1, 2.3.1, 2.3.2, 2.4.3
>Reporter: Rohit Sindhu
>Priority: Minor
> Attachments: image-2019-08-16-18-18-19-279.png
>
>
> Zeros(0) inserted as decimal (n , n) in hive tables shows as null in spark 
> sql.
> Repro Steps
> *Hive Shell*
> {code}
> create table test_dec (name string , id decimal(3,3));
> insert into test_dec values ('c1' , 0) , ('c2' , 0.0) , ('c3' , 0.1);
> select * from test_dec;
> {code}
> {code}
> c1 0.000
> c2 0.000
> c3 0.100
> {code} 
> *Spark* Shell
> {code}
> spark.sqlContext.sql("select * from test_dec").show;
> {code}
> {code}
> ++-+                                                                  
>   
> |name|   id|
> ++-+
> |  c1| null|
> |  c2| null|
> |  c3|0.100|
> ++-+
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org