How to write TIMESTAMP logical type (INT96) to parquet, using ParquetWriter?

前端 未结 2 1511
梦毁少年i
梦毁少年i 2020-12-30 15:03

I have a tool that uses a org.apache.parquet.hadoop.ParquetWriter to convert CSV data files to parquet data files.

Currently, it only handles int32,

2条回答
  •  难免孤独
    2020-12-30 15:32

    1. INT96 timestamps use the INT96 physical type without any logical type, so don't annotate them with anything.
    2. If you are interested in the structure of an INT96 timestamp, take a look here. If you would like to see sample code that converts to and from this format, take a look at this file from Hive.

提交回复
热议问题