jerolba / parquet-carpet

Java Parquet serialization and deserialization library using Java 17 Records
Apache License 2.0
35 stars 0 forks source link

Support reading files with columns with snake_case naming #15

Closed jerolba closed 4 months ago

jerolba commented 4 months ago

Support to map automatically columns with snake_case format into java field names in camelCase format

message Data {
  required int64 some_id_value;
  optional binary company_code (STRING);
}

Is parsed by this record with modifiers or annotations:

record Data(long someIdValue, String companyCode) { }

Proposed API implementation: in CarpetReader class add a new method that configures the strategy to use mapping fields to the record:

var reader = new CarpetReader<>(file Data.class).withFieldMatchingStrategy(SNAKE_CASE_STRATEGY);

Other strategies can be added if needed.