Skip to content

Commit

Permalink
Remove redundant lambda braces
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Jan 11, 2024
1 parent ecb0c78 commit 082c8a6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void testCacheInvalidatedOnBadDisk()
// Set second spiller path to read-only after initialization to emulate a disk failing during runtime
setPosixFilePermissions(spillPath2.toPath(), ImmutableSet.of(PosixFilePermission.OWNER_READ));

assertThatThrownBy(() -> { getUnchecked(singleStreamSpiller2.spill(page)); })
assertThatThrownBy(() -> getUnchecked(singleStreamSpiller2.spill(page)))
.isInstanceOf(com.google.common.util.concurrent.UncheckedExecutionException.class)
.hasMessageContaining("Failed to spill pages");
spillers.add(singleStreamSpiller2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public abstract class BasePushdownPlanTest
{
protected Optional<TableHandle> getTableHandle(Session session, QualifiedObjectName objectName)
{
return getQueryRunner().inTransaction(session, transactionSession -> { return getQueryRunner().getMetadata().getTableHandle(transactionSession, objectName); });
return getQueryRunner().inTransaction(session, transactionSession -> getQueryRunner().getMetadata().getTableHandle(transactionSession, objectName));
}

protected Map<String, ColumnHandle> getColumnHandles(Session session, QualifiedObjectName tableName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public Map<String, Object> getTableProperties(ConnectorSession session, JdbcTabl
@Test
public void testGetTablePropertiesIsNotCalledForSelect()
{
onGetTableProperties = () -> { fail("Unexpected call of: getTableProperties"); };
onGetTableProperties = () -> fail("Unexpected call of: getTableProperties");
assertUpdate("CREATE TABLE copy_of_nation AS SELECT * FROM nation", 25);
assertQuerySucceeds("SELECT * FROM copy_of_nation");
assertQuerySucceeds("SELECT nationkey FROM copy_of_nation");
Expand All @@ -66,7 +66,7 @@ public void testGetTablePropertiesIsNotCalledForSelect()
public void testGetTablePropertiesIsCalled()
{
AtomicInteger counter = new AtomicInteger();
onGetTableProperties = () -> { counter.incrementAndGet(); };
onGetTableProperties = () -> counter.incrementAndGet();
assertQuerySucceeds("SHOW CREATE TABLE nation");
assertThat(counter.get()).isOne();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,8 @@ public void testMetrics()
assertThat(datafile.getRecordCount()).isEqualTo(1);
assertThat(datafile.getValueCounts().size()).isEqualTo(1);
assertThat(datafile.getNullValueCounts().size()).isEqualTo(1);
datafile.getUpperBounds().forEach((k, v) -> {
assertThat(v.length()).isEqualTo(10); });
datafile.getLowerBounds().forEach((k, v) -> {
assertThat(v.length()).isEqualTo(10); });
datafile.getUpperBounds().forEach((k, v) -> assertThat(v.length()).isEqualTo(10));
datafile.getLowerBounds().forEach((k, v) -> assertThat(v.length()).isEqualTo(10));

// keep both c1 and c2 metrics
assertUpdate("create table c_metrics (c1 varchar, c2 varchar)");
Expand Down

0 comments on commit 082c8a6

Please sign in to comment.