Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up raw types (March 2022 edition) #11668

Merged
merged 2 commits into from
Mar 28, 2022
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 @@ -393,7 +393,7 @@ private void updatePartitionStatisticsBatch(Table table, Map<String, Function<Pa
.withDatabaseName(table.getDatabaseName())
.withTableName(table.getTableName())
.withEntries(partitionUpdateRequestsPartition),
new StatsRecordingAsyncHandler(stats.getBatchUpdatePartition(), startTimestamp)));
new StatsRecordingAsyncHandler<>(stats.getBatchUpdatePartition(), startTimestamp)));
});

try {
Expand Down Expand Up @@ -885,7 +885,7 @@ private List<Partition> batchGetPartition(Table table, List<String> partitionNam
.withDatabaseName(table.getDatabaseName())
.withTableName(table.getTableName())
.withPartitionsToGet(partitions),
new StatsRecordingAsyncHandler(stats.getGetPartitions(), startTimestamp)));
new StatsRecordingAsyncHandler<>(stats.getGetPartitions(), startTimestamp)));
}
pendingPartitions.clear();

Expand Down Expand Up @@ -933,7 +933,7 @@ public void addPartitions(String databaseName, String tableName, List<PartitionW
.withDatabaseName(databaseName)
.withTableName(tableName)
.withPartitionInputList(partitionInputs),
new StatsRecordingAsyncHandler(stats.getBatchCreatePartition(), startTime)));
new StatsRecordingAsyncHandler<>(stats.getBatchCreatePartition(), startTime)));
}

for (Future<BatchCreatePartitionResult> future : futures) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,12 @@ private static Map<String, PinotColumnNameAndTrinoType> getAggregateTypes(Schema
// Extracted from org.apache.pinot.core.query.reduce.AggregationDataTableReducer
private static DataSchema getPreAggregationDataSchema(QueryContext queryContext)
{
AggregationFunction[] aggregationFunctions = queryContext.getAggregationFunctions();
AggregationFunction<?, ?>[] aggregationFunctions = queryContext.getAggregationFunctions();
int numAggregationFunctions = aggregationFunctions.length;
String[] columnNames = new String[numAggregationFunctions];
DataSchema.ColumnDataType[] columnDataTypes = new DataSchema.ColumnDataType[numAggregationFunctions];
for (int i = 0; i < numAggregationFunctions; i++) {
AggregationFunction aggregationFunction = aggregationFunctions[i];
AggregationFunction<?, ?> aggregationFunction = aggregationFunctions[i];
columnNames[i] = aggregationFunction.getResultColumnName();
columnDataTypes[i] = aggregationFunction.getFinalResultColumnType();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,22 +651,22 @@ else if (isExplain) {
queryAssertion.accept(actual.getQueryId());
}

public FailureRecoveryAssert failsAlways(Consumer<AbstractThrowableAssert> failureAssertion)
public FailureRecoveryAssert failsAlways(Consumer<AbstractThrowableAssert<?, ? extends Throwable>> failureAssertion)
{
failsWithoutRetries(failureAssertion);
failsDespiteRetries(failureAssertion);
return this;
}

public FailureRecoveryAssert failsWithoutRetries(Consumer<AbstractThrowableAssert> failureAssertion)
public FailureRecoveryAssert failsWithoutRetries(Consumer<AbstractThrowableAssert<?, ? extends Throwable>> failureAssertion)
{
verifyFailureTypeAndStageSelector();
OptionalInt failureStageId = getFailureStageId(() -> executeExpected().getQueryResult());
failureAssertion.accept(assertThatThrownBy(() -> executeActualNoRetries(failureStageId)));
return this;
}

public FailureRecoveryAssert failsDespiteRetries(Consumer<AbstractThrowableAssert> failureAssertion)
public FailureRecoveryAssert failsDespiteRetries(Consumer<AbstractThrowableAssert<?, ? extends Throwable>> failureAssertion)
{
verifyFailureTypeAndStageSelector();
OptionalInt failureStageId = getFailureStageId(() -> executeExpected().getQueryResult());
Expand Down