samarthjain commented on a change in pull request #2749:
URL: https://github.com/apache/iceberg/pull/2749#discussion_r660294135



##########
File path: 
arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedPageIterator.java
##########
@@ -512,6 +512,9 @@ protected void initDataReader(Encoding dataEncoding, 
ByteBufferInputStream in, i
         throw new ParquetDecodingException("could not read page in col " + 
desc, e);
       }
     } else {
+      if (dataEncoding != Encoding.PLAIN) {
+        throw new UnsupportedOperationException("Unsupported encoding: " + 
dataEncoding);

Review comment:
       I like the idea of specifying the column name and being more descriptive 
about why we are failing. However, there are different ways to disable 
vectorization using table properties, spark session properties etc. For now, I 
am going with something like this:
   ```
   if (dataEncoding != Encoding.PLAIN) {
           throw new UnsupportedOperationException("Vectorized reads are not 
supported for column " + desc + " with " +
               "encoding " + dataEncoding + ". Disable vectorized reads  to 
read this table/file");
         }
   ``` 




-- 
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]

Reply via email to