Skip to content

Commit

Permalink
[Spotless] Applying Google Code Format for core/src/main files #1 (op…
Browse files Browse the repository at this point in the history
…ensearch-project#1930)

* # This is a combination of 9 commits.

Fix create_index/create_index_with_IOException issue caused by OpenSearch PR change (opensearch-project#1899)

* Added setDefaultMediaType for create_index and create_index_with_IOException

Signed-off-by: Mitchell Gale <[email protected]>
(cherry picked from commit 7b932a7)
Signed-off-by: Mitchell Gale <[email protected]>

Resolving merge conflicts for pre tag in java docs.

Signed-off-by: Mitchell Gale <[email protected]>

running spotless check on newly pre tagged javadocs.

Signed-off-by: Mitchell Gale <[email protected]>

Converts java doc table to proper java doc table.

Signed-off-by: Mitchell Gale <[email protected]>

Resolving merge conflicts for pre tag in java docs 2

Signed-off-by: Mitchell Gale <[email protected]>

running spotless check on newly pre tagged javadocs.

Signed-off-by: Mitchell Gale <[email protected]>

cherry pick 60c0018

Signed-off-by: Mitchell Gale <[email protected]>

Addressed PR comment for table format in AbstractExprValue.

Signed-off-by: Mitchell Gale <[email protected]>

Removed pre tag from ExpressionReferenceOptimizer.

Signed-off-by: Mitchell Gale <[email protected]>

Removed pre tag from AstDSL.java

Signed-off-by: Mitchell Gale <[email protected]>

Removed pre tag from AstDSL.java

Signed-off-by: Mitchell Gale <[email protected]>

Removed pre tag from SelectExpressionAnalyzer.java

Signed-off-by: Mitchell Gale <[email protected]>

fixed java doc in QualifiedName.java

Signed-off-by: Mitchell Gale <[email protected]>

Removing checkstyle test for core and added spotless for relevant directories.

Signed-off-by: Mitchell Gale <[email protected]>

Fixing spacing around headers in ExpressionReferenceOptimizer.java SelectExpressionAnalyzer.java

Signed-off-by: Mitchell Gale <[email protected]>

Fix breaking changes. Disable some flaky tests in legacy.

Signed-off-by: Yury-Fridlyand <[email protected]>

(cherry picked from commit 809e656)
Signed-off-by: Mitchell Gale <[email protected]>

Resolving merge conflicts for pre tag in java docs.

Signed-off-by: Mitchell Gale <[email protected]>

running spotless check on newly pre tagged javadocs.

Signed-off-by: Mitchell Gale <[email protected]>

Fixed java doc spelling and improving string concatination.

Signed-off-by: Mitchell Gale <[email protected]>

improving string concatination.

Signed-off-by: Mitchell Gale <[email protected]>

Improving failure format on some functions.

Signed-off-by: Mitchell Gale <[email protected]>

spotless apply and fix of build.gradle

Signed-off-by: Mitchell Gale <[email protected]>

* parent 496fe8e
author Mitchell Gale <[email protected]> 1691080710 -0700
committer Mitchell Gale <[email protected]> 1691080766 -0700

Fix create_index/create_index_with_IOException issue caused by OpenSearch PR change (opensearch-project#1899)

* Added setDefaultMediaType for create_index and create_index_with_IOException

Signed-off-by: Mitchell Gale <[email protected]>
(cherry picked from commit 7b932a7)
Signed-off-by: Mitchell Gale <[email protected]>

Resolving merge conflicts for pre tag in java docs.

Signed-off-by: Mitchell Gale <[email protected]>

running spotless check on newly pre tagged javadocs.

Signed-off-by: Mitchell Gale <[email protected]>

Converts java doc table to proper java doc table.

Signed-off-by: Mitchell Gale <[email protected]>

Resolving merge conflicts for pre tag in java docs 2

Signed-off-by: Mitchell Gale <[email protected]>

running spotless check on newly pre tagged javadocs.

Signed-off-by: Mitchell Gale <[email protected]>

cherry pick 60c0018

Signed-off-by: Mitchell Gale <[email protected]>

Addressed PR comment for table format in AbstractExprValue.

Signed-off-by: Mitchell Gale <[email protected]>

Removed pre tag from ExpressionReferenceOptimizer.

Signed-off-by: Mitchell Gale <[email protected]>

Removed pre tag from AstDSL.java

Signed-off-by: Mitchell Gale <[email protected]>

Removed pre tag from AstDSL.java

Signed-off-by: Mitchell Gale <[email protected]>

Removed pre tag from SelectExpressionAnalyzer.java

Signed-off-by: Mitchell Gale <[email protected]>

fixed java doc in QualifiedName.java

Signed-off-by: Mitchell Gale <[email protected]>

Removing checkstyle test for core and added spotless for relevant directories.

Signed-off-by: Mitchell Gale <[email protected]>

Fixing spacing around headers in ExpressionReferenceOptimizer.java SelectExpressionAnalyzer.java

Signed-off-by: Mitchell Gale <[email protected]>

Fix breaking changes. Disable some flaky tests in legacy.

Signed-off-by: Yury-Fridlyand <[email protected]>

(cherry picked from commit 809e656)
Signed-off-by: Mitchell Gale <[email protected]>

Resolving merge conflicts for pre tag in java docs.

Signed-off-by: Mitchell Gale <[email protected]>

running spotless check on newly pre tagged javadocs.

Signed-off-by: Mitchell Gale <[email protected]>

Fixed java doc spelling and improving string concatination.

Signed-off-by: Mitchell Gale <[email protected]>

improving string concatination.

Signed-off-by: Mitchell Gale <[email protected]>

Improving failure format on some functions.

Signed-off-by: Mitchell Gale <[email protected]>

spotless apply and fix of build.gradle

Signed-off-by: Mitchell Gale <[email protected]>

Resolving merge conflicts for pre tag in java docs.

Signed-off-by: Mitchell Gale <[email protected]>

running spotless check on newly pre tagged javadocs.

Signed-off-by: Mitchell Gale <[email protected]>

Converts java doc table to proper java doc table.

Signed-off-by: Mitchell Gale <[email protected]>

Removing unused import in OpenSearchRestClientTest.java

Signed-off-by: Mitchell Gale <[email protected]>

* running spotless apply.

Signed-off-by: Mitchell Gale <[email protected]>

* Addressed comments in PR 5.

Signed-off-by: Mitchell Gale <[email protected]>

---------

Signed-off-by: Mitchell Gale <[email protected]>
  • Loading branch information
MitchellGale committed Aug 18, 2023
1 parent d9a78df commit 10c29f6
Show file tree
Hide file tree
Showing 132 changed files with 1,114 additions and 1,486 deletions.
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ repositories {
spotless {
java {
target fileTree('.') {
include '**/*.java'
include 'core/src/main/java/org/opensearch/sql/analysis/**/*.java',
'core/src/test/java/org/opensearch/sql/data/**/*.java',
'core/src/test/java/org/opensearch/sql/datasource/**/*.java',
'core/src/test/java/org/opensearch/sql/ast/**/*.java'
exclude '**/build/**', '**/build-*/**'
}
// importOrder()
Expand All @@ -95,7 +98,7 @@ spotless {
// removeUnusedImports()
// trimTrailingWhitespace()
endWithNewline()
// googleJavaFormat('1.17.0').reflowLongStrings().groupArtifact('com.google.googlejavaformat:google-java-format')
googleJavaFormat('1.17.0').reflowLongStrings().groupArtifact('com.google.googlejavaformat:google-java-format')
}
}

Expand Down
13 changes: 13 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,26 @@ plugins {
id 'java-library'
id "io.freefair.lombok"
id 'jacoco'
id 'info.solidsoft.pitest' version '1.9.0'
id 'java-test-fixtures'
}

repositories {
mavenCentral()
}

checkstyleMain.ignoreFailures = true
checkstyleTest.ignoreFailures = true

pitest {
targetClasses = ['org.opensearch.sql.*']
pitestVersion = '1.9.0'
threads = 4
outputFormats = ['HTML', 'XML']
timestampedReports = false
junit5PluginVersion = '1.0.0'
}

dependencies {
api group: 'com.google.guava', name: 'guava', version: '32.0.1-jre'
api group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: Apache-2.0
*/


package org.opensearch.sql.analysis;

import java.util.ArrayList;
Expand All @@ -13,26 +12,22 @@
import org.opensearch.sql.expression.NamedExpression;
import org.opensearch.sql.expression.function.FunctionProperties;

/**
* The context used for Analyzer.
*/
/** The context used for Analyzer. */
public class AnalysisContext {
/**
* Environment stack for symbol scope management.
*/
/** Environment stack for symbol scope management. */
private TypeEnvironment environment;
@Getter
private final List<NamedExpression> namedParseExpressions;

@Getter
private final FunctionProperties functionProperties;
@Getter private final List<NamedExpression> namedParseExpressions;

@Getter private final FunctionProperties functionProperties;

public AnalysisContext() {
this(new TypeEnvironment(null));
}

/**
* Class CTOR.
*
* @param environment Env to set to a new instance.
*/
public AnalysisContext(TypeEnvironment environment) {
Expand All @@ -41,9 +36,7 @@ public AnalysisContext(TypeEnvironment environment) {
this.functionProperties = new FunctionProperties();
}

/**
* Push a new environment.
*/
/** Push a new environment. */
public void push() {
environment = new TypeEnvironment(environment);
}
Expand Down
Loading

0 comments on commit 10c29f6

Please sign in to comment.