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

End all files with new line #293

Closed
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
10 changes: 3 additions & 7 deletions DEVELOPER_GUIDE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ Note that missing license header will be detected by Gradle license plugin and f
Making Code Changes
===================

Project Structure
-----------------
Project Strucure
----------------

The plugin codebase is in standard layout of Gradle project::

Expand Down Expand Up @@ -213,7 +213,7 @@ Most of the time you just need to run ./gradlew build which will make sure you p
* - ./gradlew generateGrammarSource
- (Re-)Generate ANTLR parser from grammar file.
* - ./gradlew compileJava
- Compile all Java source files.
- Compile all Java source files.
* - ./gradlew checkstyle
- Run all checks according to Checkstyle configuration.
* - ./gradlew test
Expand All @@ -226,10 +226,6 @@ Most of the time you just need to run ./gradlew build which will make sure you p
- Build plugin by run all tasks above (this takes time).
* - ./gradlew pitest
- Run PiTest mutation testing (see more info in `#1204 <https://github.com/opensearch-project/sql/pull/1204>`_)
* - ./gradlew spotlessCheck
- Runs Spotless to check for code style.
* - ./gradlew spotlessApply
- Automatically apply spotless code style changes.

For integration test, you can use ``-Dtests.class`` “UT full path” to run a task individually. For example ``./gradlew :integ-test:integTest -Dtests.class="*QueryIT"``.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,4 @@ private static DefaultFunctionResolver subtract() {
private static DefaultFunctionResolver subtractFunction() {
return subtractBase(BuiltinFunctionName.SUBTRACTFUNCTION.getName());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ public void logicalRelationWithDataSourceHasNoInput() {
assertEquals(0, relation.getChild().size());
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ public AssertionHelper shouldGenerateWatermark(long expected) {
return this;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ void test() {
assertEquals(2000, window.getEndTime());
assertEquals(1999, window.maxTimestamp());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ void testConstructWithIllegalArguments() {
() -> new SlidingWindowAssigner(1000, 0));
assertEquals("Slide size [0] must be positive number", error2.getMessage());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ void testConstructWithIllegalWindowSize() {
() -> new TumblingWindowAssigner(-1));
assertEquals("Window size [-1] must be positive number", error.getMessage());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ void shouldFireWindowBelowWatermark() {
assertEquals(TriggerResult.FIRE, trigger.trigger(new Window(500, 800)));
assertEquals(TriggerResult.FIRE, trigger.trigger(new Window(500, 1000)));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ public Boolean visitTableWrite(TableWriteOperator node, Object context) {
void testGetChild() {
assertEquals(Collections.singletonList(child), tableWrite.getChild());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ public interface Encryptor {
*/
String decrypt(String encryptedText);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ public String decrypt(String encryptedText) {
return new String(decryptedResult.getResult());
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ public ActionRequestValidationException validate() {
return null;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public CreateDataSourceActionResponse(StreamInput in) throws IOException {
public void writeTo(StreamOutput streamOutput) throws IOException {
streamOutput.writeString(result);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ public ActionRequestValidationException validate() {
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public void writeTo(StreamOutput streamOutput) throws IOException {
streamOutput.writeString(result);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ public ActionRequestValidationException validate() {
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public void writeTo(StreamOutput streamOutput) throws IOException {
streamOutput.writeString(result);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ public ActionRequestValidationException validate() {
return null;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public UpdateDataSourceActionResponse(StreamInput in) throws IOException {
public void writeTo(StreamOutput streamOutput) throws IOException {
streamOutput.writeString(result);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,4 @@ private static boolean isClientError(Exception e) {
|| e instanceof IllegalArgumentException;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ public interface DataSourceMetadataStorage {
*/
void deleteDataSourceMetadata(String datasourceName);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ protected void doExecute(Task task, CreateDataSourceActionRequest request,
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ protected void doExecute(Task task, DeleteDataSourceActionRequest request,
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ protected Object buildJsonObject(DataSourceMetadata response) {
}.format(dataSourceMetadata);
return responseContent;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ protected void doExecute(Task task, UpdateDataSourceActionRequest request,
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ private static Runnable withCurrentContext(final Runnable task) {
task.run();
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ public void testDecryptWithDifferentKey() {
encryptor2.decrypt(encrypted);
});
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ public void testDoExecuteWithException() {
Assertions.assertEquals("Error",
exception.getMessage());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ public void testDoExecuteWithException() {
Assertions.assertEquals("Error",
exception.getMessage());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ public void testDoExecuteWithException() {
Assertions.assertEquals("Error",
exception.getMessage());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ public void testDoExecuteWithException() {
Assertions.assertEquals("Error",
exception.getMessage());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ public void testSchedule() {
Assert.assertTrue(isRun.get());
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -594,4 +594,4 @@ public void fieldWithSpacesInNameShouldPass() {
Assert.assertSame(TEXT, type.get());
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ public void testRetainWithUnexpandedObjectField() {
expected.sourceRef(new BytesArray("{\"a.attributes.hardware.correlate_id\": 10}"));
assertEquals(expected, row.data());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ private JSONObject readResponse(Response response) throws IOException {
}


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ public interface QueryRangeFunctionResponseHandle {
* Return ExecutionEngine.Schema of the Prometheus response.
*/
ExecutionEngine.Schema schema();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ public TableScanBuilder createScanBuilder() {
return null;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ private Optional<NamedExpression> getSpanExpression(List<NamedExpression> namedE
}


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ private static Optional<SpanExpression> getSpanExpression(



}
}