phoenix
phoenix copied to clipboard
Phoenix 572 Truncate CHAR with max length on upsert
This transaction truncate string to the CHAR max length value on upsert. A test case is added and passed. Please review.
Thanks for the patch, @d9liang - I reviewed and left you some minor feedback. Overall, it looks very good. One other thing to check (and add tests for) is other code paths that insert data: namely UPSERT SELECT (on client-side and server-side) and CSV bulk load (which goes through a similar code path as UPSERT VALUES, so you might already be covered there, not sure). This would ensure that we're consistently truncating fixed width types in all cases.