ZJONSSON / parquetjs

fully asynchronous, pure JavaScript implementation of the Parquet file format
MIT License
34 stars 61 forks source link

Simple select for array columns #66

Open bryant-sharethis opened 3 years ago

bryant-sharethis commented 3 years ago

I was trying to specify column names for columns of type "array" and no data was showing up.

let cursor = reader.getCursor([
  'array_column'
])

Upon investigation, the code was only checking for exact matches down to the individual fields in arrays, so the required code was

let cursor = reader.getCursor([
  ['array_column', 'element', 'list', 'specific_field']
])

This wasn't documented, so I added it to the readme.

I also added support for simply specifying

let cursor = reader.getCursor([
  'array_column'
])

which is more intuitive when you want all of the data in the array