Skip to content
Merged
Show file tree
Hide file tree
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 @@ -46,6 +46,13 @@ public enum Methods
GET_TABLE,
GET_TABLE_WITH_PARAMETER,
GET_TABLE_STATISTICS,
UPDATE_TABLE_STATISTICS,
ADD_PARTITIONS,
GET_PARTITION_NAMES_BY_FILTER,
GET_PARTITIONS_BY_NAMES,
GET_PARTITION,
GET_PARTITION_STATISTICS,
UPDATE_PARTITION_STATISTICS,
REPLACE_TABLE,
DROP_TABLE,
}
Expand Down Expand Up @@ -78,7 +85,8 @@ public Optional<Table> getTable(String databaseName, String tableName)
@Override
public Set<HiveColumnStatisticType> getSupportedColumnStatistics(Type type)
{
throw new UnsupportedOperationException();
// No need to count that, since it's a pure local operation.
return delegate.getSupportedColumnStatistics(type);
}

@Override
Expand Down Expand Up @@ -199,7 +207,8 @@ public void dropColumn(String databaseName, String tableName, String columnName)
@Override
public Optional<Partition> getPartition(Table table, List<String> partitionValues)
{
throw new UnsupportedOperationException();
methodInvocations.add(Methods.GET_PARTITION);
return delegate.getPartition(table, partitionValues);
}

@Override
Expand All @@ -208,19 +217,22 @@ public Optional<List<String>> getPartitionNamesByFilter(String databaseName,
List<String> columnNames,
TupleDomain<String> partitionKeysFilter)
{
throw new UnsupportedOperationException();
methodInvocations.add(Methods.GET_PARTITION_NAMES_BY_FILTER);
return delegate.getPartitionNamesByFilter(databaseName, tableName, columnNames, partitionKeysFilter);
}

@Override
public Map<String, Optional<Partition>> getPartitionsByNames(Table table, List<String> partitionNames)
{
throw new UnsupportedOperationException();
methodInvocations.add(Methods.GET_PARTITIONS_BY_NAMES);
return delegate.getPartitionsByNames(table, partitionNames);
}

@Override
public void addPartitions(String databaseName, String tableName, List<PartitionWithStatistics> partitions)
{
throw new UnsupportedOperationException();
methodInvocations.add(Methods.ADD_PARTITIONS);
delegate.addPartitions(databaseName, tableName, partitions);
}

@Override
Expand Down Expand Up @@ -305,7 +317,8 @@ public PartitionStatistics getTableStatistics(Table table)
@Override
public Map<String, PartitionStatistics> getPartitionStatistics(Table table, List<Partition> partitions)
{
throw new UnsupportedOperationException();
methodInvocations.add(Methods.GET_PARTITION_STATISTICS);
return delegate.getPartitionStatistics(table, partitions);
}

@Override
Expand All @@ -314,13 +327,15 @@ public void updateTableStatistics(String databaseName,
AcidTransaction transaction,
Function<PartitionStatistics, PartitionStatistics> update)
{
throw new UnsupportedOperationException();
methodInvocations.add(Methods.UPDATE_TABLE_STATISTICS);
delegate.updateTableStatistics(databaseName, tableName, transaction, update);
}

@Override
public void updatePartitionStatistics(Table table, Map<String, Function<PartitionStatistics, PartitionStatistics>> updates)
{
throw new UnsupportedOperationException();
methodInvocations.add(Methods.UPDATE_PARTITION_STATISTICS);
delegate.updatePartitionStatistics(table, updates);
}

@Override
Expand Down
Loading