You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/07/22 11:33:00 UTC

[jira] [Comment Edited] (SPARK-28451) substr returns different values

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

Hyukjin Kwon edited comment on SPARK-28451 at 7/22/19 11:32 AM:
----------------------------------------------------------------

Personally I don't think it's worth but let's see what other committers think like.


was (Author: hyukjin.kwon):
Personally I don't think it'w worth but let's see what other committers like.

> substr returns different values
> -------------------------------
>
>                 Key: SPARK-28451
>                 URL: https://issues.apache.org/jira/browse/SPARK-28451
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Tests
>    Affects Versions: 3.0.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> PostgreSQL:
> {noformat}
> postgres=# select substr('1234567890', -1, 5);
>  substr
> --------
>  123
> (1 row)
> postgres=# select substr('1234567890', 1, -1);
> ERROR:  negative substring length not allowed
> {noformat}
> Spark SQL:
> {noformat}
> spark-sql> select substr('1234567890', -1, 5);
> 0
> spark-sql> select substr('1234567890', 1, -1);
> spark-sql>
> {noformat}



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

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