voonhous opened a new pull request, #20760: URL: https://github.com/apache/hudi/pull/20760
### Describe the issue this Pull Request addresses Closes #20503 ### Summary and Changelog `bulk_insert` wrote `ShortType` as INT32 annotated INT(16) (and could not write `ByteType`), while the table schema records both as `int`. Such files, also written by Flink `bulk_insert`/append for TINYINT/SMALLINT up to 1.2.0, failed vectorized reads with an NPE (#9845) and got no column stats. - Writer: byte/short are written as plain INT32; adds the `ByteType` writer. - Reader: `SparkInternalSchemaConverter` widens byte/short vectors to the table's type, like int/long. - Column stats: `LogicalTypeParquetAdapter` / `OriginalTypeParquetAdapter` map INT(8)/INT(16) to `INT`. - Tests in `TestSparkParquetReader`, `TestHoodieInternalRowParquetWriter`, `TestValueType`. ### Impact Byte/short columns can be bulk-inserted, and existing INT(8)/INT(16) files read correctly with column stats. ### Risk Level low ### Documentation Update none ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [x] Adequate tests were added if applicable -- 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]
