Skip to content

Commit d6a7a27

Browse files
committed
[Spotless] Applying Google Code Format for core/src/main files #2 (opensearch-project#1931)
* Applied spotless changes to `core/stc/main/.../expression` and more. Signed-off-by: Mitchell Gale <[email protected]> * Applied all spotless for PR 2 for GJF Signed-off-by: Mitchell Gale <[email protected]> * Apply spotless to fix custom fixes. Signed-off-by: Mitchell Gale <[email protected]> * Remove unused <br> Signed-off-by: Mitchell Gale <[email protected]> * ignoring core checkstyle failures. Signed-off-by: Mitchell Gale <[email protected]> * addressed PR comments. Signed-off-by: Mitchell Gale <[email protected]> * Addressing PR 2 comments. Signed-off-by: Mitchell Gale <[email protected]> * Ran spotless apply Signed-off-by: Mitchell Gale <[email protected]> --------- Signed-off-by: Mitchell Gale <[email protected]> Signed-off-by: Mitchell Gale <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
1 parent 6d02ddd commit d6a7a27

File tree

96 files changed

+3533
-2887
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+3533
-2887
lines changed

build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ repositories {
8484
spotless {
8585
java {
8686
target fileTree('.') {
87-
include 'core/src/main/java/org/opensearch/sql/analysis/**/*.java',
87+
include 'core/src/main/java/org/opensearch/sql/monitor/**/*.java',
88+
'core/src/main/java/org/opensearch/sql/expression/**/*.java',
89+
'core/src/main/java/org/opensearch/sql/executor/**/*.java',
90+
'core/src/main/java/org/opensearch/sql/exception/**/*.java',
91+
'core/src/main/java/org/opensearch/sql/analysis/**/*.java',
8892
'core/src/test/java/org/opensearch/sql/data/**/*.java',
8993
'core/src/test/java/org/opensearch/sql/datasource/**/*.java',
9094
'core/src/test/java/org/opensearch/sql/ast/**/*.java'

core/src/main/java/org/opensearch/sql/exception/ExpressionEvaluationException.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
76
package org.opensearch.sql.exception;
87

9-
/**
10-
* Exception for Expression Evaluation.
11-
*/
8+
/** Exception for Expression Evaluation. */
129
public class ExpressionEvaluationException extends QueryEngineException {
1310
public ExpressionEvaluationException(String message) {
1411
super(message);

core/src/main/java/org/opensearch/sql/exception/NoCursorException.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
package org.opensearch.sql.exception;
77

88
/**
9-
* This should be thrown on serialization of a PhysicalPlan tree if paging is finished.
10-
* Processing of such exception should outcome of responding no cursor to the user.
9+
* This should be thrown on serialization of a PhysicalPlan tree if paging is finished. Processing
10+
* of such exception should outcome of responding no cursor to the user.
1111
*/
12-
public class NoCursorException extends RuntimeException {
13-
}
12+
public class NoCursorException extends RuntimeException {}

core/src/main/java/org/opensearch/sql/exception/QueryEngineException.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
76
package org.opensearch.sql.exception;
87

9-
/**
10-
* Query analysis abstract exception.
11-
*/
8+
/** Query analysis abstract exception. */
129
public class QueryEngineException extends RuntimeException {
1310

1411
public QueryEngineException(String message) {

core/src/main/java/org/opensearch/sql/exception/SemanticCheckException.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
76
package org.opensearch.sql.exception;
87

9-
/**
10-
* Semantic Check Exception.
11-
*/
8+
/** Semantic Check Exception. */
129
public class SemanticCheckException extends QueryEngineException {
1310
public SemanticCheckException(String message) {
1411
super(message);

core/src/main/java/org/opensearch/sql/exception/UnsupportedCursorRequestException.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@
55

66
package org.opensearch.sql.exception;
77

8-
/**
9-
* This should be thrown by V2 engine to support fallback scenario.
10-
*/
11-
public class UnsupportedCursorRequestException extends RuntimeException {
12-
}
8+
/** This should be thrown by V2 engine to support fallback scenario. */
9+
public class UnsupportedCursorRequestException extends RuntimeException {}

core/src/main/java/org/opensearch/sql/executor/ExecutionContext.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@
99
import lombok.Getter;
1010
import org.opensearch.sql.storage.split.Split;
1111

12-
/**
13-
* Execution context hold planning related information.
14-
*/
12+
/** Execution context hold planning related information. */
1513
public class ExecutionContext {
16-
@Getter
17-
private final Optional<Split> split;
14+
@Getter private final Optional<Split> split;
1815

1916
public ExecutionContext(Split split) {
2017
this.split = Optional.of(split);

core/src/main/java/org/opensearch/sql/executor/ExecutionEngine.java

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
76
package org.opensearch.sql.executor;
87

98
import java.util.List;
@@ -17,39 +16,33 @@
1716
import org.opensearch.sql.executor.pagination.Cursor;
1817
import org.opensearch.sql.planner.physical.PhysicalPlan;
1918

20-
/**
21-
* Execution engine that encapsulates execution details.
22-
*/
19+
/** Execution engine that encapsulates execution details. */
2320
public interface ExecutionEngine {
2421

2522
/**
26-
* Execute physical plan and call back response listener.
23+
* Execute physical plan and call back response listener.<br>
2724
* Todo. deprecated this interface after finalize {@link ExecutionContext}.
2825
*
29-
* @param plan executable physical plan
26+
* @param plan executable physical plan
3027
* @param listener response listener
3128
*/
3229
void execute(PhysicalPlan plan, ResponseListener<QueryResponse> listener);
3330

34-
/**
35-
* Execute physical plan with {@link ExecutionContext} and call back response listener.
36-
*/
37-
void execute(PhysicalPlan plan, ExecutionContext context,
38-
ResponseListener<QueryResponse> listener);
31+
/** Execute physical plan with {@link ExecutionContext} and call back response listener. */
32+
void execute(
33+
PhysicalPlan plan, ExecutionContext context, ResponseListener<QueryResponse> listener);
3934

4035
/**
41-
* Explain physical plan and call back response listener. The reason why this has to
42-
* be part of execution engine interface is that the physical plan probably needs to
43-
* be executed to get more info for profiling, such as actual execution time, rows fetched etc.
36+
* Explain physical plan and call back response listener. The reason why this has to be part of
37+
* execution engine interface is that the physical plan probably needs to be executed to get more
38+
* info for profiling, such as actual execution time, rows fetched etc.
4439
*
45-
* @param plan physical plan to explain
40+
* @param plan physical plan to explain
4641
* @param listener response listener
4742
*/
4843
void explain(PhysicalPlan plan, ResponseListener<ExplainResponse> listener);
4944

50-
/**
51-
* Data class that encapsulates ExprValue.
52-
*/
45+
/** Data class that encapsulates ExprValue. */
5346
@Data
5447
class QueryResponse {
5548
private final Schema schema;
@@ -70,8 +63,8 @@ public static class Column {
7063
}
7164

7265
/**
73-
* Data class that encapsulates explain result. This can help decouple core engine
74-
* from concrete explain response format.
66+
* Data class that encapsulates explain result. This can help decouple core engine from concrete
67+
* explain response format.
7568
*/
7669
@Data
7770
class ExplainResponse {
@@ -86,5 +79,4 @@ class ExplainResponseNode {
8679
private Map<String, Object> description;
8780
private List<ExplainResponseNode> children;
8881
}
89-
9082
}

0 commit comments

Comments
 (0)