Skip to content

[parquet] Improve encoding mask API (wrap bare i32 in a struct w/ docs) #8588

@alamb

Description

@alamb

It is probably my OOP / old age, but I would find this API easier to deal with if it were wrapped in a type that had a documented API

Something like

struct EncodingMask(i32);

impl EncodingMask {
  fn new(val: i32) -> Self { 
   ...
  }
  fn as_i32(&self) -> i32 {
    self.0
  }
} 

// then you can implement From impls to/from i32 as well as a no allocation iterator

I am happy to help hack this out if you like the idea

Originally posted by @alamb in #8587 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    next-major-releasethe PR has API changes and it waiting on the next major versionparquetChanges to the parquet crateperformance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions