Allow creating of TimeUnit instances without direct dependency on parquet-format #2708
Labels
enhancement
Any new improvement worthy of a entry in the changelog
parquet
Changes to the parquet crate
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Maintaimer of the downstream
odbc2parquet
tool here. I would like to switch from converted type to logical types. One bump in the road of doing so is the fact thatodbc2parquet
now directly needs to depend also on theparquet-format
crate instead of justparquet
. The cause being, that it is impossible to create an instance ofTimeUnit
for the logical type, due to it being depended on e.g.MilliSeconds
orMicroSeconds
type of theparquet-format
crate.Describe the solution you'd like
I think I do not fully grasp why the current design has been choosen, so I am not particularly biased towards any solution. I could brainstorm a few ideas though:
MilliSeconds
type tag from theTimeUnit::MILLIS
variant.TimeUnit
constructors for milliseconds, microseconds, etc.MilliSeconds
,MicroSeconds
, etc. ..Describe alternatives you've considered
Currently I'll just add the extra direct dependency to
parquet-format
. If this is what you want me to do, consider this issue void.Additional context
The text was updated successfully, but these errors were encountered: