[jira] [Updated] (SPARK-29854) lpad and rpad built in function not throw Exception for invalid len value

2019-11-12 Thread ABHISHEK KUMAR GUPTA (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-29854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ABHISHEK KUMAR GUPTA updated SPARK-29854:
-
Description: 
Spark Returns Empty String)

{code}
0: jdbc:hive2://10.18.19.208:23040/default> SELECT 
lpad('hihhh', 5000, '');
 ++
|lpad(hihhh, CAST(5000 AS INT), 
)|

++


++


Hive:


SELECT lpad('hihhh', 5000, 
'');
 Error: Error while compiling statement: FAILED: SemanticException [Error 
10016]: Line 1:67 Argument type mismatch '''': lpad only takes 
INT/SHORT/BYTE types as 2-ths argument, got DECIMAL (state=42000,code=10016)


PostgreSQL


function lpad(unknown, numeric, unknown) does not exist


 

Expected output:

In Spark also it should throw Exception like Hive
{code}
 

  was:
Spark Returns Empty String)

{code}
0: jdbc:hive2://10.18.19.208:23040/default> SELECT 
lpad('hihhh', 5000, '');
 ++
|lpad(hihhh, CAST(5000 AS INT), 
)|

++


++
{code}

Hive:

{code}
SELECT lpad('hihhh', 5000, 
'');
 Error: Error while compiling statement: FAILED: SemanticException [Error 
10016]: Line 1:67 Argument type mismatch '''': lpad only takes 
INT/SHORT/BYTE types as 2-ths argument, got DECIMAL (state=42000,code=10016)
{code}

PostgreSQL

{code}
function lpad(unknown, numeric, unknown) does not exist
{code}

 

Expected output:

In Spark also it should throw Exception like Hive

 


> lpad and rpad built in function not throw Exception for invalid len value
> -
>
> Key: SPARK-29854
> URL: https://issues.apache.org/jira/browse/SPARK-29854
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 3.0.0
>Reporter: ABHISHEK KUMAR GUPTA
>Priority: Minor
>
> Spark Returns Empty String)
> {code}
> 0: jdbc:hive2://10.18.19.208:23040/default> SELECT 
> lpad('hihhh', 5000, '');
>  ++
> |lpad(hihhh, CAST(5000 AS INT), 
> )|
> ++
> ++
> Hive:
> SELECT lpad('hihhh', 5000, 
> '');
>  Error: Error while compiling statement: FAILED: SemanticException [Error 
> 10016]: Line 1:67 Argument type mismatch '''': lpad only takes 
> INT/SHORT/BYTE types as 2-ths argument, got DECIMAL (state=42000,code=10016)
> PostgreSQL
> function lpad(unknown, numeric, unknown) does not exist
>  
> Expected output:
> In Spark also it should throw Exception like Hive
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (SPARK-29854) lpad and rpad built in function not throw Exception for invalid len value

2019-11-12 Thread Hyukjin Kwon (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-29854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hyukjin Kwon updated SPARK-29854:
-
Description: 
Spark Returns Empty String)

{code}
0: jdbc:hive2://10.18.19.208:23040/default> SELECT 
lpad('hihhh', 5000, '');
 ++
|lpad(hihhh, CAST(5000 AS INT), 
)|

++


++
{code}

Hive:

{code}
SELECT lpad('hihhh', 5000, 
'');
 Error: Error while compiling statement: FAILED: SemanticException [Error 
10016]: Line 1:67 Argument type mismatch '''': lpad only takes 
INT/SHORT/BYTE types as 2-ths argument, got DECIMAL (state=42000,code=10016)
{code}

PostgreSQL

{code}
function lpad(unknown, numeric, unknown) does not exist
{code}

 

Expected output:

In Spark also it should throw Exception like Hive

 

  was:
Spark Returns Empty String)

0: jdbc:hive2://10.18.19.208:23040/default> SELECT 
lpad('hihhh', 5000, '');
 ++
|lpad(hihhh, CAST(5000 AS INT), 
)|

++


++

Hive:

SELECT lpad('hihhh', 5000, 
'');
 Error: Error while compiling statement: FAILED: SemanticException [Error 
10016]: Line 1:67 Argument type mismatch '''': lpad only takes 
INT/SHORT/BYTE types as 2-ths argument, got DECIMAL (state=42000,code=10016)

PostgreSQL

function lpad(unknown, numeric, unknown) does not exist

 

Expected output:

In Spark also it should throw Exception like Hive

 


> lpad and rpad built in function not throw Exception for invalid len value
> -
>
> Key: SPARK-29854
> URL: https://issues.apache.org/jira/browse/SPARK-29854
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 3.0.0
>Reporter: ABHISHEK KUMAR GUPTA
>Priority: Minor
>
> Spark Returns Empty String)
> {code}
> 0: jdbc:hive2://10.18.19.208:23040/default> SELECT 
> lpad('hihhh', 5000, '');
>  ++
> |lpad(hihhh, CAST(5000 AS INT), 
> )|
> ++
> ++
> {code}
> Hive:
> {code}
> SELECT lpad('hihhh', 5000, 
> '');
>  Error: Error while compiling statement: FAILED: SemanticException [Error 
> 10016]: Line 1:67 Argument type mismatch '''': lpad only takes 
> INT/SHORT/BYTE types as 2-ths argument, got DECIMAL (state=42000,code=10016)
> {code}
> PostgreSQL
> {code}
> function lpad(unknown, numeric, unknown) does not exist
> {code}
>  
> Expected output:
> In Spark also it should throw Exception like Hive
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (SPARK-29854) lpad and rpad built in function not throw Exception for invalid len value

2019-11-11 Thread ABHISHEK KUMAR GUPTA (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-29854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ABHISHEK KUMAR GUPTA updated SPARK-29854:
-
Description: 
Spark Returns Empty String)

0: jdbc:hive2://10.18.19.208:23040/default> SELECT 
lpad('hihhh', 5000, '');
 ++
|lpad(hihhh, CAST(5000 AS INT), 
)|

++


++

Hive:

SELECT lpad('hihhh', 5000, 
'');
 Error: Error while compiling statement: FAILED: SemanticException [Error 
10016]: Line 1:67 Argument type mismatch '''': lpad only takes 
INT/SHORT/BYTE types as 2-ths argument, got DECIMAL (state=42000,code=10016)

PostgreSQL

function lpad(unknown, numeric, unknown) does not exist

 

Expected output:

In Spark also it should throw Exception like Hive

 

  was:
Spark Returns Empty String)

0: jdbc:hive2://10.18.19.208:23040/default> SELECT 
lpad('hihhh', 5000, '');
 ++
|lpad(hihhh, CAST(5000 AS INT), 
)|

++
| |

++

Hive:

SELECT lpad('hihhh', 5000, 
'');
 Error: Error while compiling statement: FAILED: SemanticException [Error 
10016]: Line 1:67 Argument type mismatch '''': lpad only takes 
INT/SHORT/BYTE types as 2-ths argument, got DECIMAL (state=42000,code=10016)

PostgreSQL

function lpad(unknown, numeric, unknown) does not exist

 

Expected output:

In Spark also it should throw Exception like Hive

 


> lpad and rpad built in function not throw Exception for invalid len value
> -
>
> Key: SPARK-29854
> URL: https://issues.apache.org/jira/browse/SPARK-29854
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 3.0.0
>Reporter: ABHISHEK KUMAR GUPTA
>Priority: Minor
>
> Spark Returns Empty String)
> 0: jdbc:hive2://10.18.19.208:23040/default> SELECT 
> lpad('hihhh', 5000, '');
>  ++
> |lpad(hihhh, CAST(5000 AS INT), 
> )|
> ++
> ++
> Hive:
> SELECT lpad('hihhh', 5000, 
> '');
>  Error: Error while compiling statement: FAILED: SemanticException [Error 
> 10016]: Line 1:67 Argument type mismatch '''': lpad only takes 
> INT/SHORT/BYTE types as 2-ths argument, got DECIMAL (state=42000,code=10016)
> PostgreSQL
> function lpad(unknown, numeric, unknown) does not exist
>  
> Expected output:
> In Spark also it should throw Exception like Hive
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (SPARK-29854) lpad and rpad built in function not throw Exception for invalid len value

2019-11-11 Thread ABHISHEK KUMAR GUPTA (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-29854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ABHISHEK KUMAR GUPTA updated SPARK-29854:
-
Description: 
Spark Returns Empty String)

0: jdbc:hive2://10.18.19.208:23040/default> SELECT 
lpad('hihhh', 5000, '');
 ++
|lpad(hihhh, CAST(5000 AS INT), 
)|

++
| |

++

Hive:

SELECT lpad('hihhh', 5000, 
'');
 Error: Error while compiling statement: FAILED: SemanticException [Error 
10016]: Line 1:67 Argument type mismatch '''': lpad only takes 
INT/SHORT/BYTE types as 2-ths argument, got DECIMAL (state=42000,code=10016)

PostgreSQL

function lpad(unknown, numeric, unknown) does not exist

 

Expected output:

In Spark also it should throw Exception like Hive

 

  was:
Spark:( Returns Empty String)

0: jdbc:hive2://10.18.19.208:23040/default> SELECT 
lpad('hihhh', 5000, '');
++
| lpad(hihhh, CAST(5000 AS INT), 
) |
++
| |
++

Hive:

SELECT lpad('hihhh', 5000, 
'');
Error: Error while compiling statement: FAILED: SemanticException [Error 
10016]: Line 1:67 Argument type mismatch '''': lpad only takes 
INT/SHORT/BYTE types as 2-ths argument, got DECIMAL (state=42000,code=10016)

PostgreSQL

function lpad(unknown, numeric, unknown) does not exist

 

Expected output:

In Spark also it should throw Exception like Hive

 


> lpad and rpad built in function not throw Exception for invalid len value
> -
>
> Key: SPARK-29854
> URL: https://issues.apache.org/jira/browse/SPARK-29854
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 3.0.0
>Reporter: ABHISHEK KUMAR GUPTA
>Priority: Minor
>
> Spark Returns Empty String)
> 0: jdbc:hive2://10.18.19.208:23040/default> SELECT 
> lpad('hihhh', 5000, '');
>  ++
> |lpad(hihhh, CAST(5000 AS INT), 
> )|
> ++
> | |
> ++
> Hive:
> SELECT lpad('hihhh', 5000, 
> '');
>  Error: Error while compiling statement: FAILED: SemanticException [Error 
> 10016]: Line 1:67 Argument type mismatch '''': lpad only takes 
> INT/SHORT/BYTE types as 2-ths argument, got DECIMAL (state=42000,code=10016)
> PostgreSQL
> function lpad(unknown, numeric, unknown) does not exist
>  
> Expected output:
> In Spark also it should throw Exception like Hive
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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