You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by GitBox <gi...@apache.org> on 2022/03/09 13:14:00 UTC
[GitHub] [orc] PengleiShi opened a new issue #1061: RecordReaderImpl.getValueRange() may cause incorrect results
PengleiShi opened a new issue #1061:
URL: https://github.com/apache/orc/issues/1061
orc version: 1.6.11, sql: `select xxx from xxx where str is not null`
Recently i found some orc files wrote by presto didn't have complete statistics in files meta(maybe a presto bug), this causes `OrcProto.ColumnStatistics` can't be deserialized to any specific `ColumnStatisticsImpl` such as `StringStatisticsImpl`, then `RecordReaderImpl.getValueRange()` returns `ValueRange` with null `lower` and `RecordReaderImpl.pickRowGroups()` skips this row group, which should not be skipped. In normal conditions except above, everything is ok. And i found orc-1.5.x can handle above case according to `RecordReaderImpl.UNKNOWN_VALUE`, which is removed in 1.6.x. Maybe we could add it back for better compatibility. @dongjoon-hyun @omalley
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [orc] PengleiShi edited a comment on issue #1061: RecordReaderImpl.getValueRange() may cause incorrect results
Posted by GitBox <gi...@apache.org>.
PengleiShi edited a comment on issue #1061:
URL: https://github.com/apache/orc/issues/1061#issuecomment-1063614386
> AFAIK, this doesn't happen between Apache ORC writer and reader, right? @PengleiShi
Yes, it doesn't. In the case i mentioned, the files were wrote by trino(which has own orc writer) and read by spark(which depends on Apache ORC reader).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [orc] PengleiShi commented on issue #1061: RecordReaderImpl.getValueRange() may cause incorrect results
Posted by GitBox <gi...@apache.org>.
PengleiShi commented on issue #1061:
URL: https://github.com/apache/orc/issues/1061#issuecomment-1064735958
> @dongjoon-hyun. Trino won't write string column statistics if string value is bigger than 64 bytes  Here is a orc file wrote by trino and contains only one row  Test with spark3.2
>
> ```
> select * from xxx;
> select * from xxx where name is not null;
> ```
>
> [20220310_100444_03858_nbvwj_53625cc9-7183-4beb-be48-9d059d8fa560.zip](https://github.com/apache/orc/files/8223249/20220310_100444_03858_nbvwj_53625cc9-7183-4beb-be48-9d059d8fa560.zip)
@pgaref here i have uploaded a problematic file for test. Its meta shows below

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [orc] PengleiShi commented on issue #1061: RecordReaderImpl.getValueRange() may cause incorrect results
Posted by GitBox <gi...@apache.org>.
PengleiShi commented on issue #1061:
URL: https://github.com/apache/orc/issues/1061#issuecomment-1063990592
@dongjoon-hyun. Trino won't write string column statistics if string value is bigger than 64 bytes

Here is a orc file wrote by trino and contains only one row

Test with spark3.2
```
select * from xxx;
select * from xxx where name is not null;
```
[20220310_100444_03858_nbvwj_53625cc9-7183-4beb-be48-9d059d8fa560.zip](https://github.com/apache/orc/files/8223249/20220310_100444_03858_nbvwj_53625cc9-7183-4beb-be48-9d059d8fa560.zip)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [orc] dongjoon-hyun commented on issue #1061: RecordReaderImpl.getValueRange() may cause incorrect results
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on issue #1061:
URL: https://github.com/apache/orc/issues/1061#issuecomment-1063536975
AFAIK, this doesn't happen between Apache ORC writer and reader, right? @PengleiShi
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [orc] dongjoon-hyun commented on issue #1061: RecordReaderImpl.getValueRange() may cause incorrect results
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on issue #1061:
URL: https://github.com/apache/orc/issues/1061#issuecomment-1063518946
Thank you for reporting, @PengleiShi .
1. Ya, I've heard that there exists ORC writers that doesn't generate statistics properly.
2. Could you provide some sample ORC files?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [orc] PengleiShi commented on issue #1061: RecordReaderImpl.getValueRange() may cause incorrect results
Posted by GitBox <gi...@apache.org>.
PengleiShi commented on issue #1061:
URL: https://github.com/apache/orc/issues/1061#issuecomment-1063614386
> AFAIK, this doesn't happen between Apache ORC writer and reader, right? @PengleiShi
Yes, it doesn't. In the case i mentioned, the files were wrote by trino(which has own orc writer) and read by spark(which depends on Apache ORC reader).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [orc] pgaref commented on issue #1061: RecordReaderImpl.getValueRange() may cause incorrect results
Posted by GitBox <gi...@apache.org>.
pgaref commented on issue #1061:
URL: https://github.com/apache/orc/issues/1061#issuecomment-1064369217
@PengleiShi do you mind sharing the stats of the problematic case above?
We currently trim StringStatistics to 1024 chars in the default writer https://issues.apache.org/jira/browse/ORC-203
I believe Presto should follow a similar logic.
In addition, on the Reader path we probably want to avoid skipping RowGroups when facing problematic/null ValueRange stats.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org