Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,6 @@ public Optional<? extends ConnectorPageSource> createPageSource(
HiveFileContext hiveFileContext,
Optional<EncryptionInformation> encryptionInformation)
{
if (!columns.isEmpty() && columns.stream().allMatch(hiveColumnHandle -> hiveColumnHandle.getColumnType() == AGGREGATED)) {
throw new UnsupportedOperationException("Partial aggregation pushdown only supported for ORC/Parquet files. " +
"Table " + tableName.toString() + " has file (" + fileSplit.getPath() + ") of format " + storage.getStorageFormat().getOutputFormat() +
". Set session property hive.pushdown_partial_aggregations_into_scan=false and execute query again");
}

RcFileEncoding rcFileEncoding;
if (LazyBinaryColumnarSerDe.class.getName().equals(storage.getStorageFormat().getSerDe())) {
rcFileEncoding = new BinaryRcFileEncoding();
Expand All @@ -130,6 +124,12 @@ else if (ColumnarSerDe.class.getName().equals(storage.getStorageFormat().getSerD
throw new PrestoException(HIVE_BAD_DATA, "RCFile is empty: " + fileSplit.getPath());
}

if (!columns.isEmpty() && columns.stream().allMatch(hiveColumnHandle -> hiveColumnHandle.getColumnType() == AGGREGATED)) {
throw new UnsupportedOperationException("Partial aggregation pushdown only supported for ORC/Parquet files. " +
"Table " + tableName.toString() + " has file (" + fileSplit.getPath() + ") of format " + storage.getStorageFormat().getOutputFormat() +
". Set session property hive.pushdown_partial_aggregations_into_scan=false and execute query again");
}

FSDataInputStream inputStream;
Path path = new Path(fileSplit.getPath());
try {
Expand Down