AngersZhuuuu commented on a change in pull request #34308:
URL: https://github.com/apache/spark/pull/34308#discussion_r732368584
##########
File path:
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/ParquetDictionary.java
##########
@@ -23,54 +23,85 @@
public final class ParquetDictionary implements Dictionary {
private org.apache.parquet.column.Dictionary dictionary;
+ private String file;
private boolean needTransform = false;
- public ParquetDictionary(org.apache.parquet.column.Dictionary dictionary,
boolean needTransform) {
+ public ParquetDictionary(
+ org.apache.parquet.column.Dictionary dictionary,
+ String file,
+ boolean needTransform) {
this.dictionary = dictionary;
+ this.file = file;
this.needTransform = needTransform;
}
@Override
public int decodeToInt(int id) {
- if (needTransform) {
- return (int) dictionary.decodeToLong(id);
- } else {
- return dictionary.decodeToInt(id);
+ try {
+ if (needTransform) {
+ return (int) dictionary.decodeToLong(id);
+ } else {
+ return dictionary.decodeToInt(id);
+ }
+ } catch (UnsupportedOperationException e) {
+ throw new UnsupportedOperationException("Decoding to Int failed when
reading file " +
Review comment:
Yeah, how about current
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]