Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Update decimal string format #407

Merged
merged 1 commit into from
Nov 15, 2022
Merged

Update decimal string format #407

merged 1 commit into from
Nov 15, 2022

Conversation

lmarburger
Copy link
Contributor

parquet-cli prints the string format of decimals as DECIMAL(precision,scale). Update parquet-go's string format to match.

parquet-cli prints the string format of decimals as
`DECIMAL(precision,scale)`. Update parquet-go's string format to match.
Copy link
Contributor

@achille-roussel achille-roussel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lmarburger lmarburger merged commit 24e17d6 into main Nov 15, 2022
@lmarburger lmarburger deleted the lm/decimal-format branch November 15, 2022 14:56
bprosnitz added a commit to neevaco/segmentio-parquet-go that referenced this pull request Nov 15, 2022
* Serialize time.Time as a timestamp (segmentio#321)

Serialize time.Time values as Parquet timestamps. The default unit is NANOS and can be changed using the timestamp() struct tag.

type timeColumn struct {
	t1 time.Time
	t2 time.Time `parquet:",timestamp(millisecond)"`
}

* Read decimal column (segmentio#406)

Reading a parquet file with a decimal column isn't loaded with logical
type information. This behavior was not implemented. `decimalType` is
more complex from the other types because a parquet decimal can be
backed by multiple different physical types.

This PR loads logical type information for `DECIMAL` fields.

Closes segmentio#365

* Update decimal string format (segmentio#407)

parquet-cli prints the string format of decimals as
`DECIMAL(precision,scale)`. Update parquet-go's string format to match.

* Fix panic when reading file with no row groups (segmentio#408)

* Change go tag from `parquet` to `segmentio`

Co-authored-by: Larry Marburger <larry.marburger@segment.com>
Co-authored-by: Todd Wang <toddw@neeva.co>
tatatodd added a commit to neevaco/segmentio-parquet-go that referenced this pull request Nov 15, 2022
* Serialize time.Time as a timestamp (segmentio#321)

Serialize time.Time values as Parquet timestamps. The default unit is NANOS and can be changed using the timestamp() struct tag.

type timeColumn struct {
	t1 time.Time
	t2 time.Time `parquet:",timestamp(millisecond)"`
}

* Read decimal column (segmentio#406)

Reading a parquet file with a decimal column isn't loaded with logical
type information. This behavior was not implemented. `decimalType` is
more complex from the other types because a parquet decimal can be
backed by multiple different physical types.

This PR loads logical type information for `DECIMAL` fields.

Closes segmentio#365

* Update decimal string format (segmentio#407)

parquet-cli prints the string format of decimals as
`DECIMAL(precision,scale)`. Update parquet-go's string format to match.

* Fix panic when reading file with no row groups (segmentio#408)

Co-authored-by: Larry Marburger <larry.marburger@segment.com>
Co-authored-by: Benjamin Prosnitz <bprosnitz@gmail.com>
tatatodd added a commit to neevaco/segmentio-parquet-go that referenced this pull request Nov 15, 2022
* Serialize time.Time as a timestamp (segmentio#321)

Serialize time.Time values as Parquet timestamps. The default unit is NANOS and can be changed using the timestamp() struct tag.

type timeColumn struct {
	t1 time.Time
	t2 time.Time `parquet:",timestamp(millisecond)"`
}

* Read decimal column (segmentio#406)

Reading a parquet file with a decimal column isn't loaded with logical
type information. This behavior was not implemented. `decimalType` is
more complex from the other types because a parquet decimal can be
backed by multiple different physical types.

This PR loads logical type information for `DECIMAL` fields.

Closes segmentio#365

* Update decimal string format (segmentio#407)

parquet-cli prints the string format of decimals as
`DECIMAL(precision,scale)`. Update parquet-go's string format to match.

* Fix panic when reading file with no row groups (segmentio#408)

Co-authored-by: Larry Marburger <larry.marburger@segment.com>
Co-authored-by: Benjamin Prosnitz <bprosnitz@gmail.com>
bprosnitz added a commit to neevaco/segmentio-parquet-go that referenced this pull request Dec 1, 2022
* Serialize time.Time as a timestamp (segmentio#321)

Serialize time.Time values as Parquet timestamps. The default unit is NANOS and can be changed using the timestamp() struct tag.

type timeColumn struct {
	t1 time.Time
	t2 time.Time `parquet:",timestamp(millisecond)"`
}

* Read decimal column (segmentio#406)

Reading a parquet file with a decimal column isn't loaded with logical
type information. This behavior was not implemented. `decimalType` is
more complex from the other types because a parquet decimal can be
backed by multiple different physical types.

This PR loads logical type information for `DECIMAL` fields.

Closes segmentio#365

* Update decimal string format (segmentio#407)

parquet-cli prints the string format of decimals as
`DECIMAL(precision,scale)`. Update parquet-go's string format to match.

* Fix panic when reading file with no row groups (segmentio#408)

* Fix bug that occurs when ReadAt returns EOF (segmentio#416)

* Use DefaultMaxRowsPerRowGroup when numRows is invalid (segmentio#404)

Co-authored-by: gdanichev <GDanichev@artenecy.ru>

Co-authored-by: Larry Marburger <larry.marburger@segment.com>
Co-authored-by: yonesko <yonesko@gmail.com>
Co-authored-by: gdanichev <GDanichev@artenecy.ru>
brancz added a commit to polarsignals/frostdb that referenced this pull request Dec 5, 2022
String formatting of decimal types recently changed: segmentio/parquet-go#407
brancz added a commit to polarsignals/frostdb that referenced this pull request Dec 5, 2022
* dynparquet: Use parquet-go's copy rows

* go.mod: Update parquet-go

To include segmentio/parquet-go#420

* pqarrow/convert: Adapt test

String formatting of decimal types recently changed: segmentio/parquet-go#407
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants