mirror of
https://github.com/apache/impala.git
synced 2026-01-04 18:00:57 -05:00
This is done to simplify the CHAR(N) logic. I believe this is overall an improvement - any benefits of the out-of-line storage that motivated this optimisation originally were outweighed by the added complexity. This also avoids IMPALA-5559 (fe/be have different notions of var-len), which will unblock IMPALA-3200. Pros: * Reduce the number of code paths and improve test coverage. (e.g. avoids IMPALA-5559: fe/be have different notions of var-len) * Reduced memory to store non-NULL data (saves 12-byte StringValue) * Fewer branches in code -> save CPU cycles. * If CHAR(N) performance is important, reduced complexity makes it easier to implement codegen. Cons: * Requires N bytes to store a NULL value. * May hurt cache locality (although this is speculative in my mind). The change is mostly mechanical - I removed MAX_CHAR_INLINE_LENGTH and then removed branches that depended on that. Testing: Ran exhaustive build. Change-Id: I9c0b823ccff6b0c37f5267c548d096c29b8caac3 Reviewed-on: http://gerrit.cloudera.org:8080/7303 Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com> Tested-by: Impala Public Jenkins