Skip to content

Commit

Permalink
Access static members in static fashion
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo authored and tdcmeehan committed May 29, 2024
1 parent 88bc1c3 commit 0a0ac8f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ public Function<RowExpression, RowExpression> expressionOrNullVariables(final Pr
nullConjuncts.add(specialForm(IS_NULL, BOOLEAN, variable));
}

resultDisjunct.add(logicalRowExpressions.and(nullConjuncts.build()));
resultDisjunct.add(LogicalRowExpressions.and(nullConjuncts.build()));
}

return logicalRowExpressions.or(resultDisjunct.build());
return LogicalRowExpressions.or(resultDisjunct.build());
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public Optional<DecorrelationResult> visitFilter(FilterNode node, Void context)
}

RowExpression predicate = node.getPredicate();
Map<Boolean, List<RowExpression>> predicates = logicalRowExpressions.extractConjuncts(predicate).stream()
Map<Boolean, List<RowExpression>> predicates = LogicalRowExpressions.extractConjuncts(predicate).stream()
.collect(Collectors.partitioningBy(PlanNodeDecorrelator.DecorrelatingVisitor.this::isCorrelated));
List<RowExpression> correlatedPredicates = ImmutableList.copyOf(predicates.get(true));
List<RowExpression> uncorrelatedPredicates = ImmutableList.copyOf(predicates.get(false));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
public class JsonRenderer
implements Renderer<String>
{
private static JsonCodec<JsonRenderedNode> codec = JsonCodec.jsonCodec(JsonRenderedNode.class);
private static JsonCodec<Map<PlanFragmentId, JsonPlanFragment>> planMapCodec = JsonCodec.mapJsonCodec(PlanFragmentId.class, JsonPlanFragment.class);
private final JsonCodec<Map<PlanFragmentId, JsonPlanFragment>> planMapCodec;
private final JsonCodec<JsonRenderedNode> codec;

public JsonRenderer(FunctionAndTypeManager functionAndTypeManager)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ public void testPinotBrokerRequest()
new MockPinotClusterInfoFetcher(pinotConfig),
objectMapper,
PinotBrokerAuthenticationProvider.create(PinotEmptyAuthenticationProvider.instance()));
assertEquals(pageSource.getRequestPayload(generatedPinotQuery), "{\"sql\":\"SELECT * FROM myTable\"}");
assertEquals(PinotBrokerPageSource.getRequestPayload(generatedPinotQuery), "{\"sql\":\"SELECT * FROM myTable\"}");

generatedPinotQuery = new PinotQueryGenerator.GeneratedPinotQuery(
pinotTable.getTableName(),
"SELECT * FROM myTable WHERE jsonStr = '\"{\"abc\" : \"def\"}\"'",
ImmutableList.of(),
false,
false);
assertEquals(pageSource.getRequestPayload(generatedPinotQuery), "{\"sql\":\"SELECT * FROM myTable WHERE jsonStr = '\\\"{\\\"abc\\\" : \\\"def\\\"}\\\"'\"}");
assertEquals(PinotBrokerPageSource.getRequestPayload(generatedPinotQuery), "{\"sql\":\"SELECT * FROM myTable WHERE jsonStr = '\\\"{\\\"abc\\\" : \\\"def\\\"}\\\"'\"}");
}

@Test(dataProvider = "sqlResponses")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public void testTableStatisticsSerialization()

Entry<ColumnHandle, ColumnStatistics> entry = tableStatistics.getColumnStatistics().entrySet().iterator().next();

TableStatistics expectedTableStatistics = tableStatistics.builder()
TableStatistics expectedTableStatistics = TableStatistics.builder()
.setRowCount(tableStatistics.getRowCount())
.setColumnStatistics(entry.getKey(), entry.getValue())
.build();
Expand Down

0 comments on commit 0a0ac8f

Please sign in to comment.