Ryan Blue created PARQUET-414:
---------------------------------
Summary: Binary tests check conditions not part of the API contract
Key: PARQUET-414
URL: https://issues.apache.org/jira/browse/PARQUET-414
Project: Parquet
Issue Type: Bug
Components: parquet-mr
Affects Versions: 1.8.1
Reporter: Ryan Blue
{{TestBinary#testConstantCopy}} validates that when the backing buffer for a
{{Binary}} is changed, the changes can be seen when calling either
{{Binary#getBytes}} or {{Binary#getBytesUnsafe}}. This is not a part of the API
contract for constant binary. The API guarantees the opposite: that if a reused
buffer changes then those changes won't affect the value already returned by
{{getBytes}}.
{{ByteBufferBackedBinary}} caches the value returned by {{getBytes}}, which is
allowed in the API. This causes tests to fail when it is expected that a change
to the underlying buffer changes the value of the binary, when the contract for
constant buffers is that the underlying buffer will not be changed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)