You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/04/06 15:16:18 UTC

[GitHub] [nifi] dtrodrigues commented on issue #4180: NIFI-7316 - prevent record string to char truncation

dtrodrigues commented on issue #4180: NIFI-7316 - prevent record string to char truncation
URL: https://github.com/apache/nifi/pull/4180#issuecomment-609857530
 
 
   Yeah I can definitely add a unit test.
   
   I'm not sure if this would cause a regression in other cases. However, if I'm reading this correctly, this is only the logic to add the schema for additional types found as part of a database ResultSet. In the case of `select *, 'red' AS color from FLOWFILE`, the type of the `color` ends up being char with a length of 3. To be more conservative, we can instead do something like call `getPrecision()` on the column to figure the width, and if the length of the column is greater than 1, use the String type, otherwise leave it as a char.
   
   I'm open to whatever, but I believe that the current behavior in this case isn't expected.

----------------------------------------------------------------
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