-
Notifications
You must be signed in to change notification settings - Fork 57
Illegal Parquet type: INT64 (TIMESTAMP(NANOS,true)) #463
Comments
Can you provide a little bit more information about what you're doing to produce this error? For example, "I generated Parquet files using the Go library and attempting to read them with Spark produces an error." Is that an accurate summary? Can you provide information about which version of Spark or Parquet you are using in the other library? |
I am using spark-3.3.1-bin-hadoop3-scala2.13 on windows to read the file. The error shows up on many version of spark even on BSD and Linux platforms. I used the parquet-go library to create the parquet file. When using the version below .. there is no problem. The problem shows up when I switched to: I use the following converters for go time.Time. err := copier.CopyWithOption(&ip, i, copier.Option{
IgnoreEmpty: false,
DeepCopy: true,
Converters: []copier.TypeConverter{
{
SrcType: time.Time{},
DstType: int64(0),
Fn: func(src interface{}) (interface{}, error) {
return src.(time.Time).Unix(), nil
},
},
{
SrcType: FlagsHistMap{},
DstType: FlagsHistP{},
Fn: func(src interface{}) (interface{}, error) {
opts := copier.Option{
IgnoreEmpty: false,
DeepCopy: true,
Converters: []copier.TypeConverter{
{
SrcType: time.Time{},
DstType: int64(0),
Fn: func(src interface{}) (interface{}, error) {
return src.(time.Time).Unix(), nil
},
},
},
} |
That's helpful, thanks! |
Sorry - can you describe how the converters come into this? You are using github.com/jinzhu/copier to copy from one struct to another and then passing the second struct to parquet-go? Could you share a bit of the Go struct you are passing to Parquet? |
When I upgraded the version of this library in go.mod as follows, I get this error. If I switched back to the commented older version then all is fine. Just curious as to what happened here.
The text was updated successfully, but these errors were encountered: