Skip to content

Commit

Permalink
fix spotlessApply issues
Browse files Browse the repository at this point in the history
Signed-off-by: YANGDB <[email protected]>
  • Loading branch information
YANG-DB committed Jan 2, 2024
1 parent 7eb2f9e commit 7b2fa89
Show file tree
Hide file tree
Showing 47 changed files with 852 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import static org.opensearch.rest.RestRequest.Method.GET;

import java.io.IOException;

/** Run ConvertTZFunctionIT tests using http GET request */
public class ConvertTZFunctionWithGetIT extends ConvertTZFunctionIT {
@Override
public void init() throws IOException {
super.init();
this.method = GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run DataTypeIT tests using http GET request */
public class DataTypeWithGetIT extends DataTypeIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run DateTimeComparisonIT tests using http GET request */
public class DateTimeComparisonWithGetIT extends DateTimeComparisonIT {
public DateTimeComparisonWithGetIT(String functionCall, String name, Boolean expectedResult) {
super(functionCall, name, expectedResult);
}

@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run DateTimeFunctionIT tests using http GET request */
public class DateTimeFunctionWithGetIT extends DateTimeFunctionIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run DateTimeImplementationIT tests using http GET request */
public class DateTimeImplementationWithGetIT extends DateTimeImplementationIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run DedupCommandIT tests using http GET request */
public class DedupCommandWithGetIT extends DedupCommandIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run DescribeCommandIT tests using http GET request */
public class DescribeCommandWithGetIT extends DescribeCommandIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run ExplainIT tests using http GET request */
public class ExplainWithGetIT extends ExplainIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run FieldsCommandIT tests using http GET request */
public class FieldsCommandWithGetIT extends FieldsCommandIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run HeadCommandIT tests using http GET request */
public class HeadCommandWithGetIT extends HeadCommandIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run InformationSchemaCommandIT tests using http GET request */
public class InformationSchemaCommandWithGetIT extends InformationSchemaCommandIT {
@Override
protected void init() throws InterruptedException, IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run LegacyAPICompatibilityIT tests using http GET request */
public class LegacyAPICompatibilityWithGetIT extends LegacyAPICompatibilityIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run LikeQueryIT tests using http GET request */
public class LikeQueryWithGetIT extends LikeQueryIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run MatchBoolPrefixIT tests using http GET request */
public class MatchBoolPrefixWithGetIT extends MatchBoolPrefixIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run MatchPhrasePrefixIT tests using http GET request */
public class MatchPhrasePrefixWithGetIT extends MatchPhrasePrefixIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run MatchPhraseIT tests using http GET request */
public class MatchPhraseWithGetIT extends MatchPhraseIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run MatchIT tests using http GET request */
public class MatchWithGetIT extends MatchIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import java.io.IOException;
import org.opensearch.rest.RestRequest;

/** Run MathematicalFunctionIT tests using http GET request */
public class MathematicalFunctionWithGetIT extends MathematicalFunctionIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import org.opensearch.rest.RestRequest;

/** Run MetricsIT tests using http GET request */
public class MetricsWithGetIT extends MetricsIT {
@Override
public void init() throws Exception {
super.init();
this.method = RestRequest.Method.GET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.sql.ppl;

import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BEER;

import java.io.IOException;
import org.junit.Test;
import org.opensearch.rest.RestRequest;

/** Run MultiMatchIT tests using http GET request */
public class MultiMatchWithGetIT extends MultiMatchIT {
@Override
public void init() throws IOException {
super.init();
this.method = RestRequest.Method.GET;
}

@Test
public void test_multi_match() throws IOException {
String query =
"SOURCE="
+ TEST_INDEX_BEER
+ " | WHERE multi_match(['Tags' ^ 1.5, Title, 'Body' 4.2], 'taste') | fields Id";
var result = executeQuery(query);
assertEquals(16, result.getInt("total"));
}
}
Loading

0 comments on commit 7b2fa89

Please sign in to comment.