trafodion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liu, Ming (Ming)" <ming....@esgyn.cn>
Subject concat behavior change when concat two different data type
Date Sat, 13 Jan 2018 14:58:09 GMT
Hi, developers,

Trafodion concat() works differently than other popular database (Oracle/PostgreSQL/MySQL)
when concatenating data of two different SQL types.

Here is the example:
>>select '|'||80||'|' from dual;
(EXPR)
------
|    80|
Trafodion add 4 space when converting integer (80) into varchar. Other database doesn't do
this, it is desired to be:
>>select '|'||80||'|' from dual;
(EXPR)
------
|80|

Users need to do concat to generate data for further processing, and the left pad is not expected,
an extra trim is required.
I think Trafodion should behave like other RDBMS, which is better. I created jira https://issues.apache.org/jira/browse/TRAFODION-2904
and PR https://github.com/apache/trafodion/pull/1397
Please add your comments here or in the JIRA/PR.

This may not be backward compatible, so I ask all your opinion here. Maybe there is a strong
reason to do the left padding.

Thanks,
Ming

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message