Skip to content

Commit

Permalink
Quick fixes again
Browse files Browse the repository at this point in the history
Signed-off-by: currantw <[email protected]>
  • Loading branch information
currantw committed Dec 2, 2024
1 parent c1b23ef commit 6382476
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@
import org.opensearch.sql.planner.SerializablePlan;

/** Project the fields specified in {@link ProjectOperator#projectList} from input. */
@Getter
@ToString
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
public class ProjectOperator extends PhysicalPlan implements SerializablePlan {
@Getter private PhysicalPlan input;
@Getter private List<NamedExpression> projectList;
@Getter private List<NamedExpression> namedParseExpressions;
private PhysicalPlan input;
private List<NamedExpression> projectList;
private List<NamedExpression> namedParseExpressions;

@Override
public <R, C> R accept(PhysicalPlanNodeVisitor<R, C> visitor, C context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void castStringToInt() {
@Test
void castStringToIntException() {
FunctionExpression expression = DSL.castInt(DSL.literal("invalid"));
assertThrows(RuntimeException.class, () -> expression.valueOf());
assertThrows(RuntimeException.class, expression::valueOf);
}

@Test
Expand Down Expand Up @@ -180,7 +180,7 @@ void castStringToLong() {
@Test
void castStringToLongException() {
FunctionExpression expression = DSL.castLong(DSL.literal("invalid"));
assertThrows(RuntimeException.class, () -> expression.valueOf());
assertThrows(RuntimeException.class, expression::valueOf);
}

@Test
Expand Down Expand Up @@ -212,7 +212,7 @@ void castStringToFloat() {
@Test
void castStringToFloatException() {
FunctionExpression expression = DSL.castFloat(DSL.literal("invalid"));
assertThrows(RuntimeException.class, () -> expression.valueOf());
assertThrows(RuntimeException.class, expression::valueOf);
}

@Test
Expand Down Expand Up @@ -244,7 +244,7 @@ void castStringToDouble() {
@Test
void castStringToDoubleException() {
FunctionExpression expression = DSL.castDouble(DSL.literal("invalid"));
assertThrows(RuntimeException.class, () -> expression.valueOf());
assertThrows(RuntimeException.class, expression::valueOf);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public Map<String, IndexMapping> getIndexMappings(String... indexExpression) {
throw e;
} catch (Exception e) {
throw new IllegalStateException(
"Failed to read mapping for index pattern [" + indexExpression + "]", e);
"Failed to read mapping for index pattern [" + Arrays.toString(indexExpression) + "]", e);
}
}

Expand Down Expand Up @@ -123,7 +123,7 @@ public Map<String, Integer> getIndexMaxResultWindows(String... indexExpression)
return result.build();
} catch (Exception e) {
throw new IllegalStateException(
"Failed to read setting for index pattern [" + indexExpression + "]", e);
"Failed to read setting for index pattern [" + Arrays.toString(indexExpression) + "]", e);
}
}

Expand Down Expand Up @@ -215,7 +215,7 @@ public void deletePit(DeletePitRequest deletePitRequest) {
ActionFuture<DeletePitResponse> execute =
this.client.execute(DeletePitAction.INSTANCE, deletePitRequest);
try {
DeletePitResponse deletePitResponse = execute.get();
execute.get();
} catch (InterruptedException | ExecutionException e) {
throw new RuntimeException("Error occurred while deleting PIT.", e);
}
Expand Down

0 comments on commit 6382476

Please sign in to comment.