HippoBaro opened a new issue, #11265:
URL: https://github.com/apache/arrow-rs/issues/11265

   ### Describe the bug
   
   The Parquet writer accepts some encoding and physical-type combinations that 
its encoders cannot represent correctly. Invalid configurations can therefore 
fail only when values are written, when dictionary encoding falls back, or when 
a reader encounters the output, rather than when the physical column encoder is 
constructed.
   
   Dictionary encoding can also hide the problem entirely: a configured 
fallback encoding may be invalid for the column's physical type, but writing 
succeeds if all values remain dictionary-encoded. Whether an unsupported 
configuration is accepted should not depend on the input values or whether 
dictionary fallback happens to occur.
   
   
   ### To Reproduce
   
   For example, `DELTA_LENGTH_BYTE_ARRAY` is not supported for `INT32`. 
Nevertheless, the writer allows this column to be constructed. With dictionary 
encoding enabled, a small write completes successfully without exercising the 
invalid fallback; with dictionary encoding disabled, the same values cause a 
panic inside `DeltaLengthByteArrayEncoder`.
   
   ### Expected behavior
   
   Unsupported encoding/type combinations should be rejected when the physical 
column encoder is constructed, before any values reach the affected encoder. 
This must include dictionary fallback encodings even if the column would remain 
dictionary-encoded for the entire write.
   
   The same validation should apply to the Arrow byte-array writer's fallback 
path and across both Parquet writer versions. Valid encoding/type combinations 
and their wire representations should remain unchanged.
   
   
   ### Additional context
   
   _No response_


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to