You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/06/23 16:15:51 UTC
[GitHub] [spark] wangyum edited a comment on issue #24859:
[SPARK-28033][SQL] String concatenation should lower precedence than other
operators
wangyum edited a comment on issue #24859: [SPARK-28033][SQL] String concatenation should lower precedence than other operators
URL: https://github.com/apache/spark/pull/24859#issuecomment-504713339
It seems that it works only when the other side is a number string or a space:
```sql
SQL> select banner from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
PL/SQL Release 12.2.0.1.0 - Production
CORE 12.2.0.1.0 Production
TNS for Linux: Version 12.2.0.1.0 - Production
NLSRTL Version 12.2.0.1.0 - Production
SQL> select '4' || 2 + 2 from dual;
'4'||2+2
----------
44
SQL> select '44' || 2 + 2 from dual;
'44'||2+2
----------
444
SQL> select '' || 2 + 2 from dual;
''||2+2
----------
4
SQL> select '4a' || 2 + 2 from dual;
select '4a' || 2 + 2 from dual
*
ERROR at line 1:
ORA-01722: invalid number
SQL> select ':' || 2 + 2 from dual;
select ':' || 2 + 2 from dual
*
ERROR at line 1:
ORA-01722: invalid number
SQL> select 'four: ' || 2 + 2 from dual;
select 'four: ' || 2 + 2 from dual
*
ERROR at line 1:
ORA-01722: invalid number
```

https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/About-SQL-Operators.html#GUID-FEF44762-F45C-41D9-B380-F6A61AD25338
https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Concatenation-Operator.html#GUID-08C10738-706B-4290-B7CD-C279EBC90F7E
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org