diff --git a/async-query-core/src/main/java/org/opensearch/sql/spark/validator/FunctionType.java b/async-query-core/src/main/java/org/opensearch/sql/spark/validator/FunctionType.java index 0a821a7a8c..a17f2f8b21 100644 --- a/async-query-core/src/main/java/org/opensearch/sql/spark/validator/FunctionType.java +++ b/async-query-core/src/main/java/org/opensearch/sql/spark/validator/FunctionType.java @@ -379,7 +379,7 @@ public enum FunctionType { "timestamp", "tinyint")) .put(PREDICATE, Set.of("isnan", "isnotnull", "isnull", "regexp", "regexp_like", "rlike")) - .put(CSV, Set.of("from_csv","schema_of_csv","to_csv")) + .put(CSV, Set.of("from_csv", "schema_of_csv", "to_csv")) .put( MISC, Set.of( diff --git a/async-query-core/src/main/java/org/opensearch/sql/spark/validator/GrammarElementValidatorFactory.java b/async-query-core/src/main/java/org/opensearch/sql/spark/validator/GrammarElementValidatorFactory.java index 57374b852c..bd297c7afa 100644 --- a/async-query-core/src/main/java/org/opensearch/sql/spark/validator/GrammarElementValidatorFactory.java +++ b/async-query-core/src/main/java/org/opensearch/sql/spark/validator/GrammarElementValidatorFactory.java @@ -68,8 +68,7 @@ public class GrammarElementValidatorFactory { UNCACHE_TABLE, CSV_FUNCTIONS, MISC_FUNCTIONS, - UDF - ) + UDF) .build(); private static final Set S3GLUE_DENY_LIST = diff --git a/async-query-core/src/main/java/org/opensearch/sql/spark/validator/SQLQueryValidator.java b/async-query-core/src/main/java/org/opensearch/sql/spark/validator/SQLQueryValidator.java index fba973f930..6c84be2a57 100644 --- a/async-query-core/src/main/java/org/opensearch/sql/spark/validator/SQLQueryValidator.java +++ b/async-query-core/src/main/java/org/opensearch/sql/spark/validator/SQLQueryValidator.java @@ -49,7 +49,6 @@ import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.ResetConfigurationContext; import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.ResetQuotedConfigurationContext; import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.SampleContext; -import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.SelectClauseContext; import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.SetConfigurationContext; import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.SetNamespaceLocationContext; import org.opensearch.sql.spark.antlr.parser.SqlBaseParser.SetNamespacePropertiesContext; @@ -464,7 +463,7 @@ public Void visitFunctionName(FunctionNameContext ctx) { private void validateFunctionAllowed(String function) { FunctionType type = FunctionType.fromFunctionName(function.toLowerCase()); - switch(type) { + switch (type) { case MAP: validateAllowed(GrammarElement.MAP_FUNCTIONS); break;