From 3ca2ba558ca972ad813240230599f7a8904b7ac3 Mon Sep 17 00:00:00 2001 From: Chen Dai <46505291+dai-chen@users.noreply.github.com> Date: Mon, 17 May 2021 15:21:41 -0700 Subject: [PATCH] SQL/PPL and JDBC package renaming (#54) * Rename all java packages and pass UT Signed-off-by: Chen Dai * Rename all java packages in Gradle config Signed-off-by: Chen Dai * Change meta info for JDBC Driver class Signed-off-by: Chen Dai * Change JDBC readme and shadow path Signed-off-by: Chen Dai * Replace ODFE in pom publish task Signed-off-by: Chen Dai * Rename opendistro setting Signed-off-by: Chen Dai * Replace opendistro in doc Signed-off-by: Chen Dai * Replace opendistro in doc Signed-off-by: Chen Dai --- .../workflows/sql-jdbc-release-workflow.yml | 2 +- .github/workflows/sql-odbc-main.yml | 2 +- .github/workflows/sql-release-workflow.yml | 2 +- build-tools/sqlplugin-coverage.gradle | 2 +- build.gradle | 2 +- .../antlr/CaseInsensitiveCharStream.java | 2 +- .../antlr/SyntaxAnalysisErrorListener.java | 2 +- .../common/antlr/SyntaxCheckException.java | 2 +- .../sql/common/response/ResponseListener.java | 2 +- .../sql/common/setting/Settings.java | 2 +- .../sql/common/utils/LogUtils.java | 2 +- .../sql/common/utils/StringUtils.java | 2 +- config/checkstyle/suppressions.xml | 6 +- core/build.gradle | 2 +- .../sql/analysis/AnalysisContext.java | 2 +- .../opensearch}/sql/analysis/Analyzer.java | 112 +++++++-------- .../sql/analysis/ExpressionAnalyzer.java | 78 +++++----- .../ExpressionReferenceOptimizer.java | 30 ++-- .../sql/analysis/NamedExpressionAnalyzer.java | 14 +- .../sql/analysis/QualifierAnalyzer.java | 12 +- .../analysis/SelectExpressionAnalyzer.java | 26 ++-- .../sql/analysis/TypeEnvironment.java | 18 +-- .../analysis/WindowExpressionAnalyzer.java | 36 ++--- .../sql/analysis/symbol/Namespace.java | 2 +- .../sql/analysis/symbol/Symbol.java | 2 +- .../sql/analysis/symbol/SymbolTable.java | 4 +- .../sql/ast/AbstractNodeVisitor.java | 80 +++++------ .../opensearch}/sql/ast/Node.java | 2 +- .../opensearch}/sql/ast/dsl/AstDSL.java | 88 ++++++------ .../sql/ast/expression/AggregateFunction.java | 6 +- .../opensearch}/sql/ast/expression/Alias.java | 4 +- .../sql/ast/expression/AllFields.java | 6 +- .../opensearch}/sql/ast/expression/And.java | 4 +- .../sql/ast/expression/Argument.java | 4 +- .../sql/ast/expression/AttributeList.java | 4 +- .../opensearch}/sql/ast/expression/Case.java | 6 +- .../opensearch}/sql/ast/expression/Cast.java | 26 ++-- .../sql/ast/expression/Compare.java | 4 +- .../sql/ast/expression/DataType.java | 4 +- .../sql/ast/expression/EqualTo.java | 4 +- .../opensearch}/sql/ast/expression/Field.java | 4 +- .../sql/ast/expression/Function.java | 4 +- .../opensearch}/sql/ast/expression/In.java | 4 +- .../sql/ast/expression/Interval.java | 4 +- .../sql/ast/expression/IntervalUnit.java | 2 +- .../opensearch}/sql/ast/expression/Let.java | 4 +- .../sql/ast/expression/Literal.java | 4 +- .../opensearch}/sql/ast/expression/Map.java | 4 +- .../opensearch}/sql/ast/expression/Not.java | 4 +- .../opensearch}/sql/ast/expression/Or.java | 4 +- .../sql/ast/expression/QualifiedName.java | 4 +- .../ast/expression/UnresolvedArgument.java | 4 +- .../ast/expression/UnresolvedAttribute.java | 4 +- .../ast/expression/UnresolvedExpression.java | 6 +- .../opensearch}/sql/ast/expression/When.java | 6 +- .../sql/ast/expression/WindowFunction.java | 8 +- .../opensearch}/sql/ast/expression/Xor.java | 4 +- .../opensearch}/sql/ast/tree/Aggregation.java | 8 +- .../opensearch}/sql/ast/tree/Dedupe.java | 8 +- .../opensearch}/sql/ast/tree/Eval.java | 6 +- .../opensearch}/sql/ast/tree/Filter.java | 6 +- .../opensearch}/sql/ast/tree/Head.java | 4 +- .../opensearch}/sql/ast/tree/Limit.java | 4 +- .../opensearch}/sql/ast/tree/Project.java | 8 +- .../opensearch}/sql/ast/tree/RareTopN.java | 10 +- .../opensearch}/sql/ast/tree/Relation.java | 6 +- .../sql/ast/tree/RelationSubquery.java | 4 +- .../opensearch}/sql/ast/tree/Rename.java | 6 +- .../opensearch}/sql/ast/tree/Sort.java | 14 +- .../sql/ast/tree/UnresolvedPlan.java | 6 +- .../opensearch}/sql/ast/tree/Values.java | 8 +- .../data/model/AbstractExprNumberValue.java | 2 +- .../sql/data/model/AbstractExprValue.java | 4 +- .../sql/data/model/ExprBooleanValue.java | 6 +- .../sql/data/model/ExprByteValue.java | 6 +- .../sql/data/model/ExprCollectionValue.java | 6 +- .../sql/data/model/ExprDateValue.java | 8 +- .../sql/data/model/ExprDatetimeValue.java | 8 +- .../sql/data/model/ExprDoubleValue.java | 6 +- .../sql/data/model/ExprFloatValue.java | 6 +- .../sql/data/model/ExprIntegerValue.java | 6 +- .../sql/data/model/ExprIntervalValue.java | 8 +- .../sql/data/model/ExprLongValue.java | 6 +- .../sql/data/model/ExprMissingValue.java | 8 +- .../sql/data/model/ExprNullValue.java | 6 +- .../sql/data/model/ExprShortValue.java | 6 +- .../sql/data/model/ExprStringValue.java | 8 +- .../sql/data/model/ExprTimeValue.java | 8 +- .../sql/data/model/ExprTimestampValue.java | 8 +- .../sql/data/model/ExprTupleValue.java | 10 +- .../opensearch}/sql/data/model/ExprValue.java | 10 +- .../sql/data/model/ExprValueUtils.java | 6 +- .../sql/data/type/ExprCoreType.java | 2 +- .../opensearch}/sql/data/type/ExprType.java | 8 +- .../sql/data/type/WideningTypeRule.java | 6 +- .../sql/data/utils/ExprValueOrdering.java | 8 +- .../data/utils/NaturalExprValueOrdering.java | 8 +- .../utils/NullsFirstExprValueOrdering.java | 8 +- .../utils/NullsLastExprValueOrdering.java | 8 +- .../data/utils/ReverseExprValueOrdering.java | 8 +- .../ExpressionEvaluationException.java | 2 +- .../sql/exception/QueryEngineException.java | 2 +- .../sql/exception/SemanticCheckException.java | 2 +- .../sql/executor/ExecutionEngine.java | 10 +- .../opensearch}/sql/executor/Explain.java | 42 +++--- .../opensearch}/sql/expression/DSL.java | 26 ++-- .../sql/expression/Expression.java | 8 +- .../sql/expression/ExpressionNodeVisitor.java | 12 +- .../sql/expression/FunctionExpression.java | 6 +- .../sql/expression/LiteralExpression.java | 8 +- .../sql/expression/NamedExpression.java | 10 +- .../sql/expression/ReferenceExpression.java | 12 +- .../aggregation/AggregationState.java | 6 +- .../expression/aggregation/Aggregator.java | 26 ++-- .../aggregation/AggregatorFunction.java | 34 ++--- .../expression/aggregation/AvgAggregator.java | 16 +-- .../aggregation/CountAggregator.java | 16 +-- .../expression/aggregation/MaxAggregator.java | 14 +- .../expression/aggregation/MinAggregator.java | 14 +- .../aggregation/NamedAggregator.java | 8 +- .../expression/aggregation/SumAggregator.java | 36 ++--- .../conditional/cases/CaseClause.java | 24 ++-- .../conditional/cases/WhenClause.java | 16 +-- .../expression/config/ExpressionConfig.java | 26 ++-- .../expression/datetime/CalendarLookup.java | 4 +- .../datetime/DateTimeFormatterUtil.java | 6 +- .../expression/datetime/DateTimeFunction.java | 52 +++---- .../expression/datetime/IntervalClause.java | 38 ++--- .../sql/expression/env/Environment.java | 2 +- .../function/BuiltinFunctionName.java | 2 +- .../function/BuiltinFunctionRepository.java | 6 +- .../expression/function/FunctionBuilder.java | 4 +- .../sql/expression/function/FunctionDSL.java | 14 +- .../function/FunctionImplementation.java | 4 +- .../sql/expression/function/FunctionName.java | 2 +- .../expression/function/FunctionResolver.java | 4 +- .../function/FunctionSignature.java | 6 +- .../function/SerializableBiFunction.java | 2 +- .../function/SerializableFunction.java | 2 +- .../function/SerializableNoArgFunction.java | 2 +- .../function/SerializableTriFunction.java | 2 +- .../arthmetic/ArithmeticFunction.java | 36 ++--- .../arthmetic/MathematicalFunction.java | 56 ++++---- .../operator/convert/TypeCastOperator.java | 56 ++++---- .../predicate/BinaryPredicateOperator.java | 32 ++--- .../predicate/UnaryPredicateOperator.java | 36 ++--- .../sql/expression/text/TextFunction.java | 30 ++-- .../expression/window/WindowDefinition.java | 8 +- .../window/WindowFunctionExpression.java | 6 +- .../expression/window/WindowFunctions.java | 22 +-- .../aggregation/AggregateWindowFunction.java | 24 ++-- .../window/frame/CurrentRowWindowFrame.java | 10 +- .../window/frame/PeerRowsWindowFrame.java | 10 +- .../expression/window/frame/WindowFrame.java | 8 +- .../window/ranking/DenseRankFunction.java | 6 +- .../window/ranking/RankFunction.java | 6 +- .../window/ranking/RankingWindowFunction.java | 28 ++-- .../window/ranking/RowNumberFunction.java | 6 +- .../sql/monitor/AlwaysHealthyMonitor.java | 2 +- .../sql/monitor/ResourceMonitor.java | 2 +- .../sql/planner/DefaultImplementor.java | 60 ++++---- .../opensearch}/sql/planner/PlanNode.java | 2 +- .../opensearch}/sql/planner/Planner.java | 16 +-- .../planner/logical/LogicalAggregation.java | 6 +- .../sql/planner/logical/LogicalDedupe.java | 4 +- .../sql/planner/logical/LogicalEval.java | 6 +- .../sql/planner/logical/LogicalFilter.java | 4 +- .../sql/planner/logical/LogicalLimit.java | 2 +- .../sql/planner/logical/LogicalPlan.java | 4 +- .../sql/planner/logical/LogicalPlanDSL.java | 20 +-- .../logical/LogicalPlanNodeVisitor.java | 2 +- .../sql/planner/logical/LogicalProject.java | 4 +- .../sql/planner/logical/LogicalRareTopN.java | 6 +- .../sql/planner/logical/LogicalRelation.java | 2 +- .../sql/planner/logical/LogicalRemove.java | 4 +- .../sql/planner/logical/LogicalRename.java | 4 +- .../sql/planner/logical/LogicalSort.java | 6 +- .../sql/planner/logical/LogicalValues.java | 4 +- .../sql/planner/logical/LogicalWindow.java | 6 +- .../optimizer/LogicalPlanOptimizer.java | 10 +- .../sql/planner/optimizer/Rule.java | 4 +- .../planner/optimizer/pattern/Patterns.java | 4 +- .../optimizer/rule/MergeFilterAndFilter.java | 12 +- .../optimizer/rule/PushFilterUnderSort.java | 12 +- .../planner/physical/AggregationOperator.java | 20 +-- .../sql/planner/physical/DedupeOperator.java | 8 +- .../sql/planner/physical/EvalOperator.java | 18 +-- .../sql/planner/physical/FilterOperator.java | 10 +- .../sql/planner/physical/LimitOperator.java | 4 +- .../sql/planner/physical/PhysicalPlan.java | 8 +- .../sql/planner/physical/PhysicalPlanDSL.java | 20 +-- .../physical/PhysicalPlanNodeVisitor.java | 4 +- .../sql/planner/physical/ProjectOperator.java | 10 +- .../planner/physical/RareTopNOperator.java | 12 +- .../sql/planner/physical/RemoveOperator.java | 12 +- .../sql/planner/physical/RenameOperator.java | 14 +- .../sql/planner/physical/SortOperator.java | 16 +-- .../sql/planner/physical/ValuesOperator.java | 8 +- .../sql/planner/physical/WindowOperator.java | 16 +-- .../sql/storage/StorageEngine.java | 2 +- .../opensearch}/sql/storage/Table.java | 8 +- .../sql/storage/TableScanOperator.java | 6 +- .../storage/bindingtuple/BindingTuple.java | 14 +- .../bindingtuple/LazyBindingTuple.java | 8 +- .../sql/utils/ExpressionUtils.java | 4 +- .../opensearch}/sql/utils/OperatorUtils.java | 8 +- .../sql/utils/SystemIndexUtils.java | 2 +- .../sql/analysis/AnalysisContextTest.java | 4 +- .../sql/analysis/AnalyzerTest.java | 58 ++++---- .../sql/analysis/AnalyzerTestBase.java | 34 ++--- .../sql/analysis/ExpressionAnalyzerTest.java | 48 +++---- .../ExpressionReferenceOptimizerTest.java | 22 +-- .../analysis/NamedExpressionAnalyzerTest.java | 12 +- .../sql/analysis/QualifierAnalyzerTest.java | 18 +-- .../sql/analysis/SelectAnalyzeTest.java | 28 ++-- .../SelectExpressionAnalyzerTest.java | 22 +-- .../sql/analysis/TypeEnvironmentTest.java | 18 +-- .../WindowExpressionAnalyzerTest.java | 40 +++--- .../sql/analysis/symbol/SymbolTableTest.java | 12 +- .../sql/ast/expression/CastTest.java | 8 +- .../sql/ast/expression/QualifiedNameTest.java | 4 +- .../sql/ast/tree/RelationTest.java | 6 +- .../opensearch}/sql/config/TestConfig.java | 28 ++-- .../sql/data/model/DateTimeValueTest.java | 12 +- .../sql/data/model/ExprBooleanValueTest.java | 6 +- .../data/model/ExprCollectionValueTest.java | 6 +- .../sql/data/model/ExprIntervalValueTest.java | 6 +- .../sql/data/model/ExprMissingValueTest.java | 14 +- .../sql/data/model/ExprNullValueTest.java | 12 +- .../sql/data/model/ExprNumberValueTest.java | 4 +- .../sql/data/model/ExprTupleValueTest.java | 8 +- .../sql/data/model/ExprValueCompareTest.java | 8 +- .../sql/data/model/ExprValueUtilsTest.java | 32 ++--- .../sql/data/type/ExprTypeTest.java | 24 ++-- .../sql/data/utils/ExprValueOrderingTest.java | 32 ++--- .../NullsFirstExprValueOrderingTest.java | 12 +- .../utils/NullsLastExprValueOrderingTest.java | 12 +- .../utils/ReverseExprValueOrderingTest.java | 6 +- .../opensearch}/sql/executor/ExplainTest.java | 72 +++++----- .../expression/ExpressionNodeVisitorTest.java | 24 ++-- .../sql/expression/ExpressionTestBase.java | 50 +++---- .../sql/expression/NamedExpressionTest.java | 4 +- .../expression/ReferenceExpressionTest.java | 60 ++++---- .../aggregation/AggregationTest.java | 8 +- .../aggregation/AvgAggregatorTest.java | 16 +-- .../aggregation/CountAggregatorTest.java | 36 ++--- .../aggregation/MaxAggregatorTest.java | 30 ++-- .../aggregation/MinAggregatorTest.java | 30 ++-- .../aggregation/SumAggregatorTest.java | 26 ++-- .../conditional/ConditionalFunctionTest.java | 14 +- .../conditional/cases/CaseClauseTest.java | 16 +-- .../conditional/cases/WhenClauseTest.java | 16 +-- .../datetime/DateTimeFunctionTest.java | 58 ++++---- .../datetime/IntervalClauseTest.java | 26 ++-- .../function/BuiltinFunctionNameTest.java | 4 +- .../BuiltinFunctionRepositoryTest.java | 12 +- .../function/FunctionResolverTest.java | 8 +- .../function/FunctionSignatureTest.java | 12 +- .../function/WideningTypeRuleTest.java | 28 ++-- .../arthmetic/ArithmeticFunctionTest.java | 52 +++---- .../arthmetic/MathematicalFunctionTest.java | 48 +++---- .../operator/arthmetic/UnaryFunctionTest.java | 0 .../convert/TypeCastOperatorTest.java | 56 ++++---- .../BinaryPredicateOperatorTest.java | 72 +++++----- .../predicate/UnaryPredicateOperatorTest.java | 36 ++--- .../sql/expression/text/TextFunctionTest.java | 28 ++-- .../window/CurrentRowWindowFrameTest.java | 22 +-- .../AggregateWindowFunctionTest.java | 18 +-- .../window/frame/PeerRowsWindowFrameTest.java | 20 +-- .../ranking/RankingWindowFunctionTest.java | 26 ++-- .../sql/monitor/AlwaysHealthyMonitorTest.java | 4 +- .../sql/planner/DefaultImplementorTest.java | 72 +++++----- .../opensearch}/sql/planner/PlannerTest.java | 42 +++--- .../planner/logical/LogicalDedupeTest.java | 30 ++-- .../sql/planner/logical/LogicalEvalTest.java | 14 +- .../logical/LogicalPlanNodeVisitorTest.java | 18 +-- .../planner/logical/LogicalRelationTest.java | 4 +- .../sql/planner/logical/LogicalSortTest.java | 30 ++-- .../optimizer/LogicalPlanOptimizerTest.java | 28 ++-- .../optimizer/pattern/PatternsTest.java | 6 +- .../physical/AggregationOperatorTest.java | 14 +- .../planner/physical/DedupeOperatorTest.java | 12 +- .../planner/physical/EvalOperatorTest.java | 16 +-- .../planner/physical/FilterOperatorTest.java | 18 +-- .../planner/physical/LimitOperatorTest.java | 6 +- .../physical/PhysicalPlanNodeVisitorTest.java | 18 +-- .../physical/PhysicalPlanTestBase.java | 22 +-- .../planner/physical/ProjectOperatorTest.java | 22 +-- .../physical/RareTopNOperatorTest.java | 12 +- .../planner/physical/RemoveOperatorTest.java | 14 +- .../planner/physical/RenameOperatorTest.java | 14 +- .../planner/physical/SortOperatorTest.java | 12 +- .../planner/physical/ValuesOperatorTest.java | 12 +- .../planner/physical/WindowOperatorTest.java | 26 ++-- .../sql/storage/TableScanOperatorTest.java | 10 +- .../bindingtuple/BindingTupleTest.java | 12 +- .../opensearch}/sql/utils/ComparisonUtil.java | 30 ++-- .../opensearch}/sql/utils/MatcherUtils.java | 6 +- .../sql/utils/SystemIndexUtilsTest.java | 10 +- docs/attributions.md | 4 +- docs/experiment/ppl/admin/settings.rst | 4 +- docs/experiment/ppl/index.rst | 2 +- docs/user/admin/settings.rst | 2 +- docs/user/dql/basics.rst | 2 +- doctest/build.gradle | 2 +- integ-test/build.gradle | 40 +++--- .../sql/correctness/CorrectnessIT.java | 18 +-- .../sql/correctness/TestConfig.java | 8 +- .../sql/correctness/report/ErrorTestCase.java | 4 +- .../correctness/report/FailedTestCase.java | 6 +- .../correctness/report/SuccessTestCase.java | 4 +- .../correctness/report/TestCaseReport.java | 4 +- .../sql/correctness/report/TestReport.java | 2 +- .../sql/correctness/report/TestSummary.java | 2 +- .../correctness/runner/ComparisonTest.java | 22 +-- .../runner/connection/DBConnection.java | 4 +- .../runner/connection/JDBCConnection.java | 8 +- .../connection/OpenSearchConnection.java | 4 +- .../runner/resultset/DBResult.java | 4 +- .../sql/correctness/runner/resultset/Row.java | 2 +- .../correctness/runner/resultset/Type.java | 2 +- .../correctness/tests/ComparisonTestTest.java | 22 +-- .../sql/correctness/tests/DBResultTest.java | 8 +- .../correctness/tests/JDBCConnectionTest.java | 8 +- .../tests/OpenSearchConnectionTest.java | 4 +- .../sql/correctness/tests/RowTest.java | 4 +- .../sql/correctness/tests/TestConfigTest.java | 4 +- .../correctness/tests/TestDataSetTest.java | 4 +- .../correctness/tests/TestQuerySetTest.java | 4 +- .../sql/correctness/tests/TestReportTest.java | 16 +-- .../sql/correctness/tests/UnitTests.java | 2 +- .../sql/correctness/testset/TestDataSet.java | 6 +- .../sql/correctness/testset/TestQuerySet.java | 2 +- .../sql/doctest/admin/MonitoringIT.java | 40 +++--- .../sql/doctest/admin/PluginSettingIT.java | 48 +++---- .../sql/doctest/beyond/FullTextIT.java | 8 +- .../sql/doctest/beyond/PartiQLIT.java | 16 +-- .../opensearch}/sql/doctest/core/DocTest.java | 16 +-- .../sql/doctest/core/Template.java | 6 +- .../sql/doctest/core/TestData.java | 10 +- .../core/annotation/DocTestConfig.java | 2 +- .../sql/doctest/core/annotation/Section.java | 2 +- .../sql/doctest/core/builder/Body.java | 2 +- .../sql/doctest/core/builder/DocBuilder.java | 32 ++--- .../sql/doctest/core/builder/Example.java | 2 +- .../sql/doctest/core/builder/Formats.java | 14 +- .../sql/doctest/core/builder/ListItems.java | 4 +- .../sql/doctest/core/builder/Requests.java | 6 +- .../sql/doctest/core/markup/Document.java | 2 +- .../sql/doctest/core/markup/RstDocument.java | 2 +- .../sql/doctest/core/request/SqlRequest.java | 8 +- .../core/request/SqlRequestFormat.java | 6 +- .../sql/doctest/core/response/DataTable.java | 4 +- .../doctest/core/response/SqlResponse.java | 4 +- .../core/response/SqlResponseFormat.java | 6 +- .../sql/doctest/core/test/DataTableTest.java | 4 +- .../sql/doctest/core/test/DocBuilderTest.java | 6 +- .../sql/doctest/core/test/DocTestTests.java | 2 +- .../doctest/core/test/RstDocumentTest.java | 4 +- .../core/test/SqlRequestFormatTest.java | 16 +-- .../sql/doctest/core/test/SqlRequestTest.java | 8 +- .../core/test/SqlResponseFormatTest.java | 16 +-- .../doctest/core/test/SqlResponseTest.java | 4 +- .../opensearch}/sql/doctest/dml/DeleteIT.java | 14 +- .../sql/doctest/dql/BasicQueryIT.java | 22 +-- .../sql/doctest/dql/ComplexQueryIT.java | 20 +-- .../sql/doctest/dql/MetaDataQueryIT.java | 20 +-- .../sql/doctest/dql/SQLFunctionsIT.java | 14 +- .../sql/doctest/interfaces/EndpointIT.java | 16 +-- .../sql/doctest/interfaces/ProtocolIT.java | 18 +-- .../sql/legacy/AggregationExpressionIT.java | 10 +- .../opensearch}/sql/legacy/AggregationIT.java | 24 ++-- .../sql/legacy/CsvFormatResponseIT.java | 20 +-- .../opensearch}/sql/legacy/CursorIT.java | 14 +- .../sql/legacy/CustomExternalTestCluster.java | 2 +- .../opensearch}/sql/legacy/DateFormatIT.java | 12 +- .../sql/legacy/DateFunctionsIT.java | 2 +- .../opensearch}/sql/legacy/DeleteIT.java | 4 +- .../opensearch}/sql/legacy/ExplainIT.java | 16 +-- .../sql/legacy/GetEndpointQueryIT.java | 4 +- .../opensearch}/sql/legacy/HashJoinIT.java | 6 +- .../opensearch}/sql/legacy/HavingIT.java | 2 +- .../opensearch}/sql/legacy/JSONRequestIT.java | 2 +- .../opensearch}/sql/legacy/JdbcTestIT.java | 2 +- .../sql/legacy/JoinAliasWriterRuleIT.java | 2 +- .../opensearch}/sql/legacy/JoinIT.java | 20 +-- .../sql/legacy/MathFunctionsIT.java | 2 +- .../sql/legacy/MetaDataQueriesIT.java | 8 +- .../opensearch}/sql/legacy/MethodQueryIT.java | 2 +- .../opensearch}/sql/legacy/MetricsIT.java | 8 +- .../opensearch}/sql/legacy/MultiQueryIT.java | 2 +- .../sql/legacy/NestedFieldQueryIT.java | 6 +- .../sql/legacy/ObjectFieldSelectIT.java | 14 +- .../sql/legacy/OpenSearchSQLRestTestCase.java | 2 +- .../opensearch}/sql/legacy/OrderIT.java | 2 +- .../sql/legacy/OrdinalAliasRewriterIT.java | 4 +- .../opensearch}/sql/legacy/PluginIT.java | 8 +- .../sql/legacy/PreparedStatementIT.java | 2 +- .../sql/legacy/PrettyFormatResponseIT.java | 2 +- .../sql/legacy/PrettyFormatterIT.java | 6 +- .../sql/legacy/QueryAnalysisIT.java | 18 +-- .../sql/legacy/QueryFunctionsIT.java | 10 +- .../opensearch}/sql/legacy/QueryIT.java | 18 +-- .../sql/legacy/RestIntegTestCase.java | 46 +++--- .../sql/legacy/SQLFunctionsIT.java | 22 +-- .../sql/legacy/SQLIntegTestCase.java | 70 ++++----- .../opensearch}/sql/legacy/ShowIT.java | 6 +- .../opensearch}/sql/legacy/SourceFieldIT.java | 4 +- .../opensearch}/sql/legacy/SubqueryIT.java | 26 ++-- .../sql/legacy/TermQueryExplainIT.java | 2 +- .../opensearch}/sql/legacy/TestUtils.java | 2 +- .../sql/legacy/TestsConstants.java | 2 +- .../sql/legacy/TypeInformationIT.java | 6 +- .../opensearch}/sql/ppl/CsvFormatIT.java | 4 +- .../opensearch}/sql/ppl/DataTypeIT.java | 14 +- .../sql/ppl/DateTimeFunctionIT.java | 14 +- .../opensearch}/sql/ppl/DedupCommandIT.java | 10 +- .../opensearch}/sql/ppl/ExplainIT.java | 4 +- .../opensearch}/sql/ppl/FieldsCommandIT.java | 20 +-- .../opensearch}/sql/ppl/HeadCommandIT.java | 8 +- .../sql/ppl/LegacyAPICompatibilityIT.java | 8 +- .../sql/ppl/MathematicalFunctionIT.java | 18 +-- .../opensearch}/sql/ppl/MetricsIT.java | 6 +- .../sql/ppl/ObjectFieldOperateIT.java | 14 +- .../opensearch}/sql/ppl/OperatorIT.java | 10 +- .../opensearch}/sql/ppl/PPLIntegTestCase.java | 10 +- .../opensearch}/sql/ppl/PPLPluginIT.java | 14 +- .../opensearch}/sql/ppl/QueryAnalysisIT.java | 8 +- .../opensearch}/sql/ppl/RareCommandIT.java | 8 +- .../opensearch}/sql/ppl/RenameCommandIT.java | 10 +- .../sql/ppl/ResourceMonitorIT.java | 8 +- .../opensearch}/sql/ppl/SearchCommandIT.java | 14 +- .../opensearch}/sql/ppl/SettingsIT.java | 8 +- .../opensearch}/sql/ppl/SortCommandIT.java | 12 +- .../opensearch}/sql/ppl/StandaloneIT.java | 38 ++--- .../opensearch}/sql/ppl/StatsCommandIT.java | 16 +-- .../opensearch}/sql/ppl/TextCommandIT.java | 12 +- .../opensearch}/sql/ppl/TopCommandIT.java | 8 +- .../opensearch}/sql/ppl/WhereCommandIT.java | 12 +- .../opensearch}/sql/sql/AdminIT.java | 10 +- .../opensearch}/sql/sql/ConditionalIT.java | 28 ++-- .../sql/sql/CorrectnessTestBase.java | 24 ++-- .../opensearch}/sql/sql/CsvFormatIT.java | 6 +- .../sql/sql/DateTimeFunctionIT.java | 24 ++-- .../opensearch}/sql/sql/ExpressionIT.java | 8 +- .../opensearch}/sql/sql/IdentifierIT.java | 16 +-- .../opensearch}/sql/sql/JdbcFormatIT.java | 10 +- .../sql/sql/LegacyAPICompatibilityIT.java | 18 +-- .../sql/sql/MathematicalFunctionIT.java | 18 +-- .../opensearch}/sql/sql/MetricsIT.java | 10 +- .../opensearch}/sql/sql/NullLiteralIT.java | 12 +- .../sql/sql/PreparedStatementIT.java | 6 +- .../sql/sql/QueryValidationIT.java | 8 +- .../opensearch}/sql/sql/RawFormatIT.java | 6 +- .../opensearch}/sql/sql/SQLCorrectnessIT.java | 2 +- .../opensearch}/sql/sql/TextFunctionIT.java | 16 +-- .../opensearch}/sql/sql/WindowFunctionIT.java | 10 +- .../opensearch}/sql/util/MatcherUtils.java | 2 +- .../opensearch}/sql/util/TestUtils.java | 4 +- legacy/build.gradle | 6 +- .../antlr/OpenSearchLegacySqlAnalyzer.java | 28 ++-- .../sql/legacy/antlr/SimilarSymbols.java | 9 +- .../sql/legacy/antlr/SqlAnalysisConfig.java | 2 +- .../legacy/antlr/SqlAnalysisException.java | 2 +- .../semantic/SemanticAnalysisException.java | 4 +- .../antlr/semantic/scope/Environment.java | 5 +- .../antlr/semantic/scope/Namespace.java | 2 +- .../antlr/semantic/scope/SemanticContext.java | 2 +- .../legacy/antlr/semantic/scope/Symbol.java | 2 +- .../antlr/semantic/scope/SymbolTable.java | 9 +- .../antlr/semantic/scope/TypeSupplier.java | 7 +- .../sql/legacy/antlr/semantic/types/Type.java | 13 +- .../antlr/semantic/types/TypeExpression.java | 11 +- .../antlr/semantic/types/base/BaseType.java | 5 +- .../types/base/OpenSearchDataType.java | 11 +- .../semantic/types/base/OpenSearchIndex.java | 5 +- .../types/function/AggregateFunction.java | 16 +-- .../function/OpenSearchScalarFunction.java | 18 +-- .../types/function/ScalarFunction.java | 22 +-- .../types/operator/ComparisonOperator.java | 9 +- .../semantic/types/operator/JoinOperator.java | 9 +- .../semantic/types/operator/SetOperator.java | 7 +- .../antlr/semantic/types/special/Generic.java | 7 +- .../antlr/semantic/types/special/Product.java | 7 +- .../visitor/OpenSearchMappingLoader.java | 35 +++-- .../semantic/visitor/SemanticAnalyzer.java | 11 +- .../antlr/semantic/visitor/TypeChecker.java | 45 +++--- .../syntax/CaseInsensitiveCharStream.java | 2 +- .../syntax/SyntaxAnalysisErrorListener.java | 4 +- .../antlr/syntax/SyntaxAnalysisException.java | 4 +- .../visitor/AntlrSqlParseTreeVisitor.java | 91 ++++++------ .../visitor/EarlyExitAnalysisException.java | 2 +- .../visitor/GenericSqlParseTreeVisitor.java | 2 +- .../sql/legacy/antlr/visitor/Reducible.java | 2 +- .../visitor/UnsupportedSemanticVerifier.java | 16 +-- .../opensearch}/sql/legacy/cursor/Cursor.java | 2 +- .../sql/legacy/cursor/CursorType.java | 4 +- .../sql/legacy/cursor/DefaultCursor.java | 21 ++- .../sql/legacy/cursor/NullCursor.java | 2 +- .../sql/legacy/domain/ColumnTypeProvider.java | 11 +- .../sql/legacy/domain/Condition.java | 11 +- .../opensearch}/sql/legacy/domain/Delete.java | 2 +- .../opensearch}/sql/legacy/domain/Field.java | 7 +- .../opensearch}/sql/legacy/domain/From.java | 2 +- .../opensearch}/sql/legacy/domain/Having.java | 21 ++- .../sql/legacy/domain/IndexStatement.java | 2 +- .../sql/legacy/domain/JoinSelect.java | 5 +- .../sql/legacy/domain/KVValue.java | 2 +- .../sql/legacy/domain/MethodField.java | 7 +- .../opensearch}/sql/legacy/domain/Order.java | 2 +- .../sql/legacy/domain/Paramer.java | 13 +- .../opensearch}/sql/legacy/domain/Query.java | 2 +- .../sql/legacy/domain/QueryActionRequest.java | 4 +- .../sql/legacy/domain/QueryStatement.java | 2 +- .../sql/legacy/domain/ScriptMethodField.java | 3 +- .../sql/legacy/domain/SearchResult.java | 19 ++- .../opensearch}/sql/legacy/domain/Select.java | 13 +- .../sql/legacy/domain/TableOnJoinSelect.java | 2 +- .../opensearch}/sql/legacy/domain/Where.java | 2 +- .../legacy/domain/bucketpath/BucketPath.java | 2 +- .../sql/legacy/domain/bucketpath/Path.java | 2 +- .../sql/legacy/domain/hints/Hint.java | 2 +- .../sql/legacy/domain/hints/HintFactory.java | 11 +- .../sql/legacy/domain/hints/HintType.java | 2 +- .../legacy/esdomain/LocalClusterState.java | 29 ++-- .../sql/legacy/esdomain/OpenSearchClient.java | 13 +- .../legacy/esdomain/mapping/FieldMapping.java | 13 +- .../esdomain/mapping/FieldMappings.java | 7 +- .../esdomain/mapping/IndexMappings.java | 11 +- .../sql/legacy/esdomain/mapping/Mappings.java | 5 +- .../legacy/esdomain/mapping/TypeMappings.java | 7 +- .../SQLFeatureDisabledException.java | 4 +- .../SqlFeatureNotImplementedException.java | 2 +- .../legacy/exception/SqlParseException.java | 2 +- .../ActionRequestRestExecutorFactory.java | 12 +- .../legacy/executor/AsyncRestExecutor.java | 31 ++-- .../executor/ElasticDefaultRestExecutor.java | 25 ++-- .../legacy/executor/ElasticHitsExecutor.java | 7 +- .../legacy/executor/ElasticResultHandler.java | 5 +- .../sql/legacy/executor/Format.java | 7 +- .../executor/GetIndexRequestRestListener.java | 9 +- .../executor/QueryActionElasticExecutor.java | 41 +++--- .../sql/legacy/executor/RestExecutor.java | 7 +- .../adapter/QueryPlanQueryAction.java | 7 +- .../adapter/QueryPlanRequestBuilder.java | 13 +- .../sql/legacy/executor/csv/CSVResult.java | 3 +- .../executor/csv/CSVResultRestExecutor.java | 15 +- .../executor/csv/CSVResultsExtractor.java | 23 ++- .../executor/csv/CsvExtractorException.java | 2 +- ...ursorActionRequestRestExecutorFactory.java | 6 +- .../cursor/CursorAsyncRestExecutor.java | 25 ++-- .../executor/cursor/CursorCloseExecutor.java | 23 ++- .../executor/cursor/CursorRestExecutor.java | 5 +- .../executor/cursor/CursorResultExecutor.java | 35 +++-- .../format/BindingTupleResultSet.java | 11 +- .../sql/legacy/executor/format/DataRows.java | 2 +- .../executor/format/DateFieldFormatter.java | 15 +- .../legacy/executor/format/DateFormat.java | 2 +- .../executor/format/DeleteResultSet.java | 9 +- .../executor/format/DescribeResultSet.java | 19 ++- .../legacy/executor/format/ErrorMessage.java | 4 +- .../executor/format/ErrorMessageFactory.java | 2 +- .../format/OpenSearchErrorMessage.java | 4 +- .../format/PrettyFormatRestExecutor.java | 25 ++-- .../sql/legacy/executor/format/Protocol.java | 47 +++--- .../sql/legacy/executor/format/ResultSet.java | 5 +- .../sql/legacy/executor/format/Schema.java | 7 +- .../executor/format/SelectResultSet.java | 63 ++++---- .../legacy/executor/format/ShowResultSet.java | 15 +- .../executor/join/ElasticJoinExecutor.java | 37 +++-- .../legacy/executor/join/ElasticUtils.java | 19 ++- .../join/HashJoinComparisonStructure.java | 7 +- .../join/HashJoinElasticExecutor.java | 37 +++-- .../executor/join/MetaSearchResult.java | 2 +- .../join/NestedLoopsElasticExecutor.java | 31 ++-- .../join/QueryPlanElasticExecutor.java | 9 +- .../executor/join/SearchHitsResult.java | 5 +- .../executor/multi/ComperableHitResult.java | 7 +- .../legacy/executor/multi/MinusExecutor.java | 45 +++--- .../MinusOneFieldAndOptimizationResult.java | 7 +- .../multi/MultiRequestExecutorFactory.java | 8 +- .../legacy/executor/multi/UnionExecutor.java | 19 ++- .../legacy/expression/core/Expression.java | 8 +- .../expression/core/ExpressionFactory.java | 59 ++++---- .../builder/ArithmeticFunctionFactory.java | 12 +- .../core/builder/BinaryExpressionBuilder.java | 13 +- .../core/builder/ExpressionBuilder.java | 5 +- .../core/builder/UnaryExpressionBuilder.java | 13 +- .../core/operator/BinaryScalarOperator.java | 27 ++-- .../operator/DoubleBinaryScalarOperator.java | 15 +- .../operator/DoubleUnaryScalarOperator.java | 13 +- .../core/operator/ScalarOperation.java | 2 +- .../core/operator/ScalarOperator.java | 5 +- .../core/operator/UnaryScalarOperator.java | 17 ++- .../expression/domain/BindingTuple.java | 13 +- .../expression/model/ExprBooleanValue.java | 2 +- .../expression/model/ExprCollectionValue.java | 9 +- .../expression/model/ExprDoubleValue.java | 2 +- .../expression/model/ExprFloatValue.java | 2 +- .../expression/model/ExprIntegerValue.java | 2 +- .../expression/model/ExprLongValue.java | 2 +- .../expression/model/ExprMissingValue.java | 4 +- .../expression/model/ExprStringValue.java | 2 +- .../expression/model/ExprTupleValue.java | 7 +- .../legacy/expression/model/ExprValue.java | 2 +- .../expression/model/ExprValueFactory.java | 2 +- .../expression/model/ExprValueUtils.java | 13 +- .../sql/legacy/metrics/BasicCounter.java | 2 +- .../sql/legacy/metrics/Counter.java | 2 +- .../sql/legacy/metrics/GaugeMetric.java | 2 +- .../sql/legacy/metrics/Metric.java | 2 +- .../sql/legacy/metrics/MetricFactory.java | 4 +- .../sql/legacy/metrics/MetricName.java | 2 +- .../sql/legacy/metrics/Metrics.java | 5 +- .../sql/legacy/metrics/NumericMetric.java | 2 +- .../sql/legacy/metrics/RollingCounter.java | 7 +- .../sql/legacy/parser/CaseWhenParser.java | 11 +- .../sql/legacy/parser/ChildrenType.java | 9 +- .../sql/legacy/parser/ElasticLexer.java | 10 +- .../legacy/parser/ElasticSqlExprParser.java | 7 +- .../legacy/parser/ElasticSqlSelectParser.java | 4 +- .../sql/legacy/parser/FieldMaker.java | 23 ++- .../sql/legacy/parser/HavingParser.java | 9 +- .../sql/legacy/parser/NestedType.java | 13 +- .../sql/legacy/parser/SQLOdbcExpr.java | 2 +- .../parser/SQLParensIdentifierExpr.java | 2 +- .../sql/legacy/parser/ScriptFilter.java | 9 +- .../sql/legacy/parser/SelectParser.java | 2 +- .../sql/legacy/parser/SqlParser.java | 35 +++-- .../sql/legacy/parser/SubQueryExpression.java | 4 +- .../sql/legacy/parser/SubQueryParser.java | 15 +- .../sql/legacy/parser/WhereParser.java | 23 ++- .../plugin/OpenSearchSQLPluginConfig.java | 26 ++-- .../sql/legacy/plugin/RestSQLQueryAction.java | 42 +++--- .../sql/legacy/plugin/RestSqlAction.java | 74 +++++----- .../legacy/plugin/RestSqlSettingsAction.java | 23 ++- .../sql/legacy/plugin/RestSqlStatsAction.java | 23 ++- .../sql/legacy/plugin/SearchDao.java | 13 +- .../sql/legacy/plugin/SqlSettings.java | 15 +- .../legacy/query/AggregationQueryAction.java | 35 +++-- .../sql/legacy/query/DefaultQueryAction.java | 56 ++++---- .../sql/legacy/query/DeleteQueryAction.java | 10 +- .../sql/legacy/query/DescribeQueryAction.java | 8 +- .../legacy/query/OpenSearchActionFactory.java | 75 +++++----- .../sql/legacy/query/QueryAction.java | 33 +++-- .../sql/legacy/query/ShowQueryAction.java | 12 +- ...SqlElasticDeleteByQueryRequestBuilder.java | 2 +- .../query/SqlElasticRequestBuilder.java | 2 +- .../query/SqlOpenSearchRequestBuilder.java | 2 +- .../query/join/BackOffRetryStrategy.java | 13 +- .../join/HashJoinElasticRequestBuilder.java | 5 +- .../legacy/query/join/JoinRequestBuilder.java | 7 +- .../NestedLoopsElasticRequestBuilder.java | 17 ++- .../join/OpenSearchHashJoinQueryAction.java | 21 ++- .../query/join/OpenSearchJoinQueryAction.java | 27 ++-- .../OpenSearchJoinQueryActionFactory.java | 15 +- .../OpenSearchNestedLoopsQueryAction.java | 12 +- .../query/join/TableInJoinRequestBuilder.java | 9 +- .../sql/legacy/query/maker/AggMaker.java | 43 +++--- .../sql/legacy/query/maker/Maker.java | 49 ++++--- .../sql/legacy/query/maker/QueryMaker.java | 8 +- .../legacy/query/multi/MultiQueryAction.java | 19 ++- .../query/multi/MultiQueryRequestBuilder.java | 17 ++- .../legacy/query/multi/MultiQuerySelect.java | 4 +- .../OpenSearchMultiQueryActionFactory.java | 6 +- .../HashJoinQueryPlanRequestBuilder.java | 12 +- .../converter/SQLAggregationParser.java | 15 +- .../SQLExprToExpressionConverter.java | 21 ++- .../converter/SQLToOperatorConverter.java | 23 ++- .../core/BindingTupleQueryPlanner.java | 17 ++- .../legacy/query/planner/core/ColumnNode.java | 6 +- .../sql/legacy/query/planner/core/Config.java | 8 +- .../query/planner/core/ExecuteParams.java | 2 +- .../sql/legacy/query/planner/core/Plan.java | 4 +- .../legacy/query/planner/core/PlanNode.java | 2 +- .../query/planner/core/QueryParams.java | 7 +- .../query/planner/core/QueryPlanner.java | 29 ++-- .../query/planner/explain/Explanation.java | 16 +-- .../planner/explain/ExplanationFormat.java | 2 +- .../explain/JsonExplanationFormat.java | 9 +- .../planner/logical/LogicalOperator.java | 9 +- .../query/planner/logical/LogicalPlan.java | 39 +++-- .../planner/logical/LogicalPlanVisitor.java | 22 +-- .../query/planner/logical/node/Filter.java | 15 +- .../query/planner/logical/node/Group.java | 9 +- .../query/planner/logical/node/Join.java | 15 +- .../query/planner/logical/node/Project.java | 21 ++- .../query/planner/logical/node/Sort.java | 11 +- .../query/planner/logical/node/TableScan.java | 13 +- .../query/planner/logical/node/Top.java | 13 +- .../logical/rule/ProjectionPushDown.java | 17 ++- .../logical/rule/SelectionPushDown.java | 8 +- .../planner/physical/PhysicalOperator.java | 9 +- .../query/planner/physical/PhysicalPlan.java | 21 ++- .../legacy/query/planner/physical/Row.java | 2 +- .../planner/physical/estimation/Cost.java | 2 +- .../physical/estimation/Estimation.java | 15 +- .../physical/node/BatchPhysicalOperator.java | 17 ++- .../physical/node/join/BlockHashJoin.java | 25 ++-- .../physical/node/join/CombinedRow.java | 5 +- .../physical/node/join/DefaultHashTable.java | 15 +- .../planner/physical/node/join/HashTable.java | 5 +- .../physical/node/join/HashTableGroup.java | 9 +- .../physical/node/join/JoinAlgorithm.java | 25 ++-- .../physical/node/join/ListHashTable.java | 5 +- .../node/project/PhysicalProject.java | 19 ++- .../physical/node/scroll/BindingTupleRow.java | 9 +- .../physical/node/scroll/PhysicalScroll.java | 23 ++- .../planner/physical/node/scroll/Scroll.java | 31 ++-- .../SearchAggregationResponseHelper.java | 17 ++- .../physical/node/scroll/SearchHitRow.java | 9 +- .../planner/physical/node/sort/QuickSort.java | 23 ++- .../planner/resource/ResourceManager.java | 17 ++- .../legacy/query/planner/resource/Stats.java | 2 +- .../resource/blocksize/AdaptiveBlockSize.java | 2 +- .../planner/resource/blocksize/BlockSize.java | 2 +- .../planner/resource/monitor/Monitor.java | 2 +- .../resource/monitor/TotalMemoryMonitor.java | 8 +- .../request/PreparedStatementRequest.java | 5 +- .../sql/legacy/request/SqlRequest.java | 13 +- .../sql/legacy/request/SqlRequestFactory.java | 15 +- .../sql/legacy/request/SqlRequestParam.java | 9 +- .../sql/legacy/rewriter/RewriteRule.java | 3 +- .../legacy/rewriter/RewriteRuleExecutor.java | 3 +- .../sql/legacy/rewriter/alias/Identifier.java | 2 +- .../sql/legacy/rewriter/alias/Table.java | 6 +- .../alias/TableAliasPrefixRemoveRule.java | 7 +- .../AnonymizeSensitiveDataRule.java | 4 +- .../identifier/UnquoteIdentifierRule.java | 10 +- .../legacy/rewriter/join/JoinRewriteRule.java | 15 +- .../matchtoterm/TermFieldRewriter.java | 9 +- .../rewriter/matchtoterm/TermFieldScope.java | 9 +- .../matchtoterm/VerificationException.java | 2 +- .../sql/legacy/rewriter/nestedfield/From.java | 6 +- .../rewriter/nestedfield/Identifier.java | 2 +- .../nestedfield/NestedFieldProjection.java | 39 +++-- .../nestedfield/NestedFieldRewriter.java | 7 +- .../rewriter/nestedfield/SQLClause.java | 5 +- .../legacy/rewriter/nestedfield/Scope.java | 7 +- .../legacy/rewriter/nestedfield/Select.java | 3 +- .../legacy/rewriter/nestedfield/Where.java | 2 +- .../rewriter/ordinal/OrdinalRewriterRule.java | 9 +- .../rewriter/parent/SQLExprParentSetter.java | 2 +- .../parent/SQLExprParentSetterRule.java | 4 +- .../rewriter/subquery/NestedQueryContext.java | 3 +- .../rewriter/subquery/RewriterContext.java | 3 +- .../subquery/SubQueryRewriteRule.java | 9 +- .../rewriter/subquery/SubQueryRewriter.java | 8 +- .../subquery/rewriter/InRewriter.java | 4 +- .../rewriter/NestedExistsRewriter.java | 4 +- .../rewriter/subquery/rewriter/Rewriter.java | 2 +- .../subquery/rewriter/RewriterFactory.java | 5 +- .../rewriter/SubqueryAliasRewriter.java | 3 +- .../rewriter/subquery/utils/FindSubQuery.java | 3 +- .../spatial/BoundingBoxFilterParams.java | 2 +- .../sql/legacy/spatial/CellFilterParams.java | 2 +- .../legacy/spatial/DistanceFilterParams.java | 2 +- .../opensearch}/sql/legacy/spatial/Point.java | 2 +- .../legacy/spatial/PolygonFilterParams.java | 2 +- .../spatial/RangeDistanceFilterParams.java | 2 +- .../legacy/spatial/SpatialParamsFactory.java | 3 +- .../legacy/spatial/WktToGeoJsonConverter.java | 5 +- .../sql/legacy/utils/JsonPrettyFormatter.java | 5 +- .../sql/legacy/utils/LogUtils.java | 5 +- .../sql/legacy/utils/QueryDataAnonymizer.java | 8 +- .../sql/legacy/utils/SQLFunctions.java | 23 ++- .../sql/legacy/utils/StringUtils.java | 3 +- .../opensearch}/sql/legacy/utils/Util.java | 17 ++- .../legacy/antlr/SymbolSimilarityTest.java | 11 +- .../sql/legacy/antlr/SyntaxAnalysisTest.java | 13 +- ...SemanticAnalyzerAggregateFunctionTest.java | 2 +- .../semantic/SemanticAnalyzerBasicTest.java | 53 ++++--- .../semantic/SemanticAnalyzerConfigTest.java | 16 +-- .../SemanticAnalyzerConstantTest.java | 2 +- .../SemanticAnalyzerESScalarFunctionTest.java | 2 +- .../SemanticAnalyzerFieldTypeTest.java | 6 +- .../SemanticAnalyzerFromClauseTest.java | 2 +- .../SemanticAnalyzerIdentifierTest.java | 2 +- .../SemanticAnalyzerMultiQueryTest.java | 2 +- .../SemanticAnalyzerOperatorTest.java | 2 +- .../SemanticAnalyzerScalarFunctionTest.java | 4 +- .../SemanticAnalyzerSubqueryTest.java | 4 +- .../semantic/SemanticAnalyzerTestBase.java | 31 ++-- .../antlr/semantic/SemanticAnalyzerTests.java | 2 +- .../antlr/semantic/scope/EnvironmentTest.java | 27 ++-- .../semantic/scope/SemanticContextTest.java | 2 +- .../antlr/semantic/scope/SymbolTableTest.java | 31 ++-- .../semantic/scope/TypeSupplierTest.java | 12 +- .../antlr/semantic/types/BaseTypeTest.java | 42 +++--- .../antlr/semantic/types/GenericTypeTest.java | 22 +-- .../antlr/semantic/types/ProductTypeTest.java | 21 ++- .../semantic/types/TypeExpressionTest.java | 27 ++-- .../visitor/AntlrSqlParseTreeVisitorTest.java | 31 ++-- .../esdomain/mapping/FieldMappingTest.java | 12 +- .../esdomain/mapping/FieldMappingsTest.java | 23 ++- .../executor/AsyncRestExecutorTest.java | 35 +++-- .../legacy/executor/csv/CSVResultTest.java | 9 +- .../format/DateFieldFormatterTest.java | 11 +- .../legacy/executor/format/ResultSetTest.java | 4 +- .../legacy/plugin/RestSQLQueryActionTest.java | 22 +-- .../legacy/rewriter/alias/IdentifierTest.java | 4 +- .../alias/TableAliasPrefixRemoveRuleTest.java | 4 +- .../sql/legacy/rewriter/alias/TableTest.java | 4 +- .../unittest/AggregationOptionTest.java | 15 +- .../sql/legacy/unittest/DateFormatTest.java | 49 ++++--- .../legacy/unittest/DateFunctionsTest.java | 20 +-- .../unittest/ErrorMessageFactoryTest.java | 12 +- .../sql/legacy/unittest/FormatTest.java | 13 +- .../sql/legacy/unittest/HavingTest.java | 45 +++--- .../sql/legacy/unittest/JSONRequestTest.java | 47 +++--- .../unittest/LocalClusterStateTest.java | 37 +++-- .../legacy/unittest/MathFunctionsTest.java | 14 +- .../unittest/NestedFieldProjectionTest.java | 63 ++++---- .../unittest/NestedFieldRewriterTest.java | 17 ++- .../legacy/unittest/OpenSearchClientTest.java | 24 ++-- .../PreparedStatementRequestTest.java | 9 +- .../legacy/unittest/QueryFunctionsTest.java | 41 +++--- .../unittest/SqlRequestFactoryTest.java | 16 +-- .../legacy/unittest/SqlRequestParamTest.java | 28 ++-- .../legacy/unittest/StringOperatorsTest.java | 14 +- .../unittest/WhereWithBoolConditionTest.java | 27 ++-- .../unittest/cursor/DefaultCursorTest.java | 17 ++- .../domain/ColumnTypeProviderTest.java | 18 +-- .../executor/DeleteResultSetTest.java | 26 ++-- .../format/BindingTupleResultSetTest.java | 29 ++-- .../format/CSVResultsExtractorTest.java | 19 ++- .../executor/join/ElasticUtilsTest.java | 15 +- .../expression/core/BinaryExpressionTest.java | 16 +-- .../core/CompoundExpressionTest.java | 15 +- .../expression/core/ExpressionTest.java | 15 +- .../expression/core/RefExpressionTest.java | 26 ++-- .../expression/core/UnaryExpressionTest.java | 14 +- .../expression/model/ExprValueUtilsTest.java | 12 +- .../unittest/metrics/BasicCounterTest.java | 8 +- .../unittest/metrics/GaugeMetricTest.java | 8 +- .../legacy/unittest/metrics/MetricsTest.java | 20 ++- .../unittest/metrics/NumericMetricTest.java | 10 +- .../unittest/metrics/RollingCounterTest.java | 17 ++- .../unittest/parser/BucketPathTest.java | 10 +- .../unittest/parser/FieldMakerTest.java | 16 +-- .../legacy/unittest/parser/SqlParserTest.java | 77 +++++----- .../unittest/parser/SubQueryParserTest.java | 22 +-- .../BindingTupleQueryPlannerExecuteTest.java | 37 +++-- .../planner/OpenSearchActionFactoryTest.java | 12 +- .../planner/QueryPlannerBatchTest.java | 25 ++-- .../planner/QueryPlannerConfigTest.java | 22 +-- .../planner/QueryPlannerExecuteTest.java | 12 +- .../planner/QueryPlannerExplainTest.java | 4 +- .../planner/QueryPlannerMonitorTest.java | 14 +- .../unittest/planner/QueryPlannerTest.java | 61 ++++---- .../converter/SQLAggregationParserTest.java | 33 +++-- .../SQLExprToExpressionConverterTest.java | 27 ++-- .../converter/SQLToOperatorConverterTest.java | 20 +-- .../SearchAggregationResponseHelperTest.java | 31 ++-- .../query/DefaultQueryActionTest.java | 61 ++++---- .../rewriter/RewriteRuleExecutorTest.java | 21 ++- .../identifier/UnquoteIdentifierRuleTest.java | 6 +- .../rewriter/inline/AliasInliningTests.java | 33 +++-- .../ordinal/OrdinalRewriterRuleTest.java | 10 +- .../parent/SQLExprParentSetterRuleTest.java | 10 +- .../parent/SQLExprParentSetterTest.java | 10 +- .../subquery/ExistsSubQueryRewriterTest.java | 8 +- .../subquery/InSubqueryRewriterTest.java | 8 +- .../subquery/NestedQueryContextTest.java | 12 +- .../subquery/SubQueryRewriteRuleTest.java | 17 ++- .../subquery/SubQueryRewriterTestBase.java | 6 +- .../rewriter/SubqueryAliasRewriterTest.java | 10 +- .../subquery/utils/FindSubQueryTest.java | 10 +- .../rewriter/term/TermFieldRewriterTest.java | 18 +-- .../spatial/WktToGeoJsonConverterTest.java | 6 +- .../unittest/utils/BackticksUnquoterTest.java | 14 +- .../legacy/unittest/utils/LogUtilsTest.java | 13 +- .../unittest/utils/PrettyFormatterTest.java | 15 +- .../utils/QueryDataAnonymizerTest.java | 4 +- .../unittest/utils/SQLFunctionsTest.java | 33 +++-- .../unittest/utils/StringUtilsTest.java | 11 +- .../sql/legacy/unittest/utils/UtilTest.java | 9 +- .../sql/legacy/util/AggregationUtils.java | 2 +- .../sql/legacy/util/CheckScriptContents.java | 59 ++++---- .../sql/legacy/util/HasFieldWithValue.java | 5 +- .../sql/legacy/util/MatcherUtils.java | 33 +++-- .../util/MultipleIndexClusterUtils.java | 25 ++-- .../sql/legacy/util/SqlExplainUtils.java | 13 +- .../sql/legacy/util/SqlParserUtils.java | 6 +- .../sql/legacy/util/TestUtils.java | 23 ++- .../sql/legacy/util/TestsConstants.java | 2 +- opensearch/build.gradle | 4 +- .../opensearch/client/OpenSearchClient.java | 8 +- .../client/OpenSearchNodeClient.java | 8 +- .../client/OpenSearchRestClient.java | 8 +- .../data/type/OpenSearchDataType.java | 8 +- .../sql/opensearch/data/utils/Content.java | 2 +- .../opensearch/data/utils/ObjectContent.java | 2 +- .../data/utils/OpenSearchJsonContent.java | 2 +- .../data/value/OpenSearchDateFormatters.java | 2 +- .../data/value/OpenSearchExprBinaryValue.java | 10 +- .../value/OpenSearchExprGeoPointValue.java | 10 +- .../data/value/OpenSearchExprIpValue.java | 10 +- .../value/OpenSearchExprTextKeywordValue.java | 8 +- .../data/value/OpenSearchExprTextValue.java | 8 +- .../value/OpenSearchExprValueFactory.java | 90 ++++++------ .../executor/OpenSearchExecutionEngine.java | 18 +-- .../protector/ExecutionProtector.java | 6 +- .../protector/NoopExecutionProtector.java | 4 +- .../OpenSearchExecutionProtector.java | 34 ++--- .../protector/ResourceMonitorPlan.java | 10 +- .../sql/opensearch/mapping/IndexMapping.java | 2 +- .../monitor/OpenSearchMemoryHealthy.java | 2 +- .../monitor/OpenSearchResourceMonitor.java | 6 +- .../logical/OpenSearchLogicalIndexAgg.java | 16 +-- .../logical/OpenSearchLogicalIndexScan.java | 12 +- ...OpenSearchLogicalPlanOptimizerFactory.java | 24 ++-- .../logical/rule/MergeAggAndIndexScan.java | 14 +- .../logical/rule/MergeAggAndRelation.java | 14 +- .../logical/rule/MergeFilterAndRelation.java | 14 +- .../logical/rule/MergeLimitAndIndexScan.java | 12 +- .../logical/rule/MergeLimitAndRelation.java | 14 +- .../logical/rule/MergeSortAndIndexAgg.java | 20 +-- .../logical/rule/MergeSortAndIndexScan.java | 16 +-- .../logical/rule/MergeSortAndRelation.java | 14 +- .../logical/rule/OptimizationRuleUtils.java | 12 +- .../logical/rule/PushProjectAndIndexScan.java | 16 +-- .../logical/rule/PushProjectAndRelation.java | 18 +-- .../request/OpenSearchQueryRequest.java | 6 +- .../opensearch/request/OpenSearchRequest.java | 6 +- .../request/OpenSearchScrollRequest.java | 6 +- .../system/OpenSearchCatIndicesRequest.java | 12 +- .../OpenSearchDescribeIndexRequest.java | 26 ++-- .../system/OpenSearchSystemRequest.java | 4 +- .../OpenSearchAggregationResponseParser.java | 2 +- .../response/OpenSearchResponse.java | 8 +- .../response/error/ErrorMessage.java | 2 +- .../response/error/ErrorMessageFactory.java | 2 +- .../error/OpenSearchErrorMessage.java | 2 +- .../opensearch/security/SecurityAccess.java | 2 +- .../setting/OpenSearchSettings.java | 4 +- .../opensearch/storage/OpenSearchIndex.java | 40 +++--- .../storage/OpenSearchIndexScan.java | 22 +-- .../storage/OpenSearchStorageEngine.java | 14 +- .../script/ExpressionScriptEngine.java | 10 +- .../storage/script/ScriptUtils.java | 6 +- .../aggregation/AggregationQueryBuilder.java | 24 ++-- .../ExpressionAggregationScript.java | 12 +- .../ExpressionAggregationScriptFactory.java | 4 +- ...xpressionAggregationScriptLeafFactory.java | 4 +- .../dsl/AggregationBuilderHelper.java | 14 +- .../dsl/BucketAggregationBuilder.java | 6 +- .../dsl/MetricAggregationBuilder.java | 18 +-- .../storage/script/core/ExpressionScript.java | 22 +-- .../script/filter/ExpressionFilterScript.java | 14 +- .../filter/ExpressionFilterScriptFactory.java | 4 +- .../ExpressionFilterScriptLeafFactory.java | 4 +- .../script/filter/FilterQueryBuilder.java | 26 ++-- .../script/filter/lucene/LuceneQuery.java | 14 +- .../script/filter/lucene/RangeQuery.java | 6 +- .../script/filter/lucene/TermQuery.java | 6 +- .../script/filter/lucene/WildcardQuery.java | 6 +- .../storage/script/sort/SortQueryBuilder.java | 10 +- .../DefaultExpressionSerializer.java | 4 +- .../serialization/ExpressionSerializer.java | 4 +- .../storage/system/OpenSearchSystemIndex.java | 26 ++-- .../system/OpenSearchSystemIndexScan.java | 8 +- .../system/OpenSearchSystemIndexSchema.java | 6 +- .../client/OpenSearchNodeClientTest.java | 18 +-- .../client/OpenSearchRestClientTest.java | 18 +-- .../data/type/OpenSearchDataTypeTest.java | 10 +- .../value/OpenSearchExprBinaryValueTest.java | 4 +- .../OpenSearchExprGeoPointValueTest.java | 6 +- .../data/value/OpenSearchExprIpValueTest.java | 4 +- .../OpenSearchExprTextKeywordValueTest.java | 6 +- .../value/OpenSearchExprTextValueTest.java | 6 +- .../value/OpenSearchExprValueFactoryTest.java | 78 +++++----- .../OpenSearchExecutionEngineTest.java | 30 ++-- .../OpenSearchExecutionProtectorTest.java | 70 ++++----- .../executor/ResourceMonitorPlanTest.java | 12 +- .../protector/NoopExecutionProtectorTest.java | 6 +- .../opensearch/mapping/IndexMappingTest.java | 2 +- .../monitor/OpenSearchMemoryHealthyTest.java | 4 +- .../OpenSearchResourceMonitorTest.java | 4 +- .../logical/OpenSearchLogicOptimizerTest.java | 46 +++--- .../OpenSearchLogicalIndexScanTest.java | 4 +- .../request/OpenSearchQueryRequestTest.java | 6 +- .../request/OpenSearchScrollRequestTest.java | 4 +- .../OpenSearchCatIndicesRequestTest.java | 10 +- .../OpenSearchDescribeIndexRequestTest.java | 16 +-- .../response/AggregationResponseUtils.java | 2 +- ...enSearchAggregationResponseParserTest.java | 4 +- .../response/OpenSearchResponseTest.java | 10 +- .../error/ErrorMessageFactoryTest.java | 2 +- .../response/error/ErrorMessageTest.java | 4 +- .../error/OpenSearchErrorMessageTest.java | 4 +- .../setting/OpenSearchSettingsTest.java | 6 +- .../OpenSearchDefaultImplementorTest.java | 6 +- .../storage/OpenSearchIndexScanTest.java | 20 +-- .../storage/OpenSearchIndexTest.java | 92 ++++++------ .../storage/OpenSearchStorageEngineTest.java | 12 +- .../script/ExpressionScriptEngineTest.java | 12 +- .../AggregationQueryBuilderTest.java | 44 +++--- ...xpressionAggregationScriptFactoryTest.java | 8 +- .../ExpressionAggregationScriptTest.java | 20 +-- .../aggregation/GroupSortOrderTest.java | 20 +-- .../dsl/BucketAggregationBuilderTest.java | 16 +-- .../dsl/MetricAggregationBuilderTest.java | 28 ++-- .../ExpressionFilterScriptFactoryTest.java | 8 +- .../filter/ExpressionFilterScriptTest.java | 30 ++-- .../script/filter/FilterQueryBuilderTest.java | 26 ++-- .../script/filter/lucene/LuceneQueryTest.java | 10 +- .../script/filter/lucene/RangeQueryTest.java | 10 +- .../script/sort/SortQueryBuilderTest.java | 12 +- .../DefaultExpressionSerializerTest.java | 24 ++-- .../system/OpenSearchSystemIndexScanTest.java | 8 +- .../system/OpenSearchSystemIndexTest.java | 28 ++-- .../sql/opensearch/utils/Utils.java | 24 ++-- plugin/build.gradle | 8 +- .../opensearch}/sql/plugin/SQLPlugin.java | 30 ++-- .../request/PPLQueryRequestFactory.java | 10 +- .../plugin/rest/OpenSearchPluginConfig.java | 26 ++-- .../sql/plugin/rest/RestPPLQueryAction.java | 52 +++---- .../sql/plugin/rest/RestPPLStatsAction.java | 8 +- ppl/build.gradle | 6 +- .../opensearch}/sql/ppl/PPLService.java | 48 +++---- .../sql/ppl/antlr/PPLSyntaxParser.java | 10 +- .../sql/ppl/config/PPLServiceConfig.java | 18 +-- .../sql/ppl/domain/PPLQueryRequest.java | 4 +- .../sql/ppl/domain/PPLQueryResponse.java | 2 +- .../sql/ppl/parser/AstBuilder.java | 78 +++++----- .../sql/ppl/parser/AstExpressionBuilder.java | 104 +++++++------- .../sql/ppl/utils/ArgumentFactory.java | 26 ++-- .../sql/ppl/utils/PPLQueryDataAnonymizer.java | 76 +++++----- .../sql/ppl/utils/UnresolvedPlanHelper.java | 8 +- .../opensearch}/sql/ppl/PPLServiceTest.java | 26 ++-- .../sql/ppl/antlr/PPLSyntaxParserTest.java | 4 +- .../sql/ppl/config/PPLServiceConfigTest.java | 4 +- .../sql/ppl/domain/PPLQueryRequestTest.java | 4 +- .../sql/ppl/domain/PPLQueryResponseTest.java | 2 +- .../sql/ppl/parser/AstBuilderTest.java | 66 ++++----- .../ppl/parser/AstExpressionBuilderTest.java | 68 ++++----- .../sql/ppl/utils/ArgumentFactoryTest.java | 30 ++-- .../ppl/utils/PPLQueryDataAnonymizerTest.java | 8 +- .../ppl/utils/UnresolvedPlanHelperTest.java | 14 +- protocol/build.gradle | 2 +- .../sql/protocol/response/QueryResult.java | 10 +- .../response/format/CsvResponseFormatter.java | 2 +- .../response/format/ErrorFormatter.java | 2 +- .../format/FlatResponseFormatter.java | 4 +- .../sql/protocol/response/format/Format.java | 2 +- .../format/JdbcResponseFormatter.java | 18 +-- .../format/JsonResponseFormatter.java | 12 +- .../response/format/RawResponseFormatter.java | 2 +- .../response/format/ResponseFormatter.java | 2 +- .../format/SimpleJsonResponseFormatter.java | 4 +- .../protocol/response/QueryResultTest.java | 12 +- .../format/CsvResponseFormatterTest.java | 20 +-- .../protocol/response/format/FormatTest.java | 2 +- .../format/JdbcResponseFormatterTest.java | 40 +++--- .../format/RawResponseFormatterTest.java | 20 +-- .../SimpleJsonResponseFormatterTest.java | 22 +-- sql-jdbc/README.md | 18 +-- sql-jdbc/build.gradle | 10 +- .../opensearch}/jdbc/ConnectionImpl.java | 36 ++--- .../jdbc/DatabaseMetaDataImpl.java | 18 +-- .../opensearch}/jdbc/Driver.java | 18 +-- .../jdbc/OpenSearchConnection.java | 2 +- .../jdbc/OpenSearchDataSource.java | 22 +-- .../opensearch}/jdbc/OpenSearchVersion.java | 2 +- .../jdbc/PreparedStatementImpl.java | 18 +-- .../opensearch}/jdbc/ResultSetImpl.java | 42 +++--- .../jdbc/ResultSetMetaDataImpl.java | 6 +- .../opensearch}/jdbc/StatementImpl.java | 20 +-- .../jdbc/auth/AuthenticationType.java | 2 +- .../jdbc/config/AuthConnectionProperty.java | 4 +- .../AwsCredentialsProviderProperty.java | 2 +- .../jdbc/config/BoolConnectionProperty.java | 2 +- .../jdbc/config/ConnectionConfig.java | 10 +- .../jdbc/config/ConnectionProperty.java | 2 +- .../config/ConnectionPropertyException.java | 2 +- .../jdbc/config/FetchSizeProperty.java | 2 +- .../jdbc/config/HostConnectionProperty.java | 2 +- ...ostnameVerificationConnectionProperty.java | 2 +- .../jdbc/config/IntConnectionProperty.java | 2 +- .../KeyStoreLocationConnectionProperty.java | 2 +- .../KeyStorePasswordConnectionProperty.java | 2 +- .../KeyStoreTypeConnectionProperty.java | 2 +- .../config/LogLevelConnectionProperty.java | 4 +- .../config/LogOutputConnectionProperty.java | 2 +- .../LoginTimeoutConnectionProperty.java | 2 +- .../config/PasswordConnectionProperty.java | 2 +- .../jdbc/config/PathConnectionProperty.java | 2 +- .../jdbc/config/PortConnectionProperty.java | 2 +- .../jdbc/config/RegionConnectionProperty.java | 2 +- .../RequestCompressionConnectionProperty.java | 2 +- .../jdbc/config/StringConnectionProperty.java | 2 +- .../TrustSelfSignedConnectionProperty.java | 2 +- .../TrustStoreLocationConnectionProperty.java | 2 +- .../TrustStorePasswordConnectionProperty.java | 2 +- .../TrustStoreTypeConnectionProperty.java | 2 +- .../jdbc/config/UseSSLConnectionProperty.java | 2 +- .../jdbc/config/UserConnectionProperty.java | 2 +- .../jdbc/internal/JdbcWrapper.java | 2 +- .../opensearch}/jdbc/internal/Version.java | 2 +- .../exceptions/ObjectClosedException.java | 2 +- .../jdbc/internal/results/ColumnMetaData.java | 6 +- .../jdbc/internal/results/Cursor.java | 2 +- .../jdbc/internal/results/Row.java | 2 +- .../jdbc/internal/results/Schema.java | 4 +- .../jdbc/internal/util/AwsHostNameUtil.java | 2 +- .../jdbc/internal/util/JavaUtil.java | 2 +- .../jdbc/internal/util/SqlParser.java | 2 +- .../jdbc/internal/util/UrlParser.java | 12 +- .../jdbc/logging/FilePrintWriterLogger.java | 2 +- .../opensearch}/jdbc/logging/Layout.java | 2 +- .../opensearch}/jdbc/logging/LogLevel.java | 2 +- .../opensearch}/jdbc/logging/Logger.java | 2 +- .../jdbc/logging/LoggerFactory.java | 2 +- .../jdbc/logging/LoggingSource.java | 2 +- .../opensearch}/jdbc/logging/NoOpLogger.java | 2 +- .../jdbc/logging/PrintWriterLogger.java | 2 +- .../jdbc/logging/StandardLayout.java | 2 +- .../jdbc/protocol/ClusterMetadata.java | 4 +- .../jdbc/protocol/ColumnDescriptor.java | 2 +- .../jdbc/protocol/ConnectionResponse.java | 2 +- .../jdbc/protocol/JdbcDateTimeFormatter.java | 2 +- .../jdbc/protocol/JdbcQueryParam.java | 2 +- .../jdbc/protocol/JdbcQueryRequest.java | 2 +- .../opensearch}/jdbc/protocol/Parameter.java | 2 +- .../opensearch}/jdbc/protocol/Protocol.java | 4 +- .../jdbc/protocol/ProtocolFactory.java | 6 +- .../jdbc/protocol/QueryRequest.java | 2 +- .../jdbc/protocol/QueryResponse.java | 2 +- .../jdbc/protocol/RequestError.java | 2 +- .../InternalServerErrorException.java | 2 +- .../MalformedResponseException.java | 2 +- .../exceptions/ResponseException.java | 2 +- .../jdbc/protocol/http/HttpException.java | 4 +- .../protocol/http/HttpResponseHandler.java | 4 +- .../protocol/http/JdbcCursorQueryRequest.java | 6 +- .../protocol/http/JsonClusterMetadata.java | 6 +- .../protocol/http/JsonConnectionResponse.java | 6 +- .../protocol/http/JsonCursorHttpProtocol.java | 10 +- .../http/JsonCursorHttpProtocolFactory.java | 8 +- .../protocol/http/JsonCursorQueryRequest.java | 6 +- .../jdbc/protocol/http/JsonHttpProtocol.java | 20 +-- .../http/JsonHttpProtocolFactory.java | 8 +- .../http/JsonHttpResponseHandler.java | 6 +- .../protocol/http/JsonOpenSearchVersion.java | 4 +- .../jdbc/protocol/http/JsonQueryRequest.java | 6 +- .../jdbc/protocol/http/JsonQueryResponse.java | 8 +- .../opensearch}/jdbc/transport/Transport.java | 2 +- .../jdbc/transport/TransportException.java | 2 +- .../jdbc/transport/TransportFactory.java | 6 +- .../ApacheHttpClientConnectionFactory.java | 2 +- .../transport/http/ApacheHttpTransport.java | 16 +-- .../http/ApacheHttpTransportFactory.java | 10 +- .../jdbc/transport/http/HttpParam.java | 2 +- .../jdbc/transport/http/HttpTransport.java | 6 +- .../jdbc/transport/http/JclLoggerAdapter.java | 6 +- .../transport/http/LoggingInputStream.java | 2 +- .../LoggingManagedHttpClientConnection.java | 2 +- .../transport/http/LoggingOutputStream.java | 4 +- .../AWSRequestSigningApacheInterceptor.java | 4 +- .../jdbc/types/BaseTypeConverter.java | 2 +- .../opensearch}/jdbc/types/BinaryType.java | 2 +- .../opensearch}/jdbc/types/BooleanType.java | 2 +- .../opensearch}/jdbc/types/ByteType.java | 2 +- .../opensearch}/jdbc/types/DateType.java | 2 +- .../opensearch}/jdbc/types/DoubleType.java | 2 +- .../opensearch}/jdbc/types/FloatType.java | 2 +- .../opensearch}/jdbc/types/IntegerType.java | 2 +- .../opensearch}/jdbc/types/LongType.java | 2 +- .../opensearch}/jdbc/types/NumberType.java | 2 +- .../jdbc/types/OpenSearchType.java | 4 +- .../opensearch}/jdbc/types/ShortType.java | 2 +- .../opensearch}/jdbc/types/StringType.java | 2 +- .../opensearch}/jdbc/types/TimeType.java | 2 +- .../opensearch}/jdbc/types/TimestampType.java | 2 +- .../opensearch}/jdbc/types/TypeConverter.java | 2 +- .../jdbc/types/TypeConverters.java | 2 +- .../opensearch}/jdbc/types/TypeHelper.java | 2 +- .../UnrecognizedOpenSearchTypeException.java | 2 +- .../META-INF/services/java.sql.Driver | 2 +- .../opensearch}/jdbc/ConnectionTests.java | 26 ++-- .../opensearch}/jdbc/CursorTests.java | 16 +-- .../opensearch}/jdbc/DataSourceTests.java | 26 ++-- .../jdbc/DatabaseMetaDataTests.java | 32 ++--- .../opensearch}/jdbc/DriverTests.java | 8 +- .../jdbc/PreparedStatementTests.java | 26 ++-- .../jdbc/ResultSetMetaDataTests.java | 8 +- .../opensearch}/jdbc/ResultSetTests.java | 30 ++-- .../opensearch}/jdbc/SSLClientAuthTests.java | 18 +-- .../opensearch}/jdbc/SSLConnectionTests.java | 16 +-- .../jdbc/SSLHostnameVerificationTests.java | 12 +- .../opensearch}/jdbc/StatementTests.java | 34 ++--- .../jdbc/config/ConnectionConfigTests.java | 8 +- .../internal/util/AwsHostnameUtilTests.java | 2 +- .../jdbc/internal/util/SqlParserTests.java | 2 +- .../jdbc/internal/util/UrlParserTests.java | 16 +-- .../jdbc/protocol/JsonHttpProtocolTests.java | 32 ++--- .../http/JsonCursorQueryRequestTests.java | 4 +- .../opensearch}/jdbc/test/KeyValuePairs.java | 2 +- .../test/PerClassWireMockServerExtension.java | 2 +- .../test/PerTestWireMockServerExtension.java | 2 +- .../opensearch}/jdbc/test/TLSServer.java | 6 +- .../opensearch}/jdbc/test/TestResources.java | 2 +- .../jdbc/test/UTCTimeZoneTestExtension.java | 2 +- .../jdbc/test/WireMockServerHelpers.java | 8 +- .../MockCloseableHttpResponseBuilder.java | 2 +- .../jdbc/test/mocks/MockHttpTransport.java | 10 +- .../jdbc/test/mocks/MockOpenSearch.java | 4 +- .../jdbc/test/mocks/MockResultSet.java | 2 +- .../test/mocks/MockResultSetMetaData.java | 6 +- .../jdbc/test/mocks/MockResultSetRows.java | 2 +- .../jdbc/test/mocks/QueryMock.java | 10 +- ...SRequestSigningApacheInterceptorTests.java | 4 +- .../jdbc/types/BinaryTypeTests.java | 2 +- .../opensearch}/jdbc/types/ByteTypeTests.java | 2 +- .../opensearch}/jdbc/types/DateTypeTests.java | 4 +- .../opensearch}/jdbc/types/FloatTypeTest.java | 4 +- .../jdbc/types/IntegerTypeTests.java | 2 +- .../jdbc/types/KeywordTypeTests.java | 2 +- .../opensearch}/jdbc/types/LongTypeTests.java | 2 +- .../jdbc/types/ShortTypeTests.java | 2 +- .../opensearch}/jdbc/types/TimeTypeTest.java | 4 +- .../jdbc/types/TimestampTypeTests.java | 4 +- .../opensearch}/jdbc/types/TypesTests.java | 2 +- sql-odbc/docs/dev/Pagination.md | 2 +- sql/build.gradle | 4 +- .../opensearch}/sql/sql/SQLService.java | 38 ++--- .../sql/sql/antlr/SQLSyntaxParser.java | 10 +- .../sql/sql/config/SQLServiceConfig.java | 18 +-- .../sql/sql/domain/SQLQueryRequest.java | 4 +- .../sql/sql/parser/AstAggregationBuilder.java | 24 ++-- .../sql/sql/parser/AstBuilder.java | 60 ++++---- .../sql/sql/parser/AstExpressionBuilder.java | 134 +++++++++--------- .../sql/parser/AstHavingFilterBuilder.java | 8 +- .../sql/sql/parser/AstSortBuilder.java | 30 ++-- .../sql/sql/parser/ParserUtils.java | 10 +- .../sql/parser/context/ParsingContext.java | 2 +- .../parser/context/QuerySpecification.java | 50 +++---- .../opensearch}/sql/sql/SQLServiceTest.java | 22 +-- .../sql/sql/antlr/SQLSyntaxParserTest.java | 6 +- .../sql/sql/config/SQLServiceConfigTest.java | 4 +- .../sql/sql/domain/SQLQueryRequestTest.java | 6 +- .../sql/parser/AstAggregationBuilderTest.java | 34 ++--- .../sql/sql/parser/AstBuilderTest.java | 54 +++---- .../sql/parser/AstExpressionBuilderTest.java | 64 ++++----- .../parser/AstHavingFilterBuilderTest.java | 16 +-- .../parser/AstQualifiedNameBuilderTest.java | 14 +- .../sql/sql/parser/AstSortBuilderTest.java | 32 ++--- .../context/QuerySpecificationTest.java | 34 ++--- 1249 files changed, 7970 insertions(+), 8225 deletions(-) rename common/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/common/antlr/CaseInsensitiveCharStream.java (97%) rename common/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/common/antlr/SyntaxAnalysisErrorListener.java (97%) rename common/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/common/antlr/SyntaxCheckException.java (94%) rename common/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/common/response/ResponseListener.java (95%) rename common/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/common/setting/Settings.java (95%) rename common/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/common/utils/LogUtils.java (97%) rename common/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/common/utils/StringUtils.java (98%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/AnalysisContext.java (96%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/Analyzer.java (77%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/ExpressionAnalyzer.java (74%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/ExpressionReferenceOptimizer.java (82%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/NamedExpressionAnalyzer.java (80%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/QualifierAnalyzer.java (86%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/SelectExpressionAnalyzer.java (84%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/TypeEnvironment.java (82%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/WindowExpressionAnalyzer.java (77%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/symbol/Namespace.java (94%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/symbol/Symbol.java (94%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/symbol/SymbolTable.java (97%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/AbstractNodeVisitor.java (65%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/Node.java (95%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/dsl/AstDSL.java (78%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/AggregateFunction.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Alias.java (93%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/AllFields.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/And.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Argument.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/AttributeList.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Case.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Cast.java (69%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Compare.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/DataType.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/EqualTo.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Field.java (93%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Function.java (93%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/In.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Interval.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/IntervalUnit.java (96%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Let.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Literal.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Map.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Not.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Or.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/QualifiedName.java (96%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/UnresolvedArgument.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/UnresolvedAttribute.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/UnresolvedExpression.java (85%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/When.java (90%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/WindowFunction.java (87%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/Xor.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/Aggregation.java (90%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/Dedupe.java (86%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/Eval.java (89%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/Filter.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/Head.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/Limit.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/Project.java (89%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/RareTopN.java (84%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/Relation.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/RelationSubquery.java (93%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/Rename.java (90%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/Sort.java (80%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/UnresolvedPlan.java (87%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/Values.java (86%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/AbstractExprNumberValue.java (96%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/AbstractExprValue.java (94%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprBooleanValue.java (90%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprByteValue.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprCollectionValue.java (93%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprDateValue.java (90%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprDatetimeValue.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprDoubleValue.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprFloatValue.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprIntegerValue.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprIntervalValue.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprLongValue.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprMissingValue.java (90%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprNullValue.java (90%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprShortValue.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprStringValue.java (90%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprTimeValue.java (90%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprTimestampValue.java (93%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprTupleValue.java (90%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprValue.java (93%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprValueUtils.java (96%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/type/ExprCoreType.java (98%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/type/ExprType.java (85%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/type/WideningTypeRule.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/utils/ExprValueOrdering.java (85%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/utils/NaturalExprValueOrdering.java (86%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/utils/NullsFirstExprValueOrdering.java (86%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/utils/NullsLastExprValueOrdering.java (86%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/utils/ReverseExprValueOrdering.java (83%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/exception/ExpressionEvaluationException.java (94%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/exception/QueryEngineException.java (94%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/exception/SemanticCheckException.java (94%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/executor/ExecutionEngine.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/executor/Explain.java (81%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/DSL.java (95%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/Expression.java (85%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/ExpressionNodeVisitor.java (85%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/FunctionExpression.java (86%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/LiteralExpression.java (84%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/NamedExpression.java (86%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/ReferenceExpression.java (89%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/AggregationState.java (82%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/Aggregator.java (76%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/AggregatorFunction.java (82%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/AvgAggregator.java (77%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/CountAggregator.java (73%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/MaxAggregator.java (76%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/MinAggregator.java (78%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/NamedAggregator.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/SumAggregator.java (65%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/conditional/cases/CaseClause.java (81%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/conditional/cases/WhenClause.java (79%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/config/ExpressionConfig.java (64%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/datetime/CalendarLookup.java (95%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/datetime/DateTimeFormatterUtil.java (96%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/datetime/DateTimeFunction.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/datetime/IntervalClause.java (70%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/env/Environment.java (96%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/BuiltinFunctionName.java (98%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/BuiltinFunctionRepository.java (89%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/FunctionBuilder.java (90%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/FunctionDSL.java (95%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/FunctionImplementation.java (89%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/FunctionName.java (95%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/FunctionResolver.java (93%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/FunctionSignature.java (90%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/SerializableBiFunction.java (94%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/SerializableFunction.java (93%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/SerializableNoArgFunction.java (94%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/SerializableTriFunction.java (95%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/operator/arthmetic/ArithmeticFunction.java (85%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/operator/arthmetic/MathematicalFunction.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/operator/convert/TypeCastOperator.java (71%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/operator/predicate/BinaryPredicateOperator.java (87%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/operator/predicate/UnaryPredicateOperator.java (78%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/text/TextFunction.java (87%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/WindowDefinition.java (84%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/WindowFunctionExpression.java (87%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/WindowFunctions.java (70%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/aggregation/AggregateWindowFunction.java (68%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/frame/CurrentRowWindowFrame.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/frame/PeerRowsWindowFrame.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/frame/WindowFrame.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/ranking/DenseRankFunction.java (84%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/ranking/RankFunction.java (86%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/ranking/RankingWindowFunction.java (75%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/ranking/RowNumberFunction.java (83%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/monitor/AlwaysHealthyMonitor.java (95%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/monitor/ResourceMonitor.java (95%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/DefaultImplementor.java (64%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/PlanNode.java (94%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/Planner.java (80%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalAggregation.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalDedupe.java (93%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalEval.java (89%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalFilter.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalLimit.java (95%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalPlan.java (93%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalPlanDSL.java (84%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalPlanNodeVisitor.java (97%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalProject.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalRareTopN.java (89%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalRelation.java (95%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalRemove.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalRename.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalSort.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalValues.java (93%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalWindow.java (89%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/optimizer/LogicalPlanOptimizer.java (86%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/optimizer/Rule.java (90%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/optimizer/pattern/Patterns.java (89%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/optimizer/rule/MergeFilterAndFilter.java (81%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/optimizer/rule/PushFilterUnderSort.java (80%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/AggregationOperator.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/DedupeOperator.java (95%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/EvalOperator.java (84%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/FilterOperator.java (80%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/LimitOperator.java (94%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/PhysicalPlan.java (86%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/PhysicalPlanDSL.java (84%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/PhysicalPlanNodeVisitor.java (94%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/ProjectOperator.java (87%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/RareTopNOperator.java (93%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/RemoveOperator.java (86%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/RenameOperator.java (85%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/SortOperator.java (87%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/ValuesOperator.java (88%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/WindowOperator.java (87%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/storage/StorageEngine.java (95%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/storage/Table.java (84%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/storage/TableScanOperator.java (87%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/storage/bindingtuple/BindingTuple.java (77%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/storage/bindingtuple/LazyBindingTuple.java (81%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/utils/ExpressionUtils.java (91%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/utils/OperatorUtils.java (92%) rename core/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/utils/SystemIndexUtils.java (98%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/AnalysisContextTest.java (96%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/AnalyzerTest.java (91%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/AnalyzerTestBase.java (74%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/ExpressionAnalyzerTest.java (83%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/ExpressionReferenceOptimizerTest.java (88%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/NamedExpressionAnalyzerTest.java (83%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/QualifierAnalyzerTest.java (85%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/SelectAnalyzeTest.java (84%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/SelectExpressionAnalyzerTest.java (84%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/TypeEnvironmentTest.java (84%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/WindowExpressionAnalyzerTest.java (77%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/analysis/symbol/SymbolTableTest.java (91%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/CastTest.java (86%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/expression/QualifiedNameTest.java (96%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ast/tree/RelationTest.java (90%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/config/TestConfig.java (79%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/DateTimeValueTest.java (95%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprBooleanValueTest.java (85%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprCollectionValueTest.java (91%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprIntervalValueTest.java (91%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprMissingValueTest.java (80%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprNullValueTest.java (80%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprNumberValueTest.java (91%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprTupleValueTest.java (92%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprValueCompareTest.java (92%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/model/ExprValueUtilsTest.java (89%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/type/ExprTypeTest.java (73%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/utils/ExprValueOrderingTest.java (86%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/utils/NullsFirstExprValueOrderingTest.java (81%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/utils/NullsLastExprValueOrderingTest.java (81%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/data/utils/ReverseExprValueOrderingTest.java (89%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/executor/ExplainTest.java (74%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/ExpressionNodeVisitorTest.java (78%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/ExpressionTestBase.java (63%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/NamedExpressionTest.java (97%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/ReferenceExpressionTest.java (69%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/AggregationTest.java (94%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/AvgAggregatorTest.java (85%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/CountAggregatorTest.java (79%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/MaxAggregatorTest.java (80%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/MinAggregatorTest.java (80%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/aggregation/SumAggregatorTest.java (82%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/conditional/ConditionalFunctionTest.java (84%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/conditional/cases/CaseClauseTest.java (89%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/conditional/cases/WhenClauseTest.java (83%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/datetime/DateTimeFunctionTest.java (95%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/datetime/IntervalClauseTest.java (81%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/BuiltinFunctionNameTest.java (96%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/BuiltinFunctionRepositoryTest.java (91%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/FunctionResolverTest.java (93%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/FunctionSignatureTest.java (90%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/function/WideningTypeRuleTest.java (80%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/operator/arthmetic/ArithmeticFunctionTest.java (87%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/operator/arthmetic/MathematicalFunctionTest.java (97%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/operator/arthmetic/UnaryFunctionTest.java (100%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/operator/convert/TypeCastOperatorTest.java (83%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/operator/predicate/BinaryPredicateOperatorTest.java (92%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/operator/predicate/UnaryPredicateOperatorTest.java (86%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/text/TextFunctionTest.java (92%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/CurrentRowWindowFrameTest.java (82%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/aggregation/AggregateWindowFunctionTest.java (80%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/frame/PeerRowsWindowFrameTest.java (91%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/expression/window/ranking/RankingWindowFunctionTest.java (88%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/monitor/AlwaysHealthyMonitorTest.java (95%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/DefaultImplementorTest.java (70%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/PlannerTest.java (75%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalDedupeTest.java (68%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalEvalTest.java (83%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalPlanNodeVisitorTest.java (89%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalRelationTest.java (94%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/logical/LogicalSortTest.java (67%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/optimizer/LogicalPlanOptimizerTest.java (78%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/optimizer/pattern/PatternsTest.java (90%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/AggregationOperatorTest.java (88%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/DedupeOperatorTest.java (95%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/EvalOperatorTest.java (89%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/FilterOperatorTest.java (82%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/LimitOperatorTest.java (91%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/PhysicalPlanNodeVisitorTest.java (90%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/PhysicalPlanTestBase.java (88%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/ProjectOperatorTest.java (81%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/RareTopNOperatorTest.java (90%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/RemoveOperatorTest.java (90%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/RenameOperatorTest.java (83%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/SortOperatorTest.java (96%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/ValuesOperatorTest.java (81%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/planner/physical/WindowOperatorTest.java (86%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/storage/TableScanOperatorTest.java (86%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/storage/bindingtuple/BindingTupleTest.java (85%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/utils/ComparisonUtil.java (65%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/utils/MatcherUtils.java (90%) rename core/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/utils/SystemIndexUtilsTest.java (87%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/CorrectnessIT.java (88%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/TestConfig.java (94%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/report/ErrorTestCase.java (88%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/report/FailedTestCase.java (88%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/report/SuccessTestCase.java (87%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/report/TestCaseReport.java (89%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/report/TestReport.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/report/TestSummary.java (94%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/runner/ComparisonTest.java (85%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/runner/connection/DBConnection.java (91%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/runner/connection/JDBCConnection.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/runner/connection/OpenSearchConnection.java (96%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/runner/resultset/DBResult.java (97%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/runner/resultset/Row.java (97%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/runner/resultset/Type.java (93%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/tests/ComparisonTestTest.java (91%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/tests/DBResultTest.java (94%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/tests/JDBCConnectionTest.java (96%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/tests/OpenSearchConnectionTest.java (96%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/tests/RowTest.java (92%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/tests/TestConfigTest.java (94%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/tests/TestDataSetTest.java (96%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/tests/TestQuerySetTest.java (90%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/tests/TestReportTest.java (88%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/tests/UnitTests.java (94%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/testset/TestDataSet.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/correctness/testset/TestQuerySet.java (96%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/admin/MonitoringIT.java (57%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/admin/PluginSettingIT.java (76%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/beyond/FullTextIT.java (94%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/beyond/PartiQLIT.java (90%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/DocTest.java (89%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/Template.java (91%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/TestData.java (86%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/annotation/DocTestConfig.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/annotation/Section.java (94%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/builder/Body.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/builder/DocBuilder.java (84%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/builder/Example.java (97%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/builder/Formats.java (70%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/builder/ListItems.java (89%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/builder/Requests.java (88%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/markup/Document.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/markup/RstDocument.java (97%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/request/SqlRequest.java (90%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/request/SqlRequestFormat.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/response/DataTable.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/response/SqlResponse.java (94%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/response/SqlResponseFormat.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/test/DataTableTest.java (93%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/test/DocBuilderTest.java (96%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/test/DocTestTests.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/test/RstDocumentTest.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/test/SqlRequestFormatTest.java (77%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/test/SqlRequestTest.java (88%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/test/SqlResponseFormatTest.java (86%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/core/test/SqlResponseTest.java (92%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/dml/DeleteIT.java (73%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/dql/BasicQueryIT.java (92%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/dql/ComplexQueryIT.java (89%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/dql/MetaDataQueryIT.java (74%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/dql/SQLFunctionsIT.java (75%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/interfaces/EndpointIT.java (79%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/doctest/interfaces/ProtocolIT.java (85%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/AggregationExpressionIT.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/AggregationIT.java (98%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/CsvFormatResponseIT.java (97%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/CursorIT.java (96%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/CustomExternalTestCluster.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/DateFormatIT.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/DateFunctionsIT.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/DeleteIT.java (97%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/ExplainIT.java (93%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/GetEndpointQueryIT.java (91%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/HashJoinIT.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/HavingIT.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/JSONRequestIT.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/JdbcTestIT.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/JoinAliasWriterRuleIT.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/JoinIT.java (97%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/MathFunctionsIT.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/MetaDataQueriesIT.java (97%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/MethodQueryIT.java (98%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/MetricsIT.java (88%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/MultiQueryIT.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/NestedFieldQueryIT.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/ObjectFieldSelectIT.java (86%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/OpenSearchSQLRestTestCase.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/OrderIT.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/OrdinalAliasRewriterIT.java (98%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/PluginIT.java (97%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/PreparedStatementIT.java (98%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/PrettyFormatResponseIT.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/PrettyFormatterIT.java (92%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/QueryAnalysisIT.java (93%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/QueryFunctionsIT.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/QueryIT.java (98%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/RestIntegTestCase.java (82%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/SQLFunctionsIT.java (97%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/SQLIntegTestCase.java (86%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/ShowIT.java (91%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/SourceFieldIT.java (96%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/SubqueryIT.java (92%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/TermQueryExplainIT.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/TestUtils.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/TestsConstants.java (98%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/TypeInformationIT.java (96%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/CsvFormatIT.java (92%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/DataTypeIT.java (77%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/DateTimeFunctionIT.java (97%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/DedupCommandIT.java (85%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/ExplainIT.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/FieldsCommandIT.java (74%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/HeadCommandIT.java (87%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/LegacyAPICompatibilityIT.java (80%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/MathematicalFunctionIT.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/MetricsIT.java (92%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/ObjectFieldOperateIT.java (83%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/OperatorIT.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/PPLIntegTestCase.java (91%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/PPLPluginIT.java (88%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/QueryAnalysisIT.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/RareCommandIT.java (87%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/RenameCommandIT.java (83%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/ResourceMonitorIT.java (87%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/SearchCommandIT.java (82%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/SettingsIT.java (84%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/SortCommandIT.java (83%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/StandaloneIT.java (77%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/StatsCommandIT.java (90%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/TextCommandIT.java (90%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/TopCommandIT.java (85%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/WhereCommandIT.java (89%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/AdminIT.java (89%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/ConditionalIT.java (88%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/CorrectnessTestBase.java (77%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/CsvFormatIT.java (89%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/DateTimeFunctionIT.java (95%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/ExpressionIT.java (91%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/IdentifierIT.java (83%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/JdbcFormatIT.java (82%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/LegacyAPICompatibilityIT.java (79%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/MathematicalFunctionIT.java (88%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/MetricsIT.java (86%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/NullLiteralIT.java (82%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/PreparedStatementIT.java (89%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/QueryValidationIT.java (94%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/RawFormatIT.java (87%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/SQLCorrectnessIT.java (97%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/TextFunctionIT.java (87%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/WindowFunctionIT.java (84%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/util/MatcherUtils.java (99%) rename integ-test/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/util/TestUtils.java (99%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/OpenSearchLegacySqlAnalyzer.java (78%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/SimilarSymbols.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/SqlAnalysisConfig.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/SqlAnalysisException.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalysisException.java (87%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/scope/Environment.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/scope/Namespace.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/scope/SemanticContext.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/scope/Symbol.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/scope/SymbolTable.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/scope/TypeSupplier.java (89%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/Type.java (83%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/TypeExpression.java (91%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/base/BaseType.java (87%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/base/OpenSearchDataType.java (90%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/base/OpenSearchIndex.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/function/AggregateFunction.java (68%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/function/OpenSearchScalarFunction.java (78%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/function/ScalarFunction.java (80%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/operator/ComparisonOperator.java (83%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/operator/JoinOperator.java (81%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/operator/SetOperator.java (87%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/special/Generic.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/special/Product.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/visitor/OpenSearchMappingLoader.java (83%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/visitor/SemanticAnalyzer.java (90%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/visitor/TypeChecker.java (78%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/syntax/CaseInsensitiveCharStream.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/syntax/SyntaxAnalysisErrorListener.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/syntax/SyntaxAnalysisException.java (87%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitor.java (72%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/visitor/EarlyExitAnalysisException.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/visitor/GenericSqlParseTreeVisitor.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/visitor/Reducible.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/visitor/UnsupportedSemanticVerifier.java (86%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/cursor/Cursor.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/cursor/CursorType.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/cursor/DefaultCursor.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/cursor/NullCursor.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/ColumnTypeProvider.java (89%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/Condition.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/Delete.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/Field.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/From.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/Having.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/IndexStatement.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/JoinSelect.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/KVValue.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/MethodField.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/Order.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/Paramer.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/Query.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/QueryActionRequest.java (89%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/QueryStatement.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/ScriptMethodField.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/SearchResult.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/Select.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/TableOnJoinSelect.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/Where.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/bucketpath/BucketPath.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/bucketpath/Path.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/hints/Hint.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/hints/HintFactory.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/domain/hints/HintType.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/esdomain/LocalClusterState.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/esdomain/OpenSearchClient.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/esdomain/mapping/FieldMapping.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/esdomain/mapping/FieldMappings.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/esdomain/mapping/IndexMappings.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/esdomain/mapping/Mappings.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/esdomain/mapping/TypeMappings.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/exception/SQLFeatureDisabledException.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/exception/SqlFeatureNotImplementedException.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/exception/SqlParseException.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/ActionRequestRestExecutorFactory.java (80%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/AsyncRestExecutor.java (90%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/ElasticDefaultRestExecutor.java (87%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/ElasticHitsExecutor.java (88%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/ElasticResultHandler.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/Format.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/GetIndexRequestRestListener.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/QueryActionElasticExecutor.java (75%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/RestExecutor.java (90%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/adapter/QueryPlanQueryAction.java (88%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java (81%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/csv/CSVResult.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/csv/CSVResultRestExecutor.java (89%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/csv/CSVResultsExtractor.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/csv/CsvExtractorException.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/cursor/CursorActionRequestRestExecutorFactory.java (91%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/cursor/CursorAsyncRestExecutor.java (89%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/cursor/CursorCloseExecutor.java (89%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/cursor/CursorRestExecutor.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/cursor/CursorResultExecutor.java (88%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/BindingTupleResultSet.java (86%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/DataRows.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/DateFieldFormatter.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/DateFormat.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/DeleteResultSet.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/DescribeResultSet.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/ErrorMessage.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/ErrorMessageFactory.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/OpenSearchErrorMessage.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/PrettyFormatRestExecutor.java (86%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/Protocol.java (86%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/ResultSet.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/Schema.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/SelectResultSet.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/ShowResultSet.java (89%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/join/ElasticJoinExecutor.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/join/ElasticUtils.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/join/HashJoinComparisonStructure.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/join/HashJoinElasticExecutor.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/join/MetaSearchResult.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/join/NestedLoopsElasticExecutor.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/join/QueryPlanElasticExecutor.java (88%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/join/SearchHitsResult.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/multi/ComperableHitResult.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/multi/MinusExecutor.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/multi/MinusOneFieldAndOptimizationResult.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/multi/MultiRequestExecutorFactory.java (82%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/multi/UnionExecutor.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/core/Expression.java (82%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/core/ExpressionFactory.java (59%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/core/builder/ArithmeticFunctionFactory.java (92%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/core/builder/BinaryExpressionBuilder.java (81%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/core/builder/ExpressionBuilder.java (86%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/core/builder/UnaryExpressionBuilder.java (81%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/core/operator/BinaryScalarOperator.java (74%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/core/operator/DoubleBinaryScalarOperator.java (84%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/core/operator/DoubleUnaryScalarOperator.java (81%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/core/operator/ScalarOperation.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/core/operator/ScalarOperator.java (88%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/core/operator/UnaryScalarOperator.java (77%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/domain/BindingTuple.java (87%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/model/ExprBooleanValue.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/model/ExprCollectionValue.java (88%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/model/ExprDoubleValue.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/model/ExprFloatValue.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/model/ExprIntegerValue.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/model/ExprLongValue.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/model/ExprMissingValue.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/model/ExprStringValue.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/model/ExprTupleValue.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/model/ExprValue.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/model/ExprValueFactory.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/expression/model/ExprValueUtils.java (84%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/metrics/BasicCounter.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/metrics/Counter.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/metrics/GaugeMetric.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/metrics/Metric.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/metrics/MetricFactory.java (92%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/metrics/MetricName.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/metrics/Metrics.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/metrics/NumericMetric.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/metrics/RollingCounter.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/CaseWhenParser.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/ChildrenType.java (90%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/ElasticLexer.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/ElasticSqlExprParser.java (99%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/ElasticSqlSelectParser.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/FieldMaker.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/HavingParser.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/NestedType.java (91%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/SQLOdbcExpr.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/SQLParensIdentifierExpr.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/ScriptFilter.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/SelectParser.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/SqlParser.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/SubQueryExpression.java (92%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/SubQueryParser.java (90%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/parser/WhereParser.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/plugin/OpenSearchSQLPluginConfig.java (63%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/plugin/RestSQLQueryAction.java (79%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/plugin/RestSqlAction.java (79%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/plugin/RestSqlSettingsAction.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/plugin/RestSqlStatsAction.java (92%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/plugin/SearchDao.java (83%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/plugin/SqlSettings.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/AggregationQueryAction.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/DefaultQueryAction.java (89%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/DeleteQueryAction.java (88%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/DescribeQueryAction.java (84%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/OpenSearchActionFactory.java (77%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/QueryAction.java (92%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/ShowQueryAction.java (83%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/SqlElasticRequestBuilder.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/SqlOpenSearchRequestBuilder.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/join/BackOffRetryStrategy.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/join/HashJoinElasticRequestBuilder.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/join/JoinRequestBuilder.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/join/NestedLoopsElasticRequestBuilder.java (91%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/join/OpenSearchHashJoinQueryAction.java (89%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/join/OpenSearchJoinQueryAction.java (85%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/join/OpenSearchJoinQueryActionFactory.java (82%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/join/OpenSearchNestedLoopsQueryAction.java (84%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/join/TableInJoinRequestBuilder.java (91%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/maker/AggMaker.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/maker/Maker.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/maker/QueryMaker.java (92%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/multi/MultiQueryAction.java (87%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/multi/MultiQueryRequestBuilder.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/multi/MultiQuerySelect.java (91%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/multi/OpenSearchMultiQueryActionFactory.java (86%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/HashJoinQueryPlanRequestBuilder.java (83%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/converter/SQLAggregationParser.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/converter/SQLExprToExpressionConverter.java (90%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/converter/SQLToOperatorConverter.java (76%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/core/BindingTupleQueryPlanner.java (83%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/core/ColumnNode.java (84%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/core/Config.java (92%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/core/ExecuteParams.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/core/Plan.java (87%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/core/PlanNode.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/core/QueryParams.java (92%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/core/QueryPlanner.java (73%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/explain/Explanation.java (83%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/explain/ExplanationFormat.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/explain/JsonExplanationFormat.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/logical/LogicalOperator.java (87%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/logical/LogicalPlan.java (80%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/logical/LogicalPlanVisitor.java (78%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/logical/node/Filter.java (80%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/logical/node/Group.java (86%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/logical/node/Join.java (90%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/logical/node/Project.java (88%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/logical/node/Sort.java (81%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/logical/node/TableScan.java (78%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/logical/node/Top.java (80%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/logical/rule/ProjectionPushDown.java (81%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/logical/rule/SelectionPushDown.java (81%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/PhysicalOperator.java (83%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/PhysicalPlan.java (84%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/Row.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/estimation/Cost.java (92%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/estimation/Estimation.java (79%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/BatchPhysicalOperator.java (85%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/join/BlockHashJoin.java (86%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/join/CombinedRow.java (91%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/join/DefaultHashTable.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/join/HashTable.java (91%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/join/HashTableGroup.java (91%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/join/JoinAlgorithm.java (91%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/join/ListHashTable.java (91%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/project/PhysicalProject.java (71%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/scroll/BindingTupleRow.java (85%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java (73%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/scroll/Scroll.java (87%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/scroll/SearchAggregationResponseHelper.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/scroll/SearchHitRow.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/physical/node/sort/QuickSort.java (83%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/resource/ResourceManager.java (80%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/resource/Stats.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/resource/blocksize/AdaptiveBlockSize.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/resource/blocksize/BlockSize.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/resource/monitor/Monitor.java (92%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/query/planner/resource/monitor/TotalMemoryMonitor.java (85%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/request/PreparedStatementRequest.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/request/SqlRequest.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/request/SqlRequestFactory.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/request/SqlRequestParam.java (90%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/RewriteRule.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/RewriteRuleExecutor.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/alias/Identifier.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/alias/Table.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRule.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/identifier/AnonymizeSensitiveDataRule.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/identifier/UnquoteIdentifierRule.java (89%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/join/JoinRewriteRule.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/matchtoterm/TermFieldRewriter.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/matchtoterm/TermFieldScope.java (92%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/matchtoterm/VerificationException.java (93%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/nestedfield/From.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/nestedfield/Identifier.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/nestedfield/NestedFieldProjection.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/nestedfield/NestedFieldRewriter.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/nestedfield/SQLClause.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/nestedfield/Scope.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/nestedfield/Select.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/nestedfield/Where.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/ordinal/OrdinalRewriterRule.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/parent/SQLExprParentSetter.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/parent/SQLExprParentSetterRule.java (89%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/subquery/NestedQueryContext.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/subquery/RewriterContext.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/subquery/SubQueryRewriteRule.java (87%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/subquery/SubQueryRewriter.java (91%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/subquery/rewriter/InRewriter.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/subquery/rewriter/NestedExistsRewriter.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/subquery/rewriter/Rewriter.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/subquery/rewriter/RewriterFactory.java (92%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/subquery/rewriter/SubqueryAliasRewriter.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/subquery/utils/FindSubQuery.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/spatial/BoundingBoxFilterParams.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/spatial/CellFilterParams.java (96%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/spatial/DistanceFilterParams.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/spatial/Point.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/spatial/PolygonFilterParams.java (94%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/spatial/RangeDistanceFilterParams.java (95%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/spatial/SpatialParamsFactory.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/spatial/WktToGeoJsonConverter.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/utils/JsonPrettyFormatter.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/utils/LogUtils.java (97%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/utils/QueryDataAnonymizer.java (90%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/utils/SQLFunctions.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/utils/StringUtils.java (98%) rename legacy/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/utils/Util.java (96%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/SymbolSimilarityTest.java (97%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/SyntaxAnalysisTest.java (97%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerAggregateFunctionTest.java (98%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerBasicTest.java (93%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerConfigTest.java (90%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerConstantTest.java (94%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerESScalarFunctionTest.java (97%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerFieldTypeTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerFromClauseTest.java (99%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerIdentifierTest.java (98%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerMultiQueryTest.java (98%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerOperatorTest.java (97%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerScalarFunctionTest.java (98%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerSubqueryTest.java (96%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerTestBase.java (85%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/SemanticAnalyzerTests.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/scope/EnvironmentTest.java (87%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/scope/SemanticContextTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/scope/SymbolTableTest.java (77%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/scope/TypeSupplierTest.java (87%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/BaseTypeTest.java (63%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/GenericTypeTest.java (64%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/ProductTypeTest.java (80%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/semantic/types/TypeExpressionTest.java (69%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitorTest.java (80%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/esdomain/mapping/FieldMappingTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/esdomain/mapping/FieldMappingsTest.java (91%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/AsyncRestExecutorTest.java (90%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/csv/CSVResultTest.java (98%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/DateFieldFormatterTest.java (99%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/executor/format/ResultSetTest.java (97%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/plugin/RestSQLQueryActionTest.java (85%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/alias/IdentifierTest.java (96%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRuleTest.java (97%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/rewriter/alias/TableTest.java (96%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/AggregationOptionTest.java (86%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/DateFormatTest.java (92%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/DateFunctionsTest.java (91%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/ErrorMessageFactoryTest.java (88%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/FormatTest.java (91%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/HavingTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/JSONRequestTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/LocalClusterStateTest.java (90%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/MathFunctionsTest.java (98%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/NestedFieldProjectionTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/NestedFieldRewriterTest.java (98%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/OpenSearchClientTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/PreparedStatementRequestTest.java (96%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/QueryFunctionsTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/SqlRequestFactoryTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/SqlRequestParamTest.java (85%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/StringOperatorsTest.java (96%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/WhereWithBoolConditionTest.java (84%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/cursor/DefaultCursorTest.java (91%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/domain/ColumnTypeProviderTest.java (76%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/executor/DeleteResultSetTest.java (88%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/executor/format/BindingTupleResultSetTest.java (87%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/executor/format/CSVResultsExtractorTest.java (83%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/executor/join/ElasticUtilsTest.java (90%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/expression/core/BinaryExpressionTest.java (84%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/expression/core/CompoundExpressionTest.java (72%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/expression/core/ExpressionTest.java (79%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/expression/core/RefExpressionTest.java (66%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/expression/core/UnaryExpressionTest.java (89%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/expression/model/ExprValueUtilsTest.java (91%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/metrics/BasicCounterTest.java (90%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/metrics/GaugeMetricTest.java (90%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/metrics/MetricsTest.java (89%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/metrics/NumericMetricTest.java (86%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/metrics/RollingCounterTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/parser/BucketPathTest.java (90%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/parser/FieldMakerTest.java (88%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/parser/SqlParserTest.java (96%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/parser/SubQueryParserTest.java (91%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java (91%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/planner/OpenSearchActionFactoryTest.java (90%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/planner/QueryPlannerBatchTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/planner/QueryPlannerConfigTest.java (94%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/planner/QueryPlannerExecuteTest.java (98%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/planner/QueryPlannerExplainTest.java (92%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/planner/QueryPlannerMonitorTest.java (92%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/planner/QueryPlannerTest.java (90%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/planner/converter/SQLAggregationParserTest.java (94%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/planner/converter/SQLExprToExpressionConverterTest.java (86%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/planner/converter/SQLToOperatorConverterTest.java (84%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/planner/physical/SearchAggregationResponseHelperTest.java (96%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/query/DefaultQueryActionTest.java (88%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/RewriteRuleExecutorTest.java (89%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/identifier/UnquoteIdentifierRuleTest.java (93%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/inline/AliasInliningTests.java (88%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/ordinal/OrdinalRewriterRuleTest.java (94%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterRuleTest.java (88%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterTest.java (93%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/subquery/ExistsSubQueryRewriterTest.java (98%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/subquery/InSubqueryRewriterTest.java (97%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/subquery/NestedQueryContextTest.java (94%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/subquery/SubQueryRewriteRuleTest.java (93%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/subquery/SubQueryRewriterTestBase.java (85%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/subquery/rewriter/SubqueryAliasRewriterTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/subquery/utils/FindSubQueryTest.java (89%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/rewriter/term/TermFieldRewriterTest.java (88%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/spatial/WktToGeoJsonConverterTest.java (98%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/utils/BackticksUnquoterTest.java (85%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/utils/LogUtilsTest.java (90%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/utils/PrettyFormatterTest.java (92%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/utils/QueryDataAnonymizerTest.java (96%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/utils/SQLFunctionsTest.java (85%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/utils/StringUtilsTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/unittest/utils/UtilTest.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/util/AggregationUtils.java (98%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/util/CheckScriptContents.java (92%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/util/HasFieldWithValue.java (97%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/util/MatcherUtils.java (99%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/util/MultipleIndexClusterUtils.java (95%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/util/SqlExplainUtils.java (84%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/util/SqlParserUtils.java (87%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/util/TestUtils.java (99%) rename legacy/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/legacy/util/TestsConstants.java (98%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/client/OpenSearchClient.java (87%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/client/OpenSearchNodeClient.java (95%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/client/OpenSearchRestClient.java (94%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/type/OpenSearchDataType.java (88%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/utils/Content.java (97%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/utils/ObjectContent.java (97%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/utils/OpenSearchJsonContent.java (98%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/value/OpenSearchDateFormatters.java (98%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/value/OpenSearchExprBinaryValue.java (81%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/value/OpenSearchExprGeoPointValue.java (82%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/value/OpenSearchExprIpValue.java (80%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/value/OpenSearchExprTextKeywordValue.java (80%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/value/OpenSearchExprTextValue.java (78%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/value/OpenSearchExprValueFactory.java (66%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/executor/OpenSearchExecutionEngine.java (78%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/executor/protector/ExecutionProtector.java (82%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/executor/protector/NoopExecutionProtector.java (87%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/executor/protector/OpenSearchExecutionProtector.java (77%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/executor/protector/ResourceMonitorPlan.java (86%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/mapping/IndexMapping.java (98%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/monitor/OpenSearchMemoryHealthy.java (97%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/monitor/OpenSearchResourceMonitor.java (92%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/OpenSearchLogicalIndexAgg.java (81%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/OpenSearchLogicalIndexScan.java (85%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/OpenSearchLogicalPlanOptimizerFactory.java (58%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/rule/MergeAggAndIndexScan.java (78%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/rule/MergeAggAndRelation.java (78%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/rule/MergeFilterAndRelation.java (77%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/rule/MergeLimitAndIndexScan.java (81%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/rule/MergeLimitAndRelation.java (76%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/rule/MergeSortAndIndexAgg.java (79%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/rule/MergeSortAndIndexScan.java (80%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/rule/MergeSortAndRelation.java (77%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/rule/OptimizationRuleUtils.java (87%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/rule/PushProjectAndIndexScan.java (76%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/rule/PushProjectAndRelation.java (75%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/request/OpenSearchQueryRequest.java (93%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/request/OpenSearchRequest.java (89%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/request/OpenSearchScrollRequest.java (94%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/request/system/OpenSearchCatIndicesRequest.java (82%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/request/system/OpenSearchDescribeIndexRequest.java (85%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/request/system/OpenSearchSystemRequest.java (88%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/response/OpenSearchAggregationResponseParser.java (98%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/response/OpenSearchResponse.java (91%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/response/error/ErrorMessage.java (96%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/response/error/ErrorMessageFactory.java (96%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/response/error/OpenSearchErrorMessage.java (97%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/security/SecurityAccess.java (95%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/setting/OpenSearchSettings.java (96%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/OpenSearchIndex.java (76%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/OpenSearchIndexScan.java (86%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/OpenSearchStorageEngine.java (72%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/ExpressionScriptEngine.java (86%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/ScriptUtils.java (83%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/aggregation/AggregationQueryBuilder.java (86%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/aggregation/ExpressionAggregationScript.java (82%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactory.java (91%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptLeafFactory.java (92%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/aggregation/dsl/AggregationBuilderHelper.java (77%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilder.java (89%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilder.java (86%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/core/ExpressionScript.java (86%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/filter/ExpressionFilterScript.java (81%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactory.java (91%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/filter/ExpressionFilterScriptLeafFactory.java (92%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/filter/FilterQueryBuilder.java (75%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/filter/lucene/LuceneQuery.java (84%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/filter/lucene/RangeQuery.java (89%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/filter/lucene/TermQuery.java (85%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/filter/lucene/WildcardQuery.java (87%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/sort/SortQueryBuilder.java (87%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/serialization/DefaultExpressionSerializer.java (93%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/serialization/ExpressionSerializer.java (89%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/system/OpenSearchSystemIndex.java (71%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/system/OpenSearchSystemIndexScan.java (84%) rename opensearch/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/system/OpenSearchSystemIndexSchema.java (91%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/client/OpenSearchNodeClientTest.java (95%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/client/OpenSearchRestClientTest.java (93%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/type/OpenSearchDataTypeTest.java (82%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/value/OpenSearchExprBinaryValueTest.java (91%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/value/OpenSearchExprGeoPointValueTest.java (90%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/value/OpenSearchExprIpValueTest.java (90%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/value/OpenSearchExprTextKeywordValueTest.java (86%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/value/OpenSearchExprTextValueTest.java (86%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/data/value/OpenSearchExprValueFactoryTest.java (79%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/executor/OpenSearchExecutionEngineTest.java (82%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/executor/OpenSearchExecutionProtectorTest.java (75%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/executor/ResourceMonitorPlanTest.java (88%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/executor/protector/NoopExecutionProtectorTest.java (90%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/mapping/IndexMappingTest.java (96%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/monitor/OpenSearchMemoryHealthyTest.java (97%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/monitor/OpenSearchResourceMonitorTest.java (95%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/OpenSearchLogicOptimizerTest.java (91%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/planner/logical/OpenSearchLogicalIndexScanTest.java (94%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/request/OpenSearchQueryRequestTest.java (93%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/request/OpenSearchScrollRequestTest.java (93%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/request/system/OpenSearchCatIndicesRequestTest.java (85%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/request/system/OpenSearchDescribeIndexRequestTest.java (84%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/response/AggregationResponseUtils.java (98%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/response/OpenSearchAggregationResponseParserTest.java (99%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/response/OpenSearchResponseTest.java (93%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/response/error/ErrorMessageFactoryTest.java (97%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/response/error/ErrorMessageTest.java (97%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/response/error/OpenSearchErrorMessageTest.java (97%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/setting/OpenSearchSettingsTest.java (94%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/OpenSearchDefaultImplementorTest.java (87%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/OpenSearchIndexScanTest.java (89%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/OpenSearchIndexTest.java (79%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/OpenSearchStorageEngineTest.java (78%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/ExpressionScriptEngineTest.java (87%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/aggregation/AggregationQueryBuilderTest.java (89%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactoryTest.java (92%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptTest.java (88%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/aggregation/GroupSortOrderTest.java (78%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilderTest.java (85%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilderTest.java (84%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactoryTest.java (92%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/filter/ExpressionFilterScriptTest.java (87%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/filter/FilterQueryBuilderTest.java (89%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/filter/lucene/LuceneQueryTest.java (83%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/filter/lucene/RangeQueryTest.java (80%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/script/sort/SortQueryBuilderTest.java (83%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/serialization/DefaultExpressionSerializerTest.java (80%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/system/OpenSearchSystemIndexScanTest.java (88%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/storage/system/OpenSearchSystemIndexTest.java (69%) rename opensearch/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/opensearch/utils/Utils.java (88%) rename plugin/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/plugin/SQLPlugin.java (84%) rename plugin/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/plugin/request/PPLQueryRequestFactory.java (90%) rename plugin/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/plugin/rest/OpenSearchPluginConfig.java (65%) rename plugin/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/plugin/rest/RestPPLQueryAction.java (80%) rename plugin/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/plugin/rest/RestPPLStatsAction.java (91%) rename ppl/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/PPLService.java (65%) rename ppl/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/antlr/PPLSyntaxParser.java (79%) rename ppl/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/config/PPLServiceConfig.java (71%) rename ppl/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/domain/PPLQueryRequest.java (94%) rename ppl/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/domain/PPLQueryResponse.java (93%) rename ppl/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/parser/AstBuilder.java (68%) rename ppl/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/parser/AstExpressionBuilder.java (60%) rename ppl/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/utils/ArgumentFactory.java (81%) rename ppl/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/utils/PPLQueryDataAnonymizer.java (79%) rename ppl/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/utils/UnresolvedPlanHelper.java (83%) rename ppl/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/PPLServiceTest.java (85%) rename ppl/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/antlr/PPLSyntaxParserTest.java (98%) rename ppl/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/config/PPLServiceConfigTest.java (90%) rename ppl/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/domain/PPLQueryRequestTest.java (94%) rename ppl/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/domain/PPLQueryResponseTest.java (94%) rename ppl/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/parser/AstBuilderTest.java (82%) rename ppl/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/parser/AstExpressionBuilderTest.java (81%) rename ppl/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/utils/ArgumentFactoryTest.java (74%) rename ppl/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/utils/PPLQueryDataAnonymizerTest.java (94%) rename ppl/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/ppl/utils/UnresolvedPlanHelperTest.java (84%) rename protocol/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/QueryResult.java (87%) rename protocol/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/CsvResponseFormatter.java (93%) rename protocol/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/ErrorFormatter.java (97%) rename protocol/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/FlatResponseFormatter.java (97%) rename protocol/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/Format.java (95%) rename protocol/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/JdbcResponseFormatter.java (85%) rename protocol/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/JsonResponseFormatter.java (77%) rename protocol/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/RawResponseFormatter.java (93%) rename protocol/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/ResponseFormatter.java (94%) rename protocol/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/SimpleJsonResponseFormatter.java (94%) rename protocol/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/QueryResultTest.java (90%) rename protocol/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/CsvResponseFormatterTest.java (86%) rename protocol/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/FormatTest.java (96%) rename protocol/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/JdbcResponseFormatterTest.java (79%) rename protocol/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/RawResponseFormatterTest.java (88%) rename protocol/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/protocol/response/format/SimpleJsonResponseFormatterTest.java (87%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/ConnectionImpl.java (93%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/DatabaseMetaDataImpl.java (98%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/Driver.java (83%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/OpenSearchConnection.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/OpenSearchDataSource.java (89%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/OpenSearchVersion.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/PreparedStatementImpl.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/ResultSetImpl.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/ResultSetMetaDataImpl.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/StatementImpl.java (93%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/auth/AuthenticationType.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/AuthConnectionProperty.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/AwsCredentialsProviderProperty.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/BoolConnectionProperty.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/ConnectionConfig.java (98%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/ConnectionProperty.java (99%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/ConnectionPropertyException.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/FetchSizeProperty.java (88%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/HostConnectionProperty.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/HostnameVerificationConnectionProperty.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/IntConnectionProperty.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/KeyStoreLocationConnectionProperty.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/KeyStorePasswordConnectionProperty.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/KeyStoreTypeConnectionProperty.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/LogLevelConnectionProperty.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/LogOutputConnectionProperty.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/LoginTimeoutConnectionProperty.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/PasswordConnectionProperty.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/PathConnectionProperty.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/PortConnectionProperty.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/RegionConnectionProperty.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/RequestCompressionConnectionProperty.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/StringConnectionProperty.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/TrustSelfSignedConnectionProperty.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/TrustStoreLocationConnectionProperty.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/TrustStorePasswordConnectionProperty.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/TrustStoreTypeConnectionProperty.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/UseSSLConnectionProperty.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/UserConnectionProperty.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/JdbcWrapper.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/Version.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/exceptions/ObjectClosedException.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/results/ColumnMetaData.java (92%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/results/Cursor.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/results/Row.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/results/Schema.java (93%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/util/AwsHostNameUtil.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/util/JavaUtil.java (93%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/util/SqlParser.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/util/UrlParser.java (91%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/logging/FilePrintWriterLogger.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/logging/Layout.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/logging/LogLevel.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/logging/Logger.java (98%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/logging/LoggerFactory.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/logging/LoggingSource.java (98%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/logging/NoOpLogger.java (98%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/logging/PrintWriterLogger.java (98%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/logging/StandardLayout.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/ClusterMetadata.java (88%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/ColumnDescriptor.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/ConnectionResponse.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/JdbcDateTimeFormatter.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/JdbcQueryParam.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/JdbcQueryRequest.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/Parameter.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/Protocol.java (88%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/ProtocolFactory.java (83%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/QueryRequest.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/QueryResponse.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/RequestError.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/exceptions/InternalServerErrorException.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/exceptions/MalformedResponseException.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/exceptions/ResponseException.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/HttpException.java (93%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/HttpResponseHandler.java (87%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/JdbcCursorQueryRequest.java (90%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/JsonClusterMetadata.java (92%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/JsonConnectionResponse.java (84%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/JsonCursorHttpProtocol.java (86%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/JsonCursorHttpProtocolFactory.java (83%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/JsonCursorQueryRequest.java (88%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/JsonHttpProtocol.java (87%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/JsonHttpProtocolFactory.java (81%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/JsonHttpResponseHandler.java (96%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/JsonOpenSearchVersion.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/JsonQueryRequest.java (89%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/JsonQueryResponse.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/Transport.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/TransportException.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/TransportFactory.java (83%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/http/ApacheHttpClientConnectionFactory.java (99%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/http/ApacheHttpTransport.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/http/ApacheHttpTransportFactory.java (78%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/http/HttpParam.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/http/HttpTransport.java (85%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/http/JclLoggerAdapter.java (94%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/http/LoggingInputStream.java (98%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/http/LoggingManagedHttpClientConnection.java (98%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/http/LoggingOutputStream.java (98%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptor.java (98%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/BaseTypeConverter.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/BinaryType.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/BooleanType.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/ByteType.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/DateType.java (98%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/DoubleType.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/FloatType.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/IntegerType.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/LongType.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/NumberType.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/OpenSearchType.java (99%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/ShortType.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/StringType.java (95%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/TimeType.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/TimestampType.java (98%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/TypeConverter.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/TypeConverters.java (99%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/TypeHelper.java (97%) rename sql-jdbc/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/UnrecognizedOpenSearchTypeException.java (95%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/ConnectionTests.java (92%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/CursorTests.java (93%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/DataSourceTests.java (89%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/DatabaseMetaDataTests.java (93%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/DriverTests.java (88%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/PreparedStatementTests.java (90%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/ResultSetMetaDataTests.java (89%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/ResultSetTests.java (91%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/SSLClientAuthTests.java (86%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/SSLConnectionTests.java (89%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/SSLHostnameVerificationTests.java (89%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/StatementTests.java (83%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/config/ConnectionConfigTests.java (99%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/util/AwsHostnameUtilTests.java (97%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/util/SqlParserTests.java (98%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/internal/util/UrlParserTests.java (92%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/JsonHttpProtocolTests.java (93%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/protocol/http/JsonCursorQueryRequestTests.java (89%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/KeyValuePairs.java (97%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/PerClassWireMockServerExtension.java (98%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/PerTestWireMockServerExtension.java (98%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/TLSServer.java (96%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/TestResources.java (97%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/UTCTimeZoneTestExtension.java (96%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/WireMockServerHelpers.java (90%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/mocks/MockCloseableHttpResponseBuilder.java (97%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/mocks/MockHttpTransport.java (82%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/mocks/MockOpenSearch.java (95%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/mocks/MockResultSet.java (95%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/mocks/MockResultSetMetaData.java (98%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/mocks/MockResultSetRows.java (98%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/test/mocks/QueryMock.java (96%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptorTests.java (98%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/BinaryTypeTests.java (96%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/ByteTypeTests.java (98%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/DateTypeTests.java (96%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/FloatTypeTest.java (98%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/IntegerTypeTests.java (98%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/KeywordTypeTests.java (95%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/LongTypeTests.java (98%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/ShortTypeTests.java (98%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/TimeTypeTest.java (92%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/TimestampTypeTests.java (97%) rename sql-jdbc/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/jdbc/types/TypesTests.java (95%) rename sql/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/SQLService.java (69%) rename sql/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/antlr/SQLSyntaxParser.java (78%) rename sql/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/config/SQLServiceConfig.java (72%) rename sql/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/domain/SQLQueryRequest.java (96%) rename sql/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/AstAggregationBuilder.java (85%) rename sql/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/AstBuilder.java (73%) rename sql/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/AstExpressionBuilder.java (61%) rename sql/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/AstHavingFilterBuilder.java (82%) rename sql/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/AstSortBuilder.java (68%) rename sql/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/ParserUtils.java (84%) rename sql/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/context/ParsingContext.java (95%) rename sql/src/main/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/context/QuerySpecification.java (78%) rename sql/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/SQLServiceTest.java (88%) rename sql/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/antlr/SQLSyntaxParserTest.java (97%) rename sql/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/config/SQLServiceConfigTest.java (94%) rename sql/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/domain/SQLQueryRequestTest.java (97%) rename sql/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/AstAggregationBuilderTest.java (89%) rename sql/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/AstBuilderTest.java (90%) rename sql/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/AstExpressionBuilderTest.java (79%) rename sql/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/AstHavingFilterBuilderTest.java (79%) rename sql/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/AstQualifiedNameBuilderTest.java (86%) rename sql/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/AstSortBuilderTest.java (73%) rename sql/src/test/java/{com/amazon/opendistroforelasticsearch => org/opensearch}/sql/sql/parser/context/QuerySpecificationTest.java (80%) diff --git a/.github/workflows/sql-jdbc-release-workflow.yml b/.github/workflows/sql-jdbc-release-workflow.yml index 0c1a2603ae..693b0cf37a 100644 --- a/.github/workflows/sql-jdbc-release-workflow.yml +++ b/.github/workflows/sql-jdbc-release-workflow.yml @@ -1,5 +1,5 @@ name: Build and Release SQL-JDBC -# This workflow is triggered on creating tags to master or an opendistro release branch +# This workflow is triggered on creating tags to master or an opensearch release branch on: push: tags: diff --git a/.github/workflows/sql-odbc-main.yml b/.github/workflows/sql-odbc-main.yml index 17f4365d49..c14b3354d0 100644 --- a/.github/workflows/sql-odbc-main.yml +++ b/.github/workflows/sql-odbc-main.yml @@ -1,4 +1,4 @@ -name: Open Distro for Elasticsearch ODBC Driver +name: OpenSearch ODBC Driver on: [push, pull_request] diff --git a/.github/workflows/sql-release-workflow.yml b/.github/workflows/sql-release-workflow.yml index d2a5abcbb7..bbfbd929a8 100644 --- a/.github/workflows/sql-release-workflow.yml +++ b/.github/workflows/sql-release-workflow.yml @@ -1,5 +1,5 @@ name: Release SQL Artifacts -# This workflow is triggered on creating tags to master or an opendistro release branch +# This workflow is triggered on creating tags to master or an opensearch release branch on: push: tags: diff --git a/build-tools/sqlplugin-coverage.gradle b/build-tools/sqlplugin-coverage.gradle index 4a84c9265e..22b9cf3235 100644 --- a/build-tools/sqlplugin-coverage.gradle +++ b/build-tools/sqlplugin-coverage.gradle @@ -88,4 +88,4 @@ jacocoTestReport { project.gradle.projectsEvaluated { jacocoTestReport.dependsOn integTest.runner -} \ No newline at end of file +} diff --git a/build.gradle b/build.gradle index c015833dc8..307b8b4d80 100644 --- a/build.gradle +++ b/build.gradle @@ -151,4 +151,4 @@ configurations.all { // enforce 1.1.3, https://www.whitesourcesoftware.com/vulnerability-database/WS-2019-0379 resolutionStrategy.force 'commons-codec:commons-codec:1.13' resolutionStrategy.force 'com.google.guava:guava:29.0-jre' -} \ No newline at end of file +} diff --git a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/antlr/CaseInsensitiveCharStream.java b/common/src/main/java/org/opensearch/sql/common/antlr/CaseInsensitiveCharStream.java similarity index 97% rename from common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/antlr/CaseInsensitiveCharStream.java rename to common/src/main/java/org/opensearch/sql/common/antlr/CaseInsensitiveCharStream.java index 13ccb8bdf9..a8f82e4672 100644 --- a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/antlr/CaseInsensitiveCharStream.java +++ b/common/src/main/java/org/opensearch/sql/common/antlr/CaseInsensitiveCharStream.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.common.antlr; +package org.opensearch.sql.common.antlr; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; diff --git a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/antlr/SyntaxAnalysisErrorListener.java b/common/src/main/java/org/opensearch/sql/common/antlr/SyntaxAnalysisErrorListener.java similarity index 97% rename from common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/antlr/SyntaxAnalysisErrorListener.java rename to common/src/main/java/org/opensearch/sql/common/antlr/SyntaxAnalysisErrorListener.java index e71fddbebe..9590a5f3a6 100644 --- a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/antlr/SyntaxAnalysisErrorListener.java +++ b/common/src/main/java/org/opensearch/sql/common/antlr/SyntaxAnalysisErrorListener.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.common.antlr; +package org.opensearch.sql.common.antlr; import java.util.Locale; import org.antlr.v4.runtime.BaseErrorListener; diff --git a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/antlr/SyntaxCheckException.java b/common/src/main/java/org/opensearch/sql/common/antlr/SyntaxCheckException.java similarity index 94% rename from common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/antlr/SyntaxCheckException.java rename to common/src/main/java/org/opensearch/sql/common/antlr/SyntaxCheckException.java index cd4b2937f2..43a4275e85 100644 --- a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/antlr/SyntaxCheckException.java +++ b/common/src/main/java/org/opensearch/sql/common/antlr/SyntaxCheckException.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.common.antlr; +package org.opensearch.sql.common.antlr; public class SyntaxCheckException extends RuntimeException { public SyntaxCheckException(String message) { diff --git a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/response/ResponseListener.java b/common/src/main/java/org/opensearch/sql/common/response/ResponseListener.java similarity index 95% rename from common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/response/ResponseListener.java rename to common/src/main/java/org/opensearch/sql/common/response/ResponseListener.java index 2dbd2c75e3..71610a8dd1 100644 --- a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/response/ResponseListener.java +++ b/common/src/main/java/org/opensearch/sql/common/response/ResponseListener.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.common.response; +package org.opensearch.sql.common.response; /** * Response listener for response post-processing callback. This is necessary because execution diff --git a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/setting/Settings.java b/common/src/main/java/org/opensearch/sql/common/setting/Settings.java similarity index 95% rename from common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/setting/Settings.java rename to common/src/main/java/org/opensearch/sql/common/setting/Settings.java index b5b00aba4c..4251e3492a 100644 --- a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/setting/Settings.java +++ b/common/src/main/java/org/opensearch/sql/common/setting/Settings.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.common.setting; +package org.opensearch.sql.common.setting; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/utils/LogUtils.java b/common/src/main/java/org/opensearch/sql/common/utils/LogUtils.java similarity index 97% rename from common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/utils/LogUtils.java rename to common/src/main/java/org/opensearch/sql/common/utils/LogUtils.java index b623e8e402..936facd5b1 100644 --- a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/utils/LogUtils.java +++ b/common/src/main/java/org/opensearch/sql/common/utils/LogUtils.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.common.utils; +package org.opensearch.sql.common.utils; import java.util.Map; import java.util.UUID; diff --git a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/utils/StringUtils.java b/common/src/main/java/org/opensearch/sql/common/utils/StringUtils.java similarity index 98% rename from common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/utils/StringUtils.java rename to common/src/main/java/org/opensearch/sql/common/utils/StringUtils.java index a04450fa18..fef69e728f 100644 --- a/common/src/main/java/com/amazon/opendistroforelasticsearch/sql/common/utils/StringUtils.java +++ b/common/src/main/java/org/opensearch/sql/common/utils/StringUtils.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.common.utils; +package org.opensearch.sql.common.utils; import com.google.common.base.Strings; import java.util.IllegalFormatException; diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml index bb76a38b97..ff366c9457 100644 --- a/config/checkstyle/suppressions.xml +++ b/config/checkstyle/suppressions.xml @@ -5,8 +5,8 @@ - - - + + + \ No newline at end of file diff --git a/core/build.gradle b/core/build.gradle index b40d585efe..69acf5cef3 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -104,4 +104,4 @@ jacocoTestCoverageVerification { })) } } -check.dependsOn jacocoTestCoverageVerification \ No newline at end of file +check.dependsOn jacocoTestCoverageVerification diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/AnalysisContext.java b/core/src/main/java/org/opensearch/sql/analysis/AnalysisContext.java similarity index 96% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/AnalysisContext.java rename to core/src/main/java/org/opensearch/sql/analysis/AnalysisContext.java index 540dabfa10..1a9effe99f 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/AnalysisContext.java +++ b/core/src/main/java/org/opensearch/sql/analysis/AnalysisContext.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; import java.util.Objects; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/Analyzer.java b/core/src/main/java/org/opensearch/sql/analysis/Analyzer.java similarity index 77% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/Analyzer.java rename to core/src/main/java/org/opensearch/sql/analysis/Analyzer.java index 344eb85076..1c290cdb0d 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/Analyzer.java +++ b/core/src/main/java/org/opensearch/sql/analysis/Analyzer.java @@ -24,62 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.analysis; - -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder.NULL_FIRST; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder.NULL_LAST; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.ASC; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.DESC; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; - -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Namespace; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Symbol; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Argument; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Field; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Let; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Literal; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Map; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Aggregation; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Dedupe; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Eval; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Filter; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Head; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Limit; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Project; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Relation; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RelationSubquery; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Rename; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Values; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprMissingValue; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.LiteralExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.Aggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalAggregation; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalDedupe; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalEval; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalFilter; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalLimit; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalProject; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRareTopN; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRemove; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRename; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalSort; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalValues; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; -import com.amazon.opendistroforelasticsearch.sql.storage.Table; +package org.opensearch.sql.analysis; + +import static org.opensearch.sql.ast.tree.Sort.NullOrder.NULL_FIRST; +import static org.opensearch.sql.ast.tree.Sort.NullOrder.NULL_LAST; +import static org.opensearch.sql.ast.tree.Sort.SortOrder.ASC; +import static org.opensearch.sql.ast.tree.Sort.SortOrder.DESC; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; + import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList.Builder; import com.google.common.collect.ImmutableMap; @@ -90,6 +42,54 @@ import java.util.stream.Collectors; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.analysis.symbol.Namespace; +import org.opensearch.sql.analysis.symbol.Symbol; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.Argument; +import org.opensearch.sql.ast.expression.Field; +import org.opensearch.sql.ast.expression.Let; +import org.opensearch.sql.ast.expression.Literal; +import org.opensearch.sql.ast.expression.Map; +import org.opensearch.sql.ast.expression.UnresolvedExpression; +import org.opensearch.sql.ast.tree.Aggregation; +import org.opensearch.sql.ast.tree.Dedupe; +import org.opensearch.sql.ast.tree.Eval; +import org.opensearch.sql.ast.tree.Filter; +import org.opensearch.sql.ast.tree.Head; +import org.opensearch.sql.ast.tree.Limit; +import org.opensearch.sql.ast.tree.Project; +import org.opensearch.sql.ast.tree.RareTopN; +import org.opensearch.sql.ast.tree.Relation; +import org.opensearch.sql.ast.tree.RelationSubquery; +import org.opensearch.sql.ast.tree.Rename; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.ast.tree.Sort.SortOption; +import org.opensearch.sql.ast.tree.UnresolvedPlan; +import org.opensearch.sql.ast.tree.Values; +import org.opensearch.sql.data.model.ExprMissingValue; +import org.opensearch.sql.exception.SemanticCheckException; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.LiteralExpression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.Aggregator; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.planner.logical.LogicalAggregation; +import org.opensearch.sql.planner.logical.LogicalDedupe; +import org.opensearch.sql.planner.logical.LogicalEval; +import org.opensearch.sql.planner.logical.LogicalFilter; +import org.opensearch.sql.planner.logical.LogicalLimit; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalProject; +import org.opensearch.sql.planner.logical.LogicalRareTopN; +import org.opensearch.sql.planner.logical.LogicalRelation; +import org.opensearch.sql.planner.logical.LogicalRemove; +import org.opensearch.sql.planner.logical.LogicalRename; +import org.opensearch.sql.planner.logical.LogicalSort; +import org.opensearch.sql.planner.logical.LogicalValues; +import org.opensearch.sql.storage.StorageEngine; +import org.opensearch.sql.storage.Table; /** * Analyze the {@link UnresolvedPlan} in the {@link AnalysisContext} to construct the {@link diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/ExpressionAnalyzer.java b/core/src/main/java/org/opensearch/sql/analysis/ExpressionAnalyzer.java similarity index 74% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/ExpressionAnalyzer.java rename to core/src/main/java/org/opensearch/sql/analysis/ExpressionAnalyzer.java index 98e6b9d810..0f207c0374 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/ExpressionAnalyzer.java +++ b/core/src/main/java/org/opensearch/sql/analysis/ExpressionAnalyzer.java @@ -24,45 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.analysis; - -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Namespace; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Symbol; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AggregateFunction; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AllFields; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.And; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Case; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Cast; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Compare; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.EqualTo; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Field; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Function; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Interval; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Literal; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Not; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Or; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.QualifiedName; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedAttribute; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.When; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.WindowFunction; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Xor; -import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxCheckException; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.AggregationState; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.Aggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases.CaseClause; -import com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases.WhenClause; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.window.aggregation.AggregateWindowFunction; +package org.opensearch.sql.analysis; + import com.google.common.collect.ImmutableSet; import java.util.ArrayList; import java.util.Arrays; @@ -71,6 +34,43 @@ import java.util.Optional; import java.util.stream.Collectors; import lombok.Getter; +import org.opensearch.sql.analysis.symbol.Namespace; +import org.opensearch.sql.analysis.symbol.Symbol; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.AggregateFunction; +import org.opensearch.sql.ast.expression.AllFields; +import org.opensearch.sql.ast.expression.And; +import org.opensearch.sql.ast.expression.Case; +import org.opensearch.sql.ast.expression.Cast; +import org.opensearch.sql.ast.expression.Compare; +import org.opensearch.sql.ast.expression.EqualTo; +import org.opensearch.sql.ast.expression.Field; +import org.opensearch.sql.ast.expression.Function; +import org.opensearch.sql.ast.expression.Interval; +import org.opensearch.sql.ast.expression.Literal; +import org.opensearch.sql.ast.expression.Not; +import org.opensearch.sql.ast.expression.Or; +import org.opensearch.sql.ast.expression.QualifiedName; +import org.opensearch.sql.ast.expression.UnresolvedAttribute; +import org.opensearch.sql.ast.expression.UnresolvedExpression; +import org.opensearch.sql.ast.expression.When; +import org.opensearch.sql.ast.expression.WindowFunction; +import org.opensearch.sql.ast.expression.Xor; +import org.opensearch.sql.common.antlr.SyntaxCheckException; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.exception.SemanticCheckException; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.AggregationState; +import org.opensearch.sql.expression.aggregation.Aggregator; +import org.opensearch.sql.expression.conditional.cases.CaseClause; +import org.opensearch.sql.expression.conditional.cases.WhenClause; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.expression.function.FunctionName; +import org.opensearch.sql.expression.window.aggregation.AggregateWindowFunction; /** * Analyze the {@link UnresolvedExpression} in the {@link AnalysisContext} to construct the {@link diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/ExpressionReferenceOptimizer.java b/core/src/main/java/org/opensearch/sql/analysis/ExpressionReferenceOptimizer.java similarity index 82% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/ExpressionReferenceOptimizer.java rename to core/src/main/java/org/opensearch/sql/analysis/ExpressionReferenceOptimizer.java index 0ca69d68a5..e14920087b 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/ExpressionReferenceOptimizer.java +++ b/core/src/main/java/org/opensearch/sql/analysis/ExpressionReferenceOptimizer.java @@ -26,25 +26,25 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.analysis; - -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.Aggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases.CaseClause; -import com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases.WhenClause; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalAggregation; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalWindow; +package org.opensearch.sql.analysis; + import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionNodeVisitor; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.Aggregator; +import org.opensearch.sql.expression.conditional.cases.CaseClause; +import org.opensearch.sql.expression.conditional.cases.WhenClause; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.planner.logical.LogicalAggregation; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalPlanNodeVisitor; +import org.opensearch.sql.planner.logical.LogicalWindow; /** * The optimizer used to replace the expression referred in the SelectClause diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/NamedExpressionAnalyzer.java b/core/src/main/java/org/opensearch/sql/analysis/NamedExpressionAnalyzer.java similarity index 80% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/NamedExpressionAnalyzer.java rename to core/src/main/java/org/opensearch/sql/analysis/NamedExpressionAnalyzer.java index cedc291d5f..2ad8731760 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/NamedExpressionAnalyzer.java +++ b/core/src/main/java/org/opensearch/sql/analysis/NamedExpressionAnalyzer.java @@ -26,15 +26,15 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Alias; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.QualifiedName; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.Alias; +import org.opensearch.sql.ast.expression.QualifiedName; +import org.opensearch.sql.ast.expression.UnresolvedExpression; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.NamedExpression; /** * Analyze the Alias node in the {@link AnalysisContext} to construct the list of diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/QualifierAnalyzer.java b/core/src/main/java/org/opensearch/sql/analysis/QualifierAnalyzer.java similarity index 86% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/QualifierAnalyzer.java rename to core/src/main/java/org/opensearch/sql/analysis/QualifierAnalyzer.java index e106ef022c..fc37e8efb0 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/QualifierAnalyzer.java +++ b/core/src/main/java/org/opensearch/sql/analysis/QualifierAnalyzer.java @@ -25,16 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Namespace; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Symbol; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.QualifiedName; -import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxCheckException; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; import java.util.Arrays; import java.util.Optional; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.analysis.symbol.Namespace; +import org.opensearch.sql.analysis.symbol.Symbol; +import org.opensearch.sql.ast.expression.QualifiedName; +import org.opensearch.sql.common.antlr.SyntaxCheckException; +import org.opensearch.sql.exception.SemanticCheckException; /** * Analyzer that analyzes qualifier(s) in a full field name. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/SelectExpressionAnalyzer.java b/core/src/main/java/org/opensearch/sql/analysis/SelectExpressionAnalyzer.java similarity index 84% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/SelectExpressionAnalyzer.java rename to core/src/main/java/org/opensearch/sql/analysis/SelectExpressionAnalyzer.java index d678714738..7287a68497 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/SelectExpressionAnalyzer.java +++ b/core/src/main/java/org/opensearch/sql/analysis/SelectExpressionAnalyzer.java @@ -26,26 +26,26 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Namespace; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Alias; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AllFields; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Field; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.QualifiedName; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; import com.google.common.collect.ImmutableList; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.analysis.symbol.Namespace; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.Alias; +import org.opensearch.sql.ast.expression.AllFields; +import org.opensearch.sql.ast.expression.Field; +import org.opensearch.sql.ast.expression.QualifiedName; +import org.opensearch.sql.ast.expression.UnresolvedExpression; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.ReferenceExpression; /** * Analyze the select list in the {@link AnalysisContext} to construct the list of diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/TypeEnvironment.java b/core/src/main/java/org/opensearch/sql/analysis/TypeEnvironment.java similarity index 82% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/TypeEnvironment.java rename to core/src/main/java/org/opensearch/sql/analysis/TypeEnvironment.java index ff1913c1dd..a251a9494d 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/TypeEnvironment.java +++ b/core/src/main/java/org/opensearch/sql/analysis/TypeEnvironment.java @@ -24,20 +24,20 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Namespace; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Symbol; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.SymbolTable; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import java.util.LinkedHashMap; import java.util.Map; import java.util.Optional; import lombok.Getter; +import org.opensearch.sql.analysis.symbol.Namespace; +import org.opensearch.sql.analysis.symbol.Symbol; +import org.opensearch.sql.analysis.symbol.SymbolTable; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.exception.SemanticCheckException; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.env.Environment; /** * The definition of Type Environment. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/WindowExpressionAnalyzer.java b/core/src/main/java/org/opensearch/sql/analysis/WindowExpressionAnalyzer.java similarity index 77% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/WindowExpressionAnalyzer.java rename to core/src/main/java/org/opensearch/sql/analysis/WindowExpressionAnalyzer.java index 56422c4a74..2ec480970e 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/WindowExpressionAnalyzer.java +++ b/core/src/main/java/org/opensearch/sql/analysis/WindowExpressionAnalyzer.java @@ -25,29 +25,29 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.analysis; - -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption.DEFAULT_DESC; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.ASC; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.DESC; - -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Alias; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.WindowFunction; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalSort; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalWindow; +package org.opensearch.sql.analysis; + +import static org.opensearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; +import static org.opensearch.sql.ast.tree.Sort.SortOption.DEFAULT_DESC; +import static org.opensearch.sql.ast.tree.Sort.SortOrder.ASC; +import static org.opensearch.sql.ast.tree.Sort.SortOrder.DESC; + import java.util.List; import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.Alias; +import org.opensearch.sql.ast.expression.UnresolvedExpression; +import org.opensearch.sql.ast.expression.WindowFunction; +import org.opensearch.sql.ast.tree.Sort.SortOption; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.window.WindowDefinition; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalSort; +import org.opensearch.sql.planner.logical.LogicalWindow; /** * Window expression analyzer that analyzes window function expression in expression list diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/symbol/Namespace.java b/core/src/main/java/org/opensearch/sql/analysis/symbol/Namespace.java similarity index 94% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/symbol/Namespace.java rename to core/src/main/java/org/opensearch/sql/analysis/symbol/Namespace.java index 052c449869..02298cf7fa 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/symbol/Namespace.java +++ b/core/src/main/java/org/opensearch/sql/analysis/symbol/Namespace.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.analysis.symbol; +package org.opensearch.sql.analysis.symbol; /** * Namespace of symbol to avoid naming conflict. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/symbol/Symbol.java b/core/src/main/java/org/opensearch/sql/analysis/symbol/Symbol.java similarity index 94% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/symbol/Symbol.java rename to core/src/main/java/org/opensearch/sql/analysis/symbol/Symbol.java index 12c7758662..42a817ff80 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/symbol/Symbol.java +++ b/core/src/main/java/org/opensearch/sql/analysis/symbol/Symbol.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.analysis.symbol; +package org.opensearch.sql.analysis.symbol; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/symbol/SymbolTable.java b/core/src/main/java/org/opensearch/sql/analysis/symbol/SymbolTable.java similarity index 97% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/symbol/SymbolTable.java rename to core/src/main/java/org/opensearch/sql/analysis/symbol/SymbolTable.java index e57f9b2d58..ad4c0c6aab 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/analysis/symbol/SymbolTable.java +++ b/core/src/main/java/org/opensearch/sql/analysis/symbol/SymbolTable.java @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.analysis.symbol; +package org.opensearch.sql.analysis.symbol; import static java.util.Collections.emptyMap; import static java.util.Collections.emptyNavigableMap; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import java.util.EnumMap; import java.util.LinkedHashMap; import java.util.Map; import java.util.NavigableMap; import java.util.Optional; import java.util.TreeMap; +import org.opensearch.sql.data.type.ExprType; /** * Symbol table for symbol definition and resolution. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/AbstractNodeVisitor.java b/core/src/main/java/org/opensearch/sql/ast/AbstractNodeVisitor.java similarity index 65% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/AbstractNodeVisitor.java rename to core/src/main/java/org/opensearch/sql/ast/AbstractNodeVisitor.java index 72f60a86ad..7e2cfc90a3 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/AbstractNodeVisitor.java +++ b/core/src/main/java/org/opensearch/sql/ast/AbstractNodeVisitor.java @@ -24,46 +24,46 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast; - -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AggregateFunction; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Alias; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AllFields; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.And; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Argument; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AttributeList; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Case; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Cast; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Compare; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.EqualTo; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Field; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Function; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.In; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Interval; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Let; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Literal; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Map; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Not; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Or; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.QualifiedName; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedArgument; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedAttribute; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.When; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.WindowFunction; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Xor; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Aggregation; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Dedupe; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Eval; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Filter; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Head; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Limit; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Project; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Relation; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RelationSubquery; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Rename; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Values; +package org.opensearch.sql.ast; + +import org.opensearch.sql.ast.expression.AggregateFunction; +import org.opensearch.sql.ast.expression.Alias; +import org.opensearch.sql.ast.expression.AllFields; +import org.opensearch.sql.ast.expression.And; +import org.opensearch.sql.ast.expression.Argument; +import org.opensearch.sql.ast.expression.AttributeList; +import org.opensearch.sql.ast.expression.Case; +import org.opensearch.sql.ast.expression.Cast; +import org.opensearch.sql.ast.expression.Compare; +import org.opensearch.sql.ast.expression.EqualTo; +import org.opensearch.sql.ast.expression.Field; +import org.opensearch.sql.ast.expression.Function; +import org.opensearch.sql.ast.expression.In; +import org.opensearch.sql.ast.expression.Interval; +import org.opensearch.sql.ast.expression.Let; +import org.opensearch.sql.ast.expression.Literal; +import org.opensearch.sql.ast.expression.Map; +import org.opensearch.sql.ast.expression.Not; +import org.opensearch.sql.ast.expression.Or; +import org.opensearch.sql.ast.expression.QualifiedName; +import org.opensearch.sql.ast.expression.UnresolvedArgument; +import org.opensearch.sql.ast.expression.UnresolvedAttribute; +import org.opensearch.sql.ast.expression.When; +import org.opensearch.sql.ast.expression.WindowFunction; +import org.opensearch.sql.ast.expression.Xor; +import org.opensearch.sql.ast.tree.Aggregation; +import org.opensearch.sql.ast.tree.Dedupe; +import org.opensearch.sql.ast.tree.Eval; +import org.opensearch.sql.ast.tree.Filter; +import org.opensearch.sql.ast.tree.Head; +import org.opensearch.sql.ast.tree.Limit; +import org.opensearch.sql.ast.tree.Project; +import org.opensearch.sql.ast.tree.RareTopN; +import org.opensearch.sql.ast.tree.Relation; +import org.opensearch.sql.ast.tree.RelationSubquery; +import org.opensearch.sql.ast.tree.Rename; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.ast.tree.Values; /** * AST nodes visitor Defines the traverse path. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/Node.java b/core/src/main/java/org/opensearch/sql/ast/Node.java similarity index 95% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/Node.java rename to core/src/main/java/org/opensearch/sql/ast/Node.java index 34fac80de4..2eea44e2ed 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/Node.java +++ b/core/src/main/java/org/opensearch/sql/ast/Node.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast; +package org.opensearch.sql.ast; import java.util.List; import lombok.EqualsAndHashCode; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/dsl/AstDSL.java b/core/src/main/java/org/opensearch/sql/ast/dsl/AstDSL.java similarity index 78% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/dsl/AstDSL.java rename to core/src/main/java/org/opensearch/sql/ast/dsl/AstDSL.java index afc505239a..5f784c7e93 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/dsl/AstDSL.java +++ b/core/src/main/java/org/opensearch/sql/ast/dsl/AstDSL.java @@ -24,54 +24,54 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.dsl; - -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AggregateFunction; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Alias; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AllFields; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.And; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Argument; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Case; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Cast; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Compare; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.DataType; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.EqualTo; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Field; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Function; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.In; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Interval; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Let; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Literal; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Map; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Not; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Or; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.QualifiedName; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedArgument; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedAttribute; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.When; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.WindowFunction; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Xor; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Aggregation; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Dedupe; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Eval; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Filter; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Head; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Limit; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Project; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Relation; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RelationSubquery; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Rename; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Values; +package org.opensearch.sql.ast.dsl; + import java.util.Arrays; import java.util.List; import lombok.experimental.UtilityClass; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.expression.AggregateFunction; +import org.opensearch.sql.ast.expression.Alias; +import org.opensearch.sql.ast.expression.AllFields; +import org.opensearch.sql.ast.expression.And; +import org.opensearch.sql.ast.expression.Argument; +import org.opensearch.sql.ast.expression.Case; +import org.opensearch.sql.ast.expression.Cast; +import org.opensearch.sql.ast.expression.Compare; +import org.opensearch.sql.ast.expression.DataType; +import org.opensearch.sql.ast.expression.EqualTo; +import org.opensearch.sql.ast.expression.Field; +import org.opensearch.sql.ast.expression.Function; +import org.opensearch.sql.ast.expression.In; +import org.opensearch.sql.ast.expression.Interval; +import org.opensearch.sql.ast.expression.Let; +import org.opensearch.sql.ast.expression.Literal; +import org.opensearch.sql.ast.expression.Map; +import org.opensearch.sql.ast.expression.Not; +import org.opensearch.sql.ast.expression.Or; +import org.opensearch.sql.ast.expression.QualifiedName; +import org.opensearch.sql.ast.expression.UnresolvedArgument; +import org.opensearch.sql.ast.expression.UnresolvedAttribute; +import org.opensearch.sql.ast.expression.UnresolvedExpression; +import org.opensearch.sql.ast.expression.When; +import org.opensearch.sql.ast.expression.WindowFunction; +import org.opensearch.sql.ast.expression.Xor; +import org.opensearch.sql.ast.tree.Aggregation; +import org.opensearch.sql.ast.tree.Dedupe; +import org.opensearch.sql.ast.tree.Eval; +import org.opensearch.sql.ast.tree.Filter; +import org.opensearch.sql.ast.tree.Head; +import org.opensearch.sql.ast.tree.Limit; +import org.opensearch.sql.ast.tree.Project; +import org.opensearch.sql.ast.tree.RareTopN; +import org.opensearch.sql.ast.tree.RareTopN.CommandType; +import org.opensearch.sql.ast.tree.Relation; +import org.opensearch.sql.ast.tree.RelationSubquery; +import org.opensearch.sql.ast.tree.Rename; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.ast.tree.Sort.SortOption; +import org.opensearch.sql.ast.tree.UnresolvedPlan; +import org.opensearch.sql.ast.tree.Values; /** * Class of static methods to create specific node instances. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/AggregateFunction.java b/core/src/main/java/org/opensearch/sql/ast/expression/AggregateFunction.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/AggregateFunction.java rename to core/src/main/java/org/opensearch/sql/ast/expression/AggregateFunction.java index 4dd11830b2..8753e35ed9 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/AggregateFunction.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/AggregateFunction.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils; import java.util.Collections; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.common.utils.StringUtils; /** * Expression node of aggregate functions. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Alias.java b/core/src/main/java/org/opensearch/sql/ast/expression/Alias.java similarity index 93% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Alias.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Alias.java index 5c70330392..cbcc9bb93d 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Alias.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Alias.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Alias abstraction that associate an unnamed expression with a name and an optional alias. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/AllFields.java b/core/src/main/java/org/opensearch/sql/ast/expression/AllFields.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/AllFields.java rename to core/src/main/java/org/opensearch/sql/ast/expression/AllFields.java index 6a4c1eecd4..e0a2faa045 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/AllFields.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/AllFields.java @@ -26,14 +26,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.Node; import java.util.Collections; import java.util.List; import lombok.EqualsAndHashCode; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.Node; /** * Represent the All fields which is been used in SELECT *. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/And.java b/core/src/main/java/org/opensearch/sql/ast/expression/And.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/And.java rename to core/src/main/java/org/opensearch/sql/ast/expression/And.java index a7249563cf..dea0efb7d8 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/And.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/And.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import java.util.Arrays; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Expression node of logic AND. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Argument.java b/core/src/main/java/org/opensearch/sql/ast/expression/Argument.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Argument.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Argument.java index a7267d7201..b48b6572d1 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Argument.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Argument.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import java.util.Arrays; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Argument. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/AttributeList.java b/core/src/main/java/org/opensearch/sql/ast/expression/AttributeList.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/AttributeList.java rename to core/src/main/java/org/opensearch/sql/ast/expression/AttributeList.java index fbbe7cd75f..ba60d08616 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/AttributeList.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/AttributeList.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Expression node that includes a list of Expression nodes. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Case.java b/core/src/main/java/org/opensearch/sql/ast/expression/Case.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Case.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Case.java index 2ecd78c181..52407c5a38 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Case.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Case.java @@ -25,16 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.Node; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.Node; /** * AST node that represents CASE clause similar as Switch statement in programming language. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Cast.java b/core/src/main/java/org/opensearch/sql/ast/expression/Cast.java similarity index 69% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Cast.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Cast.java index baec1b7556..382ef325ff 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Cast.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Cast.java @@ -26,21 +26,18 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.CAST_TO_BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.CAST_TO_DATE; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.CAST_TO_DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.CAST_TO_FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.CAST_TO_INT; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.CAST_TO_LONG; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.CAST_TO_STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.CAST_TO_TIME; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.CAST_TO_TIMESTAMP; +import static org.opensearch.sql.expression.function.BuiltinFunctionName.CAST_TO_BOOLEAN; +import static org.opensearch.sql.expression.function.BuiltinFunctionName.CAST_TO_DATE; +import static org.opensearch.sql.expression.function.BuiltinFunctionName.CAST_TO_DOUBLE; +import static org.opensearch.sql.expression.function.BuiltinFunctionName.CAST_TO_FLOAT; +import static org.opensearch.sql.expression.function.BuiltinFunctionName.CAST_TO_INT; +import static org.opensearch.sql.expression.function.BuiltinFunctionName.CAST_TO_LONG; +import static org.opensearch.sql.expression.function.BuiltinFunctionName.CAST_TO_STRING; +import static org.opensearch.sql.expression.function.BuiltinFunctionName.CAST_TO_TIME; +import static org.opensearch.sql.expression.function.BuiltinFunctionName.CAST_TO_TIMESTAMP; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.Node; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; import com.google.common.collect.ImmutableMap; import java.util.Collections; import java.util.List; @@ -50,6 +47,9 @@ import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.Node; +import org.opensearch.sql.expression.function.FunctionName; /** * AST node that represents Cast clause. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Compare.java b/core/src/main/java/org/opensearch/sql/ast/expression/Compare.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Compare.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Compare.java index 062460d3b0..727c1e01c7 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Compare.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Compare.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import java.util.Arrays; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; @Getter @ToString diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/DataType.java b/core/src/main/java/org/opensearch/sql/ast/expression/DataType.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/DataType.java rename to core/src/main/java/org/opensearch/sql/ast/expression/DataType.java index 5150ff8377..916a7bd71d 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/DataType.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/DataType.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.type.ExprCoreType; /** * The DataType defintion in AST. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/EqualTo.java b/core/src/main/java/org/opensearch/sql/ast/expression/EqualTo.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/EqualTo.java rename to core/src/main/java/org/opensearch/sql/ast/expression/EqualTo.java index b9a23e4d8c..a1523a124c 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/EqualTo.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/EqualTo.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import java.util.Arrays; import java.util.List; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Expression node of binary operator or comparison relation EQUAL. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Field.java b/core/src/main/java/org/opensearch/sql/ast/expression/Field.java similarity index 93% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Field.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Field.java index c2437432be..ed7be29ca0 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Field.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Field.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import com.google.common.collect.ImmutableList; import java.util.Collections; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; @Getter @ToString diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Function.java b/core/src/main/java/org/opensearch/sql/ast/expression/Function.java similarity index 93% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Function.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Function.java index 04aca7d1cb..664d0868b3 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Function.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Function.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/In.java b/core/src/main/java/org/opensearch/sql/ast/expression/In.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/In.java rename to core/src/main/java/org/opensearch/sql/ast/expression/In.java index 1e70efd50e..5952b0ac1a 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/In.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/In.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import java.util.Arrays; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Expression node of one-to-many mapping relation IN. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Interval.java b/core/src/main/java/org/opensearch/sql/ast/expression/Interval.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Interval.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Interval.java index 8df1c3336b..fb81a3c714 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Interval.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Interval.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import java.util.Collections; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; @Getter @ToString diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/IntervalUnit.java b/core/src/main/java/org/opensearch/sql/ast/expression/IntervalUnit.java similarity index 96% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/IntervalUnit.java rename to core/src/main/java/org/opensearch/sql/ast/expression/IntervalUnit.java index 9f0884a02c..3969508216 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/IntervalUnit.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/IntervalUnit.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; import com.google.common.collect.ImmutableList; import java.util.List; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Let.java b/core/src/main/java/org/opensearch/sql/ast/expression/Let.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Let.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Let.java index e58a9746ee..6dd6ddaf83 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Let.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Let.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Represent the assign operation. e.g. velocity = distance/speed. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Literal.java b/core/src/main/java/org/opensearch/sql/ast/expression/Literal.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Literal.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Literal.java index 5737c723d9..ed74cb848f 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Literal.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Literal.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Expression node of literal type diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Map.java b/core/src/main/java/org/opensearch/sql/ast/expression/Map.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Map.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Map.java index da367f1877..dfed1b50fd 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Map.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Map.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import java.util.Arrays; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Expression node of one-to-one mapping relation. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Not.java b/core/src/main/java/org/opensearch/sql/ast/expression/Not.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Not.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Not.java index b486eaf473..74e2af64f0 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Not.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Not.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import java.util.Arrays; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Expression node of the logic NOT. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Or.java b/core/src/main/java/org/opensearch/sql/ast/expression/Or.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Or.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Or.java index fac00971e1..bd335d48fe 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Or.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Or.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import java.util.Arrays; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Expression node of the logic OR. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/QualifiedName.java b/core/src/main/java/org/opensearch/sql/ast/expression/QualifiedName.java similarity index 96% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/QualifiedName.java rename to core/src/main/java/org/opensearch/sql/ast/expression/QualifiedName.java index 4c828aafa6..89bcb22366 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/QualifiedName.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/QualifiedName.java @@ -24,12 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import com.google.common.collect.ImmutableList; import java.util.ArrayList; import java.util.Arrays; @@ -39,6 +38,7 @@ import java.util.stream.StreamSupport; import lombok.EqualsAndHashCode; import lombok.Getter; +import org.opensearch.sql.ast.AbstractNodeVisitor; @Getter @EqualsAndHashCode(callSuper = false) diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/UnresolvedArgument.java b/core/src/main/java/org/opensearch/sql/ast/expression/UnresolvedArgument.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/UnresolvedArgument.java rename to core/src/main/java/org/opensearch/sql/ast/expression/UnresolvedArgument.java index d253820e99..cbc62c5308 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/UnresolvedArgument.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/UnresolvedArgument.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import java.util.Arrays; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Argument. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/UnresolvedAttribute.java b/core/src/main/java/org/opensearch/sql/ast/expression/UnresolvedAttribute.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/UnresolvedAttribute.java rename to core/src/main/java/org/opensearch/sql/ast/expression/UnresolvedAttribute.java index 63c7ee564d..1c74c5f864 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/UnresolvedAttribute.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/UnresolvedAttribute.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Expression node, representing the syntax that is not resolved to diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/UnresolvedExpression.java b/core/src/main/java/org/opensearch/sql/ast/expression/UnresolvedExpression.java similarity index 85% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/UnresolvedExpression.java rename to core/src/main/java/org/opensearch/sql/ast/expression/UnresolvedExpression.java index 1199c0dcc0..d3014a8b5f 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/UnresolvedExpression.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/UnresolvedExpression.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.Node; import lombok.EqualsAndHashCode; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.Node; @EqualsAndHashCode(callSuper = false) @ToString diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/When.java b/core/src/main/java/org/opensearch/sql/ast/expression/When.java similarity index 90% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/When.java rename to core/src/main/java/org/opensearch/sql/ast/expression/When.java index d39909e086..37eaf6b71d 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/When.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/When.java @@ -25,16 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.Node; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.Node; /** * AST node that represents WHEN clause. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/WindowFunction.java b/core/src/main/java/org/opensearch/sql/ast/expression/WindowFunction.java similarity index 87% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/WindowFunction.java rename to core/src/main/java/org/opensearch/sql/ast/expression/WindowFunction.java index 6801c1080a..d3bd06e4b6 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/WindowFunction.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/WindowFunction.java @@ -25,11 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.Node; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.AllArgsConstructor; @@ -38,6 +35,9 @@ import lombok.RequiredArgsConstructor; import lombok.ToString; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.Node; +import org.opensearch.sql.ast.tree.Sort.SortOption; @AllArgsConstructor @EqualsAndHashCode(callSuper = false) diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Xor.java b/core/src/main/java/org/opensearch/sql/ast/expression/Xor.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Xor.java rename to core/src/main/java/org/opensearch/sql/ast/expression/Xor.java index 1915213260..a0520c84ea 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/Xor.java +++ b/core/src/main/java/org/opensearch/sql/ast/expression/Xor.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import java.util.Arrays; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Expression node of the logic XOR. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Aggregation.java b/core/src/main/java/org/opensearch/sql/ast/tree/Aggregation.java similarity index 90% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Aggregation.java rename to core/src/main/java/org/opensearch/sql/ast/tree/Aggregation.java index c5c80f6a9a..fef0c963ec 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Aggregation.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/Aggregation.java @@ -24,11 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Argument; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; import com.google.common.collect.ImmutableList; import java.util.Collections; import java.util.List; @@ -36,6 +33,9 @@ import lombok.Getter; import lombok.Setter; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.Argument; +import org.opensearch.sql.ast.expression.UnresolvedExpression; /** * Logical plan node of Aggregation, the interface for building aggregation actions in queries. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Dedupe.java b/core/src/main/java/org/opensearch/sql/ast/tree/Dedupe.java similarity index 86% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Dedupe.java rename to core/src/main/java/org/opensearch/sql/ast/tree/Dedupe.java index 92facab60d..b69ea2e6c1 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Dedupe.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/Dedupe.java @@ -24,11 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Argument; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Field; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.AllArgsConstructor; @@ -37,6 +34,9 @@ import lombok.RequiredArgsConstructor; import lombok.Setter; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.Argument; +import org.opensearch.sql.ast.expression.Field; /** * AST node represent Dedupe operation. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Eval.java b/core/src/main/java/org/opensearch/sql/ast/tree/Eval.java similarity index 89% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Eval.java rename to core/src/main/java/org/opensearch/sql/ast/tree/Eval.java index 07ab9ff410..330ce608ac 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Eval.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/Eval.java @@ -24,10 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Let; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.EqualsAndHashCode; @@ -35,6 +33,8 @@ import lombok.RequiredArgsConstructor; import lombok.Setter; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.Let; /** * AST node represent Eval operation. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Filter.java b/core/src/main/java/org/opensearch/sql/ast/tree/Filter.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Filter.java rename to core/src/main/java/org/opensearch/sql/ast/tree/Filter.java index 9c598f1b18..63786a58ac 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Filter.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/Filter.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.UnresolvedExpression; /** * Logical plan node of Filter, the interface for building filters in queries. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Head.java b/core/src/main/java/org/opensearch/sql/ast/tree/Head.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Head.java rename to core/src/main/java/org/opensearch/sql/ast/tree/Head.java index 4548f57076..96839023ff 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Head.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/Head.java @@ -24,9 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.AllArgsConstructor; @@ -35,6 +34,7 @@ import lombok.RequiredArgsConstructor; import lombok.Setter; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * AST node represent Head operation. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Limit.java b/core/src/main/java/org/opensearch/sql/ast/tree/Limit.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Limit.java rename to core/src/main/java/org/opensearch/sql/ast/tree/Limit.java index 1721b77647..0ea11b6d34 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Limit.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/Limit.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; @RequiredArgsConstructor @Getter diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Project.java b/core/src/main/java/org/opensearch/sql/ast/tree/Project.java similarity index 89% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Project.java rename to core/src/main/java/org/opensearch/sql/ast/tree/Project.java index 62a9d429b3..fb5841fce4 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Project.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/Project.java @@ -24,11 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Argument; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; import com.google.common.collect.ImmutableList; import java.util.Collections; import java.util.List; @@ -36,6 +33,9 @@ import lombok.Getter; import lombok.Setter; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.Argument; +import org.opensearch.sql.ast.expression.UnresolvedExpression; /** * Logical plan node of Project, the interface for building the list of searching fields. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/RareTopN.java b/core/src/main/java/org/opensearch/sql/ast/tree/RareTopN.java similarity index 84% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/RareTopN.java rename to core/src/main/java/org/opensearch/sql/ast/tree/RareTopN.java index 35ecda1c84..cf9ba60245 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/RareTopN.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/RareTopN.java @@ -24,12 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Argument; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Field; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; import java.util.Collections; import java.util.List; import lombok.AllArgsConstructor; @@ -38,6 +34,10 @@ import lombok.RequiredArgsConstructor; import lombok.Setter; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.Argument; +import org.opensearch.sql.ast.expression.Field; +import org.opensearch.sql.ast.expression.UnresolvedExpression; /** * AST node represent RareTopN operation. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Relation.java b/core/src/main/java/org/opensearch/sql/ast/tree/Relation.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Relation.java rename to core/src/main/java/org/opensearch/sql/ast/tree/Relation.java index 72b884f955..b3fa9825fa 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Relation.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/Relation.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.UnresolvedExpression; /** * Logical plan node of Relation, the interface for building the searching sources. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/RelationSubquery.java b/core/src/main/java/org/opensearch/sql/ast/tree/RelationSubquery.java similarity index 93% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/RelationSubquery.java rename to core/src/main/java/org/opensearch/sql/ast/tree/RelationSubquery.java index 7bcd5e75ec..9d898ee34b 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/RelationSubquery.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/RelationSubquery.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; /** * Logical plan node of RelationSubquery. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Rename.java b/core/src/main/java/org/opensearch/sql/ast/tree/Rename.java similarity index 90% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Rename.java rename to core/src/main/java/org/opensearch/sql/ast/tree/Rename.java index cefc969323..187a20f156 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Rename.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/Rename.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Map; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.Map; @ToString @EqualsAndHashCode(callSuper = false) diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Sort.java b/core/src/main/java/org/opensearch/sql/ast/tree/Sort.java similarity index 80% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Sort.java rename to core/src/main/java/org/opensearch/sql/ast/tree/Sort.java index 2a432ff657..c7bae58f00 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Sort.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/Sort.java @@ -24,15 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder.NULL_FIRST; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder.NULL_LAST; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.ASC; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.DESC; +import static org.opensearch.sql.ast.tree.Sort.NullOrder.NULL_FIRST; +import static org.opensearch.sql.ast.tree.Sort.NullOrder.NULL_LAST; +import static org.opensearch.sql.ast.tree.Sort.SortOrder.ASC; +import static org.opensearch.sql.ast.tree.Sort.SortOrder.DESC; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Field; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.AllArgsConstructor; @@ -41,6 +39,8 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.Field; /** * AST node for Sort {@link Sort#sortList} represent a list of sort expression and sort options. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/UnresolvedPlan.java b/core/src/main/java/org/opensearch/sql/ast/tree/UnresolvedPlan.java similarity index 87% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/UnresolvedPlan.java rename to core/src/main/java/org/opensearch/sql/ast/tree/UnresolvedPlan.java index 1a4f651cf3..dd2b81b276 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/UnresolvedPlan.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/UnresolvedPlan.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.Node; import lombok.EqualsAndHashCode; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.Node; /** * Abstract unresolved plan. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Values.java b/core/src/main/java/org/opensearch/sql/ast/tree/Values.java similarity index 86% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Values.java rename to core/src/main/java/org/opensearch/sql/ast/tree/Values.java index c1719dd24b..0e9dedcd83 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/Values.java +++ b/core/src/main/java/org/opensearch/sql/ast/tree/Values.java @@ -25,17 +25,17 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.Node; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Literal; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.Node; +import org.opensearch.sql.ast.expression.Literal; /** * AST node class for a sequence of literal values. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/AbstractExprNumberValue.java b/core/src/main/java/org/opensearch/sql/data/model/AbstractExprNumberValue.java similarity index 96% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/AbstractExprNumberValue.java rename to core/src/main/java/org/opensearch/sql/data/model/AbstractExprNumberValue.java index 3ad2f40b81..b270e4aace 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/AbstractExprNumberValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/AbstractExprNumberValue.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; import com.google.common.base.Objects; import lombok.RequiredArgsConstructor; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/AbstractExprValue.java b/core/src/main/java/org/opensearch/sql/data/model/AbstractExprValue.java similarity index 94% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/AbstractExprValue.java rename to core/src/main/java/org/opensearch/sql/data/model/AbstractExprValue.java index 2b03ecb43a..08ce0f47fd 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/AbstractExprValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/AbstractExprValue.java @@ -26,9 +26,9 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.exception.ExpressionEvaluationException; /** * Abstract ExprValue. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprBooleanValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprBooleanValue.java similarity index 90% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprBooleanValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprBooleanValue.java index 7fcf2b60ef..bd5c1213d9 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprBooleanValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprBooleanValue.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import com.google.common.base.Objects; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; /** * Expression Boolean Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprByteValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprByteValue.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprByteValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprByteValue.java index e1c2f1b2de..46cc416c66 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprByteValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprByteValue.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; /** * Expression Byte Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprCollectionValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprCollectionValue.java similarity index 93% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprCollectionValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprCollectionValue.java index 4a055c7426..41ece1954d 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprCollectionValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprCollectionValue.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import com.google.common.base.Objects; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; /** * Expression Collection Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprDateValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprDateValue.java similarity index 90% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprDateValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprDateValue.java index 988e1199a3..1e6b7c1715 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprDateValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprDateValue.java @@ -26,11 +26,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; import com.google.common.base.Objects; import java.time.Instant; import java.time.LocalDate; @@ -41,6 +38,9 @@ import java.time.format.DateTimeFormatter; import java.time.format.DateTimeParseException; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.exception.SemanticCheckException; /** * Expression Date Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprDatetimeValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprDatetimeValue.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprDatetimeValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprDatetimeValue.java index 8a2d4a50ec..c077de6398 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprDatetimeValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprDatetimeValue.java @@ -24,11 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; import com.google.common.base.Objects; import java.time.Instant; import java.time.LocalDate; @@ -42,6 +39,9 @@ import java.time.temporal.ChronoField; import java.time.temporal.ChronoUnit; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.exception.SemanticCheckException; @RequiredArgsConstructor public class ExprDatetimeValue extends AbstractExprValue { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprDoubleValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprDoubleValue.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprDoubleValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprDoubleValue.java index e9f96b0818..2ee096a655 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprDoubleValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprDoubleValue.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; /** * Expression Double Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprFloatValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprFloatValue.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprFloatValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprFloatValue.java index d30f3bd109..69cf8ac060 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprFloatValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprFloatValue.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; /** * Expression Float Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprIntegerValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprIntegerValue.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprIntegerValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprIntegerValue.java index 2e4730c34c..98cd02f3d6 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprIntegerValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprIntegerValue.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; /** * Expression Integer Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprIntervalValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprIntervalValue.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprIntervalValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprIntervalValue.java index c322ee4c5d..9c04ec14cd 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprIntervalValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprIntervalValue.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import java.time.temporal.TemporalAmount; import java.time.temporal.TemporalUnit; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.exception.ExpressionEvaluationException; @RequiredArgsConstructor public class ExprIntervalValue extends AbstractExprValue { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprLongValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprLongValue.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprLongValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprLongValue.java index 2453bf1721..564919e1fe 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprLongValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprLongValue.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; /** * Expression Long Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprMissingValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprMissingValue.java similarity index 90% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprMissingValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprMissingValue.java index 2b6f456394..8b7a7f1200 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprMissingValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprMissingValue.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import java.util.Objects; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; /** * Expression Missing Value. @@ -82,4 +82,4 @@ public int hashCode() { public String toString() { return "MISSING"; } -} \ No newline at end of file +} diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprNullValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprNullValue.java similarity index 90% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprNullValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprNullValue.java index 1db3a2528b..43d6bee923 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprNullValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprNullValue.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import java.util.Objects; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; /** * Expression Null Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprShortValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprShortValue.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprShortValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprShortValue.java index df75ecfa37..8d08529c1f 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprShortValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprShortValue.java @@ -26,10 +26,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; /** * Expression Short Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprStringValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprStringValue.java similarity index 90% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprStringValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprStringValue.java index 77ffdb7db6..a7807d6a06 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprStringValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprStringValue.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.util.Objects; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.exception.SemanticCheckException; /** * Expression String Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprTimeValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprTimeValue.java similarity index 90% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprTimeValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprTimeValue.java index c74a935225..7ff5b48d3d 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprTimeValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprTimeValue.java @@ -26,11 +26,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; import java.time.LocalTime; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; @@ -38,6 +35,9 @@ import java.time.temporal.ChronoField; import java.util.Objects; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.exception.SemanticCheckException; /** * Expression Time Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprTimestampValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprTimestampValue.java similarity index 93% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprTimestampValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprTimestampValue.java index 201b3f4858..f3ffdb7c42 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprTimestampValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprTimestampValue.java @@ -26,11 +26,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; @@ -43,6 +40,9 @@ import java.time.temporal.ChronoUnit; import java.util.Objects; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.exception.SemanticCheckException; /** * Expression Timestamp Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprTupleValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprTupleValue.java similarity index 90% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprTupleValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprTupleValue.java index c182e6d41e..da4a3ce2aa 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprTupleValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprTupleValue.java @@ -24,12 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple.BindingTuple; -import com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple.LazyBindingTuple; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; @@ -37,6 +33,10 @@ import java.util.Objects; import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.storage.bindingtuple.BindingTuple; +import org.opensearch.sql.storage.bindingtuple.LazyBindingTuple; /** * Expression Tuple Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprValue.java similarity index 93% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprValue.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprValue.java index 594c87501d..39ed66874f 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprValue.java @@ -24,12 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple.BindingTuple; import java.io.Serializable; import java.time.Instant; import java.time.LocalDate; @@ -38,6 +34,10 @@ import java.time.temporal.TemporalAmount; import java.util.List; import java.util.Map; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.storage.bindingtuple.BindingTuple; /** * The definition of the Expression Value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprValueUtils.java b/core/src/main/java/org/opensearch/sql/data/model/ExprValueUtils.java similarity index 96% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprValueUtils.java rename to core/src/main/java/org/opensearch/sql/data/model/ExprValueUtils.java index 9436640541..e2c5fb6a39 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprValueUtils.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprValueUtils.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import java.time.temporal.TemporalAmount; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import lombok.experimental.UtilityClass; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.exception.ExpressionEvaluationException; /** * The definition of {@link ExprValue} factory. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/type/ExprCoreType.java b/core/src/main/java/org/opensearch/sql/data/type/ExprCoreType.java similarity index 98% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/type/ExprCoreType.java rename to core/src/main/java/org/opensearch/sql/data/type/ExprCoreType.java index 89607192c4..3b37cfbf31 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/type/ExprCoreType.java +++ b/core/src/main/java/org/opensearch/sql/data/type/ExprCoreType.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.data.type; +package org.opensearch.sql.data.type; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/type/ExprType.java b/core/src/main/java/org/opensearch/sql/data/type/ExprType.java similarity index 85% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/type/ExprType.java rename to core/src/main/java/org/opensearch/sql/data/type/ExprType.java index f989b02b07..a26f758b20 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/type/ExprType.java +++ b/core/src/main/java/org/opensearch/sql/data/type/ExprType.java @@ -26,14 +26,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.data.type; +package org.opensearch.sql.data.type; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.UNKNOWN; +import static org.opensearch.sql.data.type.ExprCoreType.UNKNOWN; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.Arrays; import java.util.List; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.Expression; /** * The Type of {@link Expression} and {@link ExprValue}. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/type/WideningTypeRule.java b/core/src/main/java/org/opensearch/sql/data/type/WideningTypeRule.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/type/WideningTypeRule.java rename to core/src/main/java/org/opensearch/sql/data/type/WideningTypeRule.java index db843de6d7..a63b770da1 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/type/WideningTypeRule.java +++ b/core/src/main/java/org/opensearch/sql/data/type/WideningTypeRule.java @@ -26,12 +26,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.data.type; +package org.opensearch.sql.data.type; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.UNKNOWN; +import static org.opensearch.sql.data.type.ExprCoreType.UNKNOWN; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import lombok.experimental.UtilityClass; +import org.opensearch.sql.exception.ExpressionEvaluationException; /** * The definition of widening type rule for expression value. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/ExprValueOrdering.java b/core/src/main/java/org/opensearch/sql/data/utils/ExprValueOrdering.java similarity index 85% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/ExprValueOrdering.java rename to core/src/main/java/org/opensearch/sql/data/utils/ExprValueOrdering.java index 4888087976..6617aa6b49 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/ExprValueOrdering.java +++ b/core/src/main/java/org/opensearch/sql/data/utils/ExprValueOrdering.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.utils; +package org.opensearch.sql.data.utils; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; import com.google.common.collect.Ordering; import java.util.Comparator; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprValue; /** * Idea from guava {@link Ordering}. The only difference is the special logic to handle {@link - * com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue} and {@link - * com.amazon.opendistroforelasticsearch.sql.data.model.ExprMissingValue} + * org.opensearch.sql.data.model.ExprNullValue} and {@link + * org.opensearch.sql.data.model.ExprMissingValue} */ @RequiredArgsConstructor public abstract class ExprValueOrdering implements Comparator { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NaturalExprValueOrdering.java b/core/src/main/java/org/opensearch/sql/data/utils/NaturalExprValueOrdering.java similarity index 86% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NaturalExprValueOrdering.java rename to core/src/main/java/org/opensearch/sql/data/utils/NaturalExprValueOrdering.java index 235b0339d0..c976722ea7 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NaturalExprValueOrdering.java +++ b/core/src/main/java/org/opensearch/sql/data/utils/NaturalExprValueOrdering.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.utils; +package org.opensearch.sql.data.utils; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; import com.google.common.collect.Ordering; +import org.opensearch.sql.data.model.ExprValue; /** * Idea from guava {@link Ordering}. The only difference is the special logic to handle {@link - * com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue} and {@link - * com.amazon.opendistroforelasticsearch.sql.data.model.ExprMissingValue} + * org.opensearch.sql.data.model.ExprNullValue} and {@link + * org.opensearch.sql.data.model.ExprMissingValue} */ public class NaturalExprValueOrdering extends ExprValueOrdering { static final ExprValueOrdering INSTANCE = new NaturalExprValueOrdering(); diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NullsFirstExprValueOrdering.java b/core/src/main/java/org/opensearch/sql/data/utils/NullsFirstExprValueOrdering.java similarity index 86% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NullsFirstExprValueOrdering.java rename to core/src/main/java/org/opensearch/sql/data/utils/NullsFirstExprValueOrdering.java index 3baf7cdca4..4d8afd5e02 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NullsFirstExprValueOrdering.java +++ b/core/src/main/java/org/opensearch/sql/data/utils/NullsFirstExprValueOrdering.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.utils; +package org.opensearch.sql.data.utils; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; import com.google.common.collect.Ordering; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprValue; /** * Idea from guava {@link Ordering}. The only difference is the special logic to handle {@link - * com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue} and {@link - * com.amazon.opendistroforelasticsearch.sql.data.model.ExprMissingValue} + * org.opensearch.sql.data.model.ExprNullValue} and {@link + * org.opensearch.sql.data.model.ExprMissingValue} */ @RequiredArgsConstructor public class NullsFirstExprValueOrdering extends ExprValueOrdering { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NullsLastExprValueOrdering.java b/core/src/main/java/org/opensearch/sql/data/utils/NullsLastExprValueOrdering.java similarity index 86% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NullsLastExprValueOrdering.java rename to core/src/main/java/org/opensearch/sql/data/utils/NullsLastExprValueOrdering.java index 10e81ff003..191c40655e 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NullsLastExprValueOrdering.java +++ b/core/src/main/java/org/opensearch/sql/data/utils/NullsLastExprValueOrdering.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.utils; +package org.opensearch.sql.data.utils; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; import com.google.common.collect.Ordering; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprValue; /** * Idea from guava {@link Ordering}. The only difference is the special logic to handle {@link - * com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue} and {@link - * com.amazon.opendistroforelasticsearch.sql.data.model.ExprMissingValue} + * org.opensearch.sql.data.model.ExprNullValue} and {@link + * org.opensearch.sql.data.model.ExprMissingValue} */ @RequiredArgsConstructor public class NullsLastExprValueOrdering extends ExprValueOrdering { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/ReverseExprValueOrdering.java b/core/src/main/java/org/opensearch/sql/data/utils/ReverseExprValueOrdering.java similarity index 83% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/ReverseExprValueOrdering.java rename to core/src/main/java/org/opensearch/sql/data/utils/ReverseExprValueOrdering.java index 0c0d116cde..787fb98a93 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/data/utils/ReverseExprValueOrdering.java +++ b/core/src/main/java/org/opensearch/sql/data/utils/ReverseExprValueOrdering.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.utils; +package org.opensearch.sql.data.utils; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; import com.google.common.collect.Ordering; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprValue; /** * Idea from guava {@link Ordering}. The only difference is the special logic to handle {@link - * com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue} and {@link - * com.amazon.opendistroforelasticsearch.sql.data.model.ExprMissingValue} + * org.opensearch.sql.data.model.ExprNullValue} and {@link + * org.opensearch.sql.data.model.ExprMissingValue} */ @RequiredArgsConstructor public class ReverseExprValueOrdering extends ExprValueOrdering { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/exception/ExpressionEvaluationException.java b/core/src/main/java/org/opensearch/sql/exception/ExpressionEvaluationException.java similarity index 94% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/exception/ExpressionEvaluationException.java rename to core/src/main/java/org/opensearch/sql/exception/ExpressionEvaluationException.java index 0e1a9c6529..540b93abba 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/exception/ExpressionEvaluationException.java +++ b/core/src/main/java/org/opensearch/sql/exception/ExpressionEvaluationException.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.exception; +package org.opensearch.sql.exception; /** * Exception for Expression Evaluation. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/exception/QueryEngineException.java b/core/src/main/java/org/opensearch/sql/exception/QueryEngineException.java similarity index 94% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/exception/QueryEngineException.java rename to core/src/main/java/org/opensearch/sql/exception/QueryEngineException.java index a0dd7e01d0..d8825c43d8 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/exception/QueryEngineException.java +++ b/core/src/main/java/org/opensearch/sql/exception/QueryEngineException.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.exception; +package org.opensearch.sql.exception; /** * Query analysis abstract exception. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/exception/SemanticCheckException.java b/core/src/main/java/org/opensearch/sql/exception/SemanticCheckException.java similarity index 94% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/exception/SemanticCheckException.java rename to core/src/main/java/org/opensearch/sql/exception/SemanticCheckException.java index e0821d0ff0..ad17bbddf6 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/exception/SemanticCheckException.java +++ b/core/src/main/java/org/opensearch/sql/exception/SemanticCheckException.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.exception; +package org.opensearch.sql.exception; /** * Semantic Check Exception. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/executor/ExecutionEngine.java b/core/src/main/java/org/opensearch/sql/executor/ExecutionEngine.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/executor/ExecutionEngine.java rename to core/src/main/java/org/opensearch/sql/executor/ExecutionEngine.java index 86670664f8..78d532289d 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/executor/ExecutionEngine.java +++ b/core/src/main/java/org/opensearch/sql/executor/ExecutionEngine.java @@ -25,17 +25,17 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.executor; +package org.opensearch.sql.executor; -import com.amazon.opendistroforelasticsearch.sql.common.response.ResponseListener; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; import java.util.List; import java.util.Map; import lombok.AllArgsConstructor; import lombok.Data; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.common.response.ResponseListener; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.planner.physical.PhysicalPlan; /** * Execution engine that encapsulates execution details. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/executor/Explain.java b/core/src/main/java/org/opensearch/sql/executor/Explain.java similarity index 81% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/executor/Explain.java rename to core/src/main/java/org/opensearch/sql/executor/Explain.java index 20a3fed56a..e74034cee3 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/executor/Explain.java +++ b/core/src/main/java/org/opensearch/sql/executor/Explain.java @@ -25,27 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.executor; - -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.ExplainResponse; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.ExplainResponseNode; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.AggregationOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.DedupeOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.EvalOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.FilterOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.LimitOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.ProjectOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.RareTopNOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.RemoveOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.RenameOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.SortOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.ValuesOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.WindowOperator; -import com.amazon.opendistroforelasticsearch.sql.storage.TableScanOperator; +package org.opensearch.sql.executor; + import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.List; @@ -54,6 +35,25 @@ import java.util.function.Function; import java.util.stream.Collectors; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.executor.ExecutionEngine.ExplainResponse; +import org.opensearch.sql.executor.ExecutionEngine.ExplainResponseNode; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.planner.physical.AggregationOperator; +import org.opensearch.sql.planner.physical.DedupeOperator; +import org.opensearch.sql.planner.physical.EvalOperator; +import org.opensearch.sql.planner.physical.FilterOperator; +import org.opensearch.sql.planner.physical.LimitOperator; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlanNodeVisitor; +import org.opensearch.sql.planner.physical.ProjectOperator; +import org.opensearch.sql.planner.physical.RareTopNOperator; +import org.opensearch.sql.planner.physical.RemoveOperator; +import org.opensearch.sql.planner.physical.RenameOperator; +import org.opensearch.sql.planner.physical.SortOperator; +import org.opensearch.sql.planner.physical.ValuesOperator; +import org.opensearch.sql.planner.physical.WindowOperator; +import org.opensearch.sql.storage.TableScanOperator; /** * Visitor that explains a physical plan to JSON format. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/DSL.java b/core/src/main/java/org/opensearch/sql/expression/DSL.java similarity index 95% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/DSL.java rename to core/src/main/java/org/opensearch/sql/expression/DSL.java index 2e6f47de9d..7ab1324b14 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/DSL.java +++ b/core/src/main/java/org/opensearch/sql/expression/DSL.java @@ -24,22 +24,22 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression; - -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprShortValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.Aggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases.CaseClause; -import com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases.WhenClause; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.expression.window.ranking.RankingWindowFunction; +package org.opensearch.sql.expression; + import java.util.Arrays; import java.util.Collections; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprShortValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.aggregation.Aggregator; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.expression.conditional.cases.CaseClause; +import org.opensearch.sql.expression.conditional.cases.WhenClause; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.expression.window.ranking.RankingWindowFunction; @RequiredArgsConstructor public class DSL { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/Expression.java b/core/src/main/java/org/opensearch/sql/expression/Expression.java similarity index 85% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/Expression.java rename to core/src/main/java/org/opensearch/sql/expression/Expression.java index 4a5fbf82b3..6cbbe5a71b 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/Expression.java +++ b/core/src/main/java/org/opensearch/sql/expression/Expression.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression; +package org.opensearch.sql.expression; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import java.io.Serializable; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.env.Environment; /** * The definition of the resolved expression. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/ExpressionNodeVisitor.java b/core/src/main/java/org/opensearch/sql/expression/ExpressionNodeVisitor.java similarity index 85% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/ExpressionNodeVisitor.java rename to core/src/main/java/org/opensearch/sql/expression/ExpressionNodeVisitor.java index 745d57920d..b8bf9de3da 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/ExpressionNodeVisitor.java +++ b/core/src/main/java/org/opensearch/sql/expression/ExpressionNodeVisitor.java @@ -25,13 +25,13 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression; +package org.opensearch.sql.expression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.Aggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases.CaseClause; -import com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases.WhenClause; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionImplementation; +import org.opensearch.sql.expression.aggregation.Aggregator; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.expression.conditional.cases.CaseClause; +import org.opensearch.sql.expression.conditional.cases.WhenClause; +import org.opensearch.sql.expression.function.FunctionImplementation; /** * Abstract visitor for expression tree nodes. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/FunctionExpression.java b/core/src/main/java/org/opensearch/sql/expression/FunctionExpression.java similarity index 86% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/FunctionExpression.java rename to core/src/main/java/org/opensearch/sql/expression/FunctionExpression.java index 0a73b97a9f..69cf2bb216 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/FunctionExpression.java +++ b/core/src/main/java/org/opensearch/sql/expression/FunctionExpression.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression; +package org.opensearch.sql.expression; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionImplementation; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.expression.function.FunctionImplementation; +import org.opensearch.sql.expression.function.FunctionName; /** * Function Expression. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/LiteralExpression.java b/core/src/main/java/org/opensearch/sql/expression/LiteralExpression.java similarity index 84% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/LiteralExpression.java rename to core/src/main/java/org/opensearch/sql/expression/LiteralExpression.java index beb940862f..ce28156792 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/LiteralExpression.java +++ b/core/src/main/java/org/opensearch/sql/expression/LiteralExpression.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression; +package org.opensearch.sql.expression; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.env.Environment; /** * Literal Expression. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/NamedExpression.java b/core/src/main/java/org/opensearch/sql/expression/NamedExpression.java similarity index 86% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/NamedExpression.java rename to core/src/main/java/org/opensearch/sql/expression/NamedExpression.java index 95f6f112d8..885db4da7b 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/NamedExpression.java +++ b/core/src/main/java/org/opensearch/sql/expression/NamedExpression.java @@ -25,21 +25,21 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression; +package org.opensearch.sql.expression; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import com.google.common.base.Strings; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.env.Environment; /** * Named expression that represents expression with name. * Please see more details in associated unresolved expression operator - * {@link com.amazon.opendistroforelasticsearch.sql.ast.expression.Alias}. + * {@link org.opensearch.sql.ast.expression.Alias}. */ @AllArgsConstructor @EqualsAndHashCode diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/ReferenceExpression.java b/core/src/main/java/org/opensearch/sql/expression/ReferenceExpression.java similarity index 89% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/ReferenceExpression.java rename to core/src/main/java/org/opensearch/sql/expression/ReferenceExpression.java index 25880f5846..2ef577b65b 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/ReferenceExpression.java +++ b/core/src/main/java/org/opensearch/sql/expression/ReferenceExpression.java @@ -24,19 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression; +package org.opensearch.sql.expression; -import static com.amazon.opendistroforelasticsearch.sql.utils.ExpressionUtils.PATH_SEP; +import static org.opensearch.sql.utils.ExpressionUtils.PATH_SEP; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import java.util.Arrays; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.env.Environment; @EqualsAndHashCode @RequiredArgsConstructor diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AggregationState.java b/core/src/main/java/org/opensearch/sql/expression/aggregation/AggregationState.java similarity index 82% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AggregationState.java rename to core/src/main/java/org/opensearch/sql/expression/aggregation/AggregationState.java index 08c95a7153..b1c29cb4a7 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AggregationState.java +++ b/core/src/main/java/org/opensearch/sql/expression/aggregation/AggregationState.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; +package org.opensearch.sql.expression.aggregation; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple.BindingTuple; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.storage.bindingtuple.BindingTuple; /** * Maintain the state when {@link Aggregator} iterate on the {@link BindingTuple}. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/Aggregator.java b/core/src/main/java/org/opensearch/sql/expression/aggregation/Aggregator.java similarity index 76% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/Aggregator.java rename to core/src/main/java/org/opensearch/sql/expression/aggregation/Aggregator.java index ae711b81bb..80944172ea 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/Aggregator.java +++ b/core/src/main/java/org/opensearch/sql/expression/aggregation/Aggregator.java @@ -24,26 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; +package org.opensearch.sql.expression.aggregation; -import com.amazon.opendistroforelasticsearch.sql.analysis.ExpressionAnalyzer; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionImplementation; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; -import com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple.BindingTuple; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; import lombok.experimental.Accessors; +import org.opensearch.sql.analysis.ExpressionAnalyzer; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionNodeVisitor; +import org.opensearch.sql.expression.env.Environment; +import org.opensearch.sql.expression.function.FunctionImplementation; +import org.opensearch.sql.expression.function.FunctionName; +import org.opensearch.sql.storage.bindingtuple.BindingTuple; /** * Aggregator which will iterate on the {@link BindingTuple}s to aggregate the result. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AggregatorFunction.java b/core/src/main/java/org/opensearch/sql/expression/aggregation/AggregatorFunction.java similarity index 82% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AggregatorFunction.java rename to core/src/main/java/org/opensearch/sql/expression/aggregation/AggregatorFunction.java index 684c47815a..a6be7378f7 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AggregatorFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/aggregation/AggregatorFunction.java @@ -24,29 +24,29 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; +package org.opensearch.sql.expression.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATETIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIMESTAMP; +import static org.opensearch.sql.data.type.ExprCoreType.DATE; +import static org.opensearch.sql.data.type.ExprCoreType.DATETIME; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.TIME; +import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionBuilder; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionResolver; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionSignature; import com.google.common.collect.ImmutableMap; import java.util.Collections; import java.util.stream.Collectors; import lombok.experimental.UtilityClass; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.expression.function.FunctionBuilder; +import org.opensearch.sql.expression.function.FunctionName; +import org.opensearch.sql.expression.function.FunctionResolver; +import org.opensearch.sql.expression.function.FunctionSignature; /** * The definition of aggregator function diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AvgAggregator.java b/core/src/main/java/org/opensearch/sql/expression/aggregation/AvgAggregator.java similarity index 77% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AvgAggregator.java rename to core/src/main/java/org/opensearch/sql/expression/aggregation/AvgAggregator.java index e7c105f98e..0ec0a02a3c 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AvgAggregator.java +++ b/core/src/main/java/org/opensearch/sql/expression/aggregation/AvgAggregator.java @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; +package org.opensearch.sql.expression.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.utils.ExpressionUtils.format; +import static org.opensearch.sql.utils.ExpressionUtils.format; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; import java.util.List; import java.util.Locale; +import org.opensearch.sql.data.model.ExprNullValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.function.BuiltinFunctionName; /** * The average aggregator aggregate the value evaluated by the expression. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/CountAggregator.java b/core/src/main/java/org/opensearch/sql/expression/aggregation/CountAggregator.java similarity index 73% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/CountAggregator.java rename to core/src/main/java/org/opensearch/sql/expression/aggregation/CountAggregator.java index c6772a6a4c..3195bf3941 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/CountAggregator.java +++ b/core/src/main/java/org/opensearch/sql/expression/aggregation/CountAggregator.java @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; +package org.opensearch.sql.expression.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.utils.ExpressionUtils.format; +import static org.opensearch.sql.utils.ExpressionUtils.format; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.CountAggregator.CountState; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; import java.util.List; import java.util.Locale; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.aggregation.CountAggregator.CountState; +import org.opensearch.sql.expression.function.BuiltinFunctionName; public class CountAggregator extends Aggregator { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MaxAggregator.java b/core/src/main/java/org/opensearch/sql/expression/aggregation/MaxAggregator.java similarity index 76% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MaxAggregator.java rename to core/src/main/java/org/opensearch/sql/expression/aggregation/MaxAggregator.java index c36f276cad..11ad63093d 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MaxAggregator.java +++ b/core/src/main/java/org/opensearch/sql/expression/aggregation/MaxAggregator.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; +package org.opensearch.sql.expression.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.utils.ExpressionUtils.format; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.utils.ExpressionUtils.format; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; import java.util.List; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.function.BuiltinFunctionName; public class MaxAggregator extends Aggregator { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MinAggregator.java b/core/src/main/java/org/opensearch/sql/expression/aggregation/MinAggregator.java similarity index 78% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MinAggregator.java rename to core/src/main/java/org/opensearch/sql/expression/aggregation/MinAggregator.java index 20a6980367..46f69129ed 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MinAggregator.java +++ b/core/src/main/java/org/opensearch/sql/expression/aggregation/MinAggregator.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; +package org.opensearch.sql.expression.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.utils.ExpressionUtils.format; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.utils.ExpressionUtils.format; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; import java.util.List; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.function.BuiltinFunctionName; /** * The minimum aggregator aggregate the value evaluated by the expression. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/NamedAggregator.java b/core/src/main/java/org/opensearch/sql/expression/aggregation/NamedAggregator.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/NamedAggregator.java rename to core/src/main/java/org/opensearch/sql/expression/aggregation/NamedAggregator.java index 6de173ba07..a1bf2b9961 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/NamedAggregator.java +++ b/core/src/main/java/org/opensearch/sql/expression/aggregation/NamedAggregator.java @@ -26,17 +26,17 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; +package org.opensearch.sql.expression.aggregation; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionNodeVisitor; import lombok.EqualsAndHashCode; import lombok.Getter; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.ExpressionNodeVisitor; /** * NamedAggregator expression that represents expression with name. * Please see more details in associated unresolved expression operator - * {@link com.amazon.opendistroforelasticsearch.sql.ast.expression.Alias}. + * {@link org.opensearch.sql.ast.expression.Alias}. */ @EqualsAndHashCode(callSuper = false) public class NamedAggregator extends Aggregator { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/SumAggregator.java b/core/src/main/java/org/opensearch/sql/expression/aggregation/SumAggregator.java similarity index 65% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/SumAggregator.java rename to core/src/main/java/org/opensearch/sql/expression/aggregation/SumAggregator.java index db516c1b93..e658d21471 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/SumAggregator.java +++ b/core/src/main/java/org/opensearch/sql/expression/aggregation/SumAggregator.java @@ -24,28 +24,28 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; +package org.opensearch.sql.expression.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.doubleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.floatValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getDoubleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getFloatValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getIntegerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getLongValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.longValue; -import static com.amazon.opendistroforelasticsearch.sql.utils.ExpressionUtils.format; +import static org.opensearch.sql.data.model.ExprValueUtils.doubleValue; +import static org.opensearch.sql.data.model.ExprValueUtils.floatValue; +import static org.opensearch.sql.data.model.ExprValueUtils.getDoubleValue; +import static org.opensearch.sql.data.model.ExprValueUtils.getFloatValue; +import static org.opensearch.sql.data.model.ExprValueUtils.getIntegerValue; +import static org.opensearch.sql.data.model.ExprValueUtils.getLongValue; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.model.ExprValueUtils.longValue; +import static org.opensearch.sql.utils.ExpressionUtils.format; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.SumAggregator.SumState; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; import java.util.List; import java.util.Locale; +import org.opensearch.sql.data.model.ExprNullValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.aggregation.SumAggregator.SumState; +import org.opensearch.sql.expression.function.BuiltinFunctionName; /** * The sum aggregator aggregate the value evaluated by the expression. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/cases/CaseClause.java b/core/src/main/java/org/opensearch/sql/expression/conditional/cases/CaseClause.java similarity index 81% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/cases/CaseClause.java rename to core/src/main/java/org/opensearch/sql/expression/conditional/cases/CaseClause.java index c694e2462c..a95a595b8b 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/cases/CaseClause.java +++ b/core/src/main/java/org/opensearch/sql/expression/conditional/cases/CaseClause.java @@ -25,24 +25,24 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases; - -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.UNDEFINED; - -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; +package org.opensearch.sql.expression.conditional.cases; + +import static org.opensearch.sql.data.type.ExprCoreType.UNDEFINED; + import com.google.common.collect.ImmutableList; import java.util.List; import java.util.stream.Collectors; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.data.model.ExprNullValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionNodeVisitor; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.env.Environment; +import org.opensearch.sql.expression.function.FunctionName; /** * A CASE clause is very different from a regular function. Functions have well-defined signature, diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/cases/WhenClause.java b/core/src/main/java/org/opensearch/sql/expression/conditional/cases/WhenClause.java similarity index 79% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/cases/WhenClause.java rename to core/src/main/java/org/opensearch/sql/expression/conditional/cases/WhenClause.java index 159f79fd0b..7a161c0157 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/cases/WhenClause.java +++ b/core/src/main/java/org/opensearch/sql/expression/conditional/cases/WhenClause.java @@ -25,19 +25,19 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases; +package org.opensearch.sql.expression.conditional.cases; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; import com.google.common.collect.ImmutableList; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionNodeVisitor; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.env.Environment; +import org.opensearch.sql.expression.function.FunctionName; /** * WHEN clause that consists of a condition and a result corresponding. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/config/ExpressionConfig.java b/core/src/main/java/org/opensearch/sql/expression/config/ExpressionConfig.java similarity index 64% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/config/ExpressionConfig.java rename to core/src/main/java/org/opensearch/sql/expression/config/ExpressionConfig.java index afd518d7b5..42e5283ad0 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/config/ExpressionConfig.java +++ b/core/src/main/java/org/opensearch/sql/expression/config/ExpressionConfig.java @@ -24,21 +24,21 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.config; +package org.opensearch.sql.expression.config; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.AggregatorFunction; -import com.amazon.opendistroforelasticsearch.sql.expression.datetime.DateTimeFunction; -import com.amazon.opendistroforelasticsearch.sql.expression.datetime.IntervalClause; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.expression.operator.arthmetic.ArithmeticFunction; -import com.amazon.opendistroforelasticsearch.sql.expression.operator.arthmetic.MathematicalFunction; -import com.amazon.opendistroforelasticsearch.sql.expression.operator.convert.TypeCastOperator; -import com.amazon.opendistroforelasticsearch.sql.expression.operator.predicate.BinaryPredicateOperator; -import com.amazon.opendistroforelasticsearch.sql.expression.operator.predicate.UnaryPredicateOperator; -import com.amazon.opendistroforelasticsearch.sql.expression.text.TextFunction; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowFunctions; import java.util.HashMap; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.aggregation.AggregatorFunction; +import org.opensearch.sql.expression.datetime.DateTimeFunction; +import org.opensearch.sql.expression.datetime.IntervalClause; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.expression.operator.arthmetic.ArithmeticFunction; +import org.opensearch.sql.expression.operator.arthmetic.MathematicalFunction; +import org.opensearch.sql.expression.operator.convert.TypeCastOperator; +import org.opensearch.sql.expression.operator.predicate.BinaryPredicateOperator; +import org.opensearch.sql.expression.operator.predicate.UnaryPredicateOperator; +import org.opensearch.sql.expression.text.TextFunction; +import org.opensearch.sql.expression.window.WindowFunctions; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/CalendarLookup.java b/core/src/main/java/org/opensearch/sql/expression/datetime/CalendarLookup.java similarity index 95% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/CalendarLookup.java rename to core/src/main/java/org/opensearch/sql/expression/datetime/CalendarLookup.java index 01be7a8c60..b74142946e 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/CalendarLookup.java +++ b/core/src/main/java/org/opensearch/sql/expression/datetime/CalendarLookup.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.datetime; +package org.opensearch.sql.expression.datetime; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; import com.google.common.collect.ImmutableList; import java.time.LocalDate; import java.util.Arrays; import java.util.Calendar; import lombok.AllArgsConstructor; +import org.opensearch.sql.exception.SemanticCheckException; @AllArgsConstructor class CalendarLookup { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/DateTimeFormatterUtil.java b/core/src/main/java/org/opensearch/sql/expression/datetime/DateTimeFormatterUtil.java similarity index 96% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/DateTimeFormatterUtil.java rename to core/src/main/java/org/opensearch/sql/expression/datetime/DateTimeFormatterUtil.java index 56455d990f..db31961015 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/DateTimeFormatterUtil.java +++ b/core/src/main/java/org/opensearch/sql/expression/datetime/DateTimeFormatterUtil.java @@ -9,10 +9,8 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.sql.expression.datetime; +package org.opensearch.sql.expression.datetime; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; import com.google.common.collect.ImmutableMap; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @@ -20,6 +18,8 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.model.ExprValue; /** * This class converts a SQL style DATE_FORMAT format specifier and converts it to a diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/DateTimeFunction.java b/core/src/main/java/org/opensearch/sql/expression/datetime/DateTimeFunction.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/DateTimeFunction.java rename to core/src/main/java/org/opensearch/sql/expression/datetime/DateTimeFunction.java index c12c2bb475..fa6bf20c64 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/DateTimeFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/datetime/DateTimeFunction.java @@ -26,37 +26,37 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.datetime; - -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATETIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTERVAL; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIMESTAMP; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL.define; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL.impl; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL.nullMissingHandling; - -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDateValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDatetimeValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprLongValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTimeValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTimestampValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionResolver; +package org.opensearch.sql.expression.datetime; + +import static org.opensearch.sql.data.type.ExprCoreType.DATE; +import static org.opensearch.sql.data.type.ExprCoreType.DATETIME; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.INTERVAL; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.TIME; +import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP; +import static org.opensearch.sql.expression.function.FunctionDSL.define; +import static org.opensearch.sql.expression.function.FunctionDSL.impl; +import static org.opensearch.sql.expression.function.FunctionDSL.nullMissingHandling; + import java.time.LocalDate; import java.time.format.TextStyle; import java.util.Locale; import java.util.concurrent.TimeUnit; import lombok.experimental.UtilityClass; +import org.opensearch.sql.data.model.ExprDateValue; +import org.opensearch.sql.data.model.ExprDatetimeValue; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprLongValue; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.model.ExprTimeValue; +import org.opensearch.sql.data.model.ExprTimestampValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.expression.function.FunctionName; +import org.opensearch.sql.expression.function.FunctionResolver; /** * The definition of date and time functions. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/IntervalClause.java b/core/src/main/java/org/opensearch/sql/expression/datetime/IntervalClause.java similarity index 70% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/IntervalClause.java rename to core/src/main/java/org/opensearch/sql/expression/datetime/IntervalClause.java index 08f374552f..6caf22f978 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/IntervalClause.java +++ b/core/src/main/java/org/opensearch/sql/expression/datetime/IntervalClause.java @@ -24,28 +24,28 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.datetime; - -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getIntegerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getLongValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getStringValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTERVAL; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL.define; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL.impl; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL.nullMissingHandling; - -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntervalValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionResolver; +package org.opensearch.sql.expression.datetime; + +import static org.opensearch.sql.data.model.ExprValueUtils.getIntegerValue; +import static org.opensearch.sql.data.model.ExprValueUtils.getLongValue; +import static org.opensearch.sql.data.model.ExprValueUtils.getStringValue; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.INTERVAL; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.function.FunctionDSL.define; +import static org.opensearch.sql.expression.function.FunctionDSL.impl; +import static org.opensearch.sql.expression.function.FunctionDSL.nullMissingHandling; + import java.time.Duration; import java.time.Period; import lombok.experimental.UtilityClass; +import org.opensearch.sql.data.model.ExprIntervalValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.expression.function.FunctionResolver; @UtilityClass public class IntervalClause { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/env/Environment.java b/core/src/main/java/org/opensearch/sql/expression/env/Environment.java similarity index 96% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/env/Environment.java rename to core/src/main/java/org/opensearch/sql/expression/env/Environment.java index c6400a2e7f..74ce339ed5 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/env/Environment.java +++ b/core/src/main/java/org/opensearch/sql/expression/env/Environment.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.env; +package org.opensearch.sql.expression.env; /** * The definition of the environment. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/BuiltinFunctionName.java b/core/src/main/java/org/opensearch/sql/expression/function/BuiltinFunctionName.java similarity index 98% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/BuiltinFunctionName.java rename to core/src/main/java/org/opensearch/sql/expression/function/BuiltinFunctionName.java index 0cd2d0cd0a..56c4339410 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/BuiltinFunctionName.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/BuiltinFunctionName.java @@ -9,7 +9,7 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; import com.google.common.collect.ImmutableMap; import java.util.Map; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/BuiltinFunctionRepository.java b/core/src/main/java/org/opensearch/sql/expression/function/BuiltinFunctionRepository.java similarity index 89% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/BuiltinFunctionRepository.java rename to core/src/main/java/org/opensearch/sql/expression/function/BuiltinFunctionRepository.java index 546c9a0f3e..ebb432d7f0 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/BuiltinFunctionRepository.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/BuiltinFunctionRepository.java @@ -9,14 +9,14 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.Expression; /** * Builtin Function Repository. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionBuilder.java b/core/src/main/java/org/opensearch/sql/expression/function/FunctionBuilder.java similarity index 90% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionBuilder.java rename to core/src/main/java/org/opensearch/sql/expression/function/FunctionBuilder.java index 870370ae2f..da13f5c940 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionBuilder.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/FunctionBuilder.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.List; +import org.opensearch.sql.expression.Expression; /** * The definition of function which create {@link FunctionImplementation} diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionDSL.java b/core/src/main/java/org/opensearch/sql/expression/function/FunctionDSL.java similarity index 95% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionDSL.java rename to core/src/main/java/org/opensearch/sql/expression/function/FunctionDSL.java index 165afb3737..8457ccda3e 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionDSL.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/FunctionDSL.java @@ -26,14 +26,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -41,6 +35,12 @@ import java.util.stream.Collectors; import lombok.experimental.UtilityClass; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.env.Environment; /** * Function Define Utility. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionImplementation.java b/core/src/main/java/org/opensearch/sql/expression/function/FunctionImplementation.java similarity index 89% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionImplementation.java rename to core/src/main/java/org/opensearch/sql/expression/function/FunctionImplementation.java index 69746ff14d..08b0b703c9 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionImplementation.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/FunctionImplementation.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.List; +import org.opensearch.sql.expression.Expression; /** * The definition of Function Implementation. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionName.java b/core/src/main/java/org/opensearch/sql/expression/function/FunctionName.java similarity index 95% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionName.java rename to core/src/main/java/org/opensearch/sql/expression/function/FunctionName.java index 162d44cc2d..62b6b0f912 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionName.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/FunctionName.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; import java.io.Serializable; import lombok.EqualsAndHashCode; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionResolver.java b/core/src/main/java/org/opensearch/sql/expression/function/FunctionResolver.java similarity index 93% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionResolver.java rename to core/src/main/java/org/opensearch/sql/expression/function/FunctionResolver.java index c2c5156eec..d9d01be891 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionResolver.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/FunctionResolver.java @@ -9,9 +9,8 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import java.util.AbstractMap; import java.util.Map; import java.util.PriorityQueue; @@ -21,6 +20,7 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Singular; +import org.opensearch.sql.exception.ExpressionEvaluationException; /** * The Function Resolver hold the overload {@link FunctionBuilder} implementation. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionSignature.java b/core/src/main/java/org/opensearch/sql/expression/function/FunctionSignature.java similarity index 90% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionSignature.java rename to core/src/main/java/org/opensearch/sql/expression/function/FunctionSignature.java index a0aac6335c..7ef05c67fc 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionSignature.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/FunctionSignature.java @@ -9,15 +9,15 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.data.type.WideningTypeRule; import java.util.List; import java.util.stream.Collectors; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.data.type.WideningTypeRule; /** * Function signature is composed by function name and arguments list. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/SerializableBiFunction.java b/core/src/main/java/org/opensearch/sql/expression/function/SerializableBiFunction.java similarity index 94% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/SerializableBiFunction.java rename to core/src/main/java/org/opensearch/sql/expression/function/SerializableBiFunction.java index 9470d7db49..7acb60fecc 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/SerializableBiFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/SerializableBiFunction.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; import java.io.Serializable; import java.util.function.BiFunction; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/SerializableFunction.java b/core/src/main/java/org/opensearch/sql/expression/function/SerializableFunction.java similarity index 93% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/SerializableFunction.java rename to core/src/main/java/org/opensearch/sql/expression/function/SerializableFunction.java index ec12957203..947760ce62 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/SerializableFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/SerializableFunction.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; import java.io.Serializable; import java.util.function.Function; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/SerializableNoArgFunction.java b/core/src/main/java/org/opensearch/sql/expression/function/SerializableNoArgFunction.java similarity index 94% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/SerializableNoArgFunction.java rename to core/src/main/java/org/opensearch/sql/expression/function/SerializableNoArgFunction.java index 2c47b247ed..19eb181813 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/SerializableNoArgFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/SerializableNoArgFunction.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; import java.io.Serializable; import java.util.function.Supplier; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/SerializableTriFunction.java b/core/src/main/java/org/opensearch/sql/expression/function/SerializableTriFunction.java similarity index 95% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/SerializableTriFunction.java rename to core/src/main/java/org/opensearch/sql/expression/function/SerializableTriFunction.java index d1275d9fa5..f807939784 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/SerializableTriFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/SerializableTriFunction.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; import java.io.Serializable; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/ArithmeticFunction.java b/core/src/main/java/org/opensearch/sql/expression/operator/arthmetic/ArithmeticFunction.java similarity index 85% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/ArithmeticFunction.java rename to core/src/main/java/org/opensearch/sql/expression/operator/arthmetic/ArithmeticFunction.java index babe02733b..e5964e94af 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/ArithmeticFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/operator/arthmetic/ArithmeticFunction.java @@ -24,27 +24,27 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.operator.arthmetic; +package org.opensearch.sql.expression.operator.arthmetic; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BYTE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.SHORT; +import static org.opensearch.sql.data.type.ExprCoreType.BYTE; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.SHORT; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprByteValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDoubleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprFloatValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprLongValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprShortValue; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionResolver; import lombok.experimental.UtilityClass; +import org.opensearch.sql.data.model.ExprByteValue; +import org.opensearch.sql.data.model.ExprDoubleValue; +import org.opensearch.sql.data.model.ExprFloatValue; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprLongValue; +import org.opensearch.sql.data.model.ExprNullValue; +import org.opensearch.sql.data.model.ExprShortValue; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.expression.function.FunctionDSL; +import org.opensearch.sql.expression.function.FunctionResolver; /** * The definition of arithmetic function diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/MathematicalFunction.java b/core/src/main/java/org/opensearch/sql/expression/operator/arthmetic/MathematicalFunction.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/MathematicalFunction.java rename to core/src/main/java/org/opensearch/sql/expression/operator/arthmetic/MathematicalFunction.java index 4330dc430d..20f32ef1dd 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/MathematicalFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/operator/arthmetic/MathematicalFunction.java @@ -24,34 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.operator.arthmetic; - -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BYTE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.SHORT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; - -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprByteValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDoubleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprFloatValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprLongValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprShortValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionBuilder; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionResolver; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionSignature; -import com.amazon.opendistroforelasticsearch.sql.expression.function.SerializableFunction; +package org.opensearch.sql.expression.operator.arthmetic; + +import static org.opensearch.sql.data.type.ExprCoreType.BYTE; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.SHORT; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; + import com.google.common.collect.ImmutableList; import java.math.BigDecimal; import java.math.RoundingMode; @@ -62,6 +44,24 @@ import java.util.zip.CRC32; import lombok.experimental.UtilityClass; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.data.model.ExprByteValue; +import org.opensearch.sql.data.model.ExprDoubleValue; +import org.opensearch.sql.data.model.ExprFloatValue; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprLongValue; +import org.opensearch.sql.data.model.ExprNullValue; +import org.opensearch.sql.data.model.ExprShortValue; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.expression.function.FunctionBuilder; +import org.opensearch.sql.expression.function.FunctionDSL; +import org.opensearch.sql.expression.function.FunctionName; +import org.opensearch.sql.expression.function.FunctionResolver; +import org.opensearch.sql.expression.function.FunctionSignature; +import org.opensearch.sql.expression.function.SerializableFunction; @UtilityClass public class MathematicalFunction { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/convert/TypeCastOperator.java b/core/src/main/java/org/opensearch/sql/expression/operator/convert/TypeCastOperator.java similarity index 71% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/convert/TypeCastOperator.java rename to core/src/main/java/org/opensearch/sql/expression/operator/convert/TypeCastOperator.java index d6a03dc372..df6b6f935f 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/convert/TypeCastOperator.java +++ b/core/src/main/java/org/opensearch/sql/expression/operator/convert/TypeCastOperator.java @@ -26,40 +26,40 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.operator.convert; +package org.opensearch.sql.expression.operator.convert; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BYTE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATETIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.SHORT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIMESTAMP; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL.impl; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL.nullMissingHandling; +import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN; +import static org.opensearch.sql.data.type.ExprCoreType.BYTE; +import static org.opensearch.sql.data.type.ExprCoreType.DATE; +import static org.opensearch.sql.data.type.ExprCoreType.DATETIME; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.SHORT; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.TIME; +import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP; +import static org.opensearch.sql.expression.function.FunctionDSL.impl; +import static org.opensearch.sql.expression.function.FunctionDSL.nullMissingHandling; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprBooleanValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDateValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDoubleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprFloatValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprLongValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTimeValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTimestampValue; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionResolver; import java.util.Arrays; import java.util.stream.Collectors; import java.util.stream.Stream; import lombok.experimental.UtilityClass; +import org.opensearch.sql.data.model.ExprBooleanValue; +import org.opensearch.sql.data.model.ExprDateValue; +import org.opensearch.sql.data.model.ExprDoubleValue; +import org.opensearch.sql.data.model.ExprFloatValue; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprLongValue; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.model.ExprTimeValue; +import org.opensearch.sql.data.model.ExprTimestampValue; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.expression.function.FunctionDSL; +import org.opensearch.sql.expression.function.FunctionResolver; @UtilityClass public class TypeCastOperator { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/predicate/BinaryPredicateOperator.java b/core/src/main/java/org/opensearch/sql/expression/operator/predicate/BinaryPredicateOperator.java similarity index 87% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/predicate/BinaryPredicateOperator.java rename to core/src/main/java/org/opensearch/sql/expression/operator/predicate/BinaryPredicateOperator.java index 4b597b8c2d..45067cb411 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/predicate/BinaryPredicateOperator.java +++ b/core/src/main/java/org/opensearch/sql/expression/operator/predicate/BinaryPredicateOperator.java @@ -24,28 +24,28 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.operator.predicate; +package org.opensearch.sql.expression.operator.predicate; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; +import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprBooleanValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionResolver; -import com.amazon.opendistroforelasticsearch.sql.utils.OperatorUtils; import com.google.common.collect.ImmutableTable; import com.google.common.collect.Table; import java.util.stream.Collectors; import lombok.experimental.UtilityClass; +import org.opensearch.sql.data.model.ExprBooleanValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.expression.function.FunctionDSL; +import org.opensearch.sql.expression.function.FunctionResolver; +import org.opensearch.sql.utils.OperatorUtils; /** * The definition of binary predicate function diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/predicate/UnaryPredicateOperator.java b/core/src/main/java/org/opensearch/sql/expression/operator/predicate/UnaryPredicateOperator.java similarity index 78% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/predicate/UnaryPredicateOperator.java rename to core/src/main/java/org/opensearch/sql/expression/operator/predicate/UnaryPredicateOperator.java index f8204d3d24..597d7b814c 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/predicate/UnaryPredicateOperator.java +++ b/core/src/main/java/org/opensearch/sql/expression/operator/predicate/UnaryPredicateOperator.java @@ -24,28 +24,28 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.operator.predicate; - -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL.impl; - -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprBooleanValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionBuilder; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionResolver; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionSignature; -import com.amazon.opendistroforelasticsearch.sql.expression.function.SerializableFunction; +package org.opensearch.sql.expression.operator.predicate; + +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; +import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN; +import static org.opensearch.sql.expression.function.FunctionDSL.impl; + import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import lombok.experimental.UtilityClass; +import org.opensearch.sql.data.model.ExprBooleanValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.expression.function.FunctionBuilder; +import org.opensearch.sql.expression.function.FunctionDSL; +import org.opensearch.sql.expression.function.FunctionName; +import org.opensearch.sql.expression.function.FunctionResolver; +import org.opensearch.sql.expression.function.FunctionSignature; +import org.opensearch.sql.expression.function.SerializableFunction; /** * The definition of unary predicate function diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/text/TextFunction.java b/core/src/main/java/org/opensearch/sql/expression/text/TextFunction.java similarity index 87% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/text/TextFunction.java rename to core/src/main/java/org/opensearch/sql/expression/text/TextFunction.java index c05bd092dd..c885e5894a 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/text/TextFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/text/TextFunction.java @@ -26,22 +26,22 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.text; - -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL.define; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL.impl; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionDSL.nullMissingHandling; - -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionResolver; +package org.opensearch.sql.expression.text; + +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.function.FunctionDSL.define; +import static org.opensearch.sql.expression.function.FunctionDSL.impl; +import static org.opensearch.sql.expression.function.FunctionDSL.nullMissingHandling; + import lombok.experimental.UtilityClass; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.expression.function.FunctionName; +import org.opensearch.sql.expression.function.FunctionResolver; /** diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/WindowDefinition.java b/core/src/main/java/org/opensearch/sql/expression/window/WindowDefinition.java similarity index 84% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/WindowDefinition.java rename to core/src/main/java/org/opensearch/sql/expression/window/WindowDefinition.java index 5a49b9bc96..1e4cd3a521 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/WindowDefinition.java +++ b/core/src/main/java/org/opensearch/sql/expression/window/WindowDefinition.java @@ -25,17 +25,17 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window; +package org.opensearch.sql.expression.window; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; +import static org.opensearch.sql.ast.tree.Sort.SortOption; +import static org.opensearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.ArrayList; import java.util.List; import lombok.Data; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.expression.Expression; /** * Window definition that consists of partition and sort by information for a window. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/WindowFunctionExpression.java b/core/src/main/java/org/opensearch/sql/expression/window/WindowFunctionExpression.java similarity index 87% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/WindowFunctionExpression.java rename to core/src/main/java/org/opensearch/sql/expression/window/WindowFunctionExpression.java index de0f16e3fb..129f1eef84 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/WindowFunctionExpression.java +++ b/core/src/main/java/org/opensearch/sql/expression/window/WindowFunctionExpression.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window; +package org.opensearch.sql.expression.window; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.window.frame.WindowFrame; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.window.frame.WindowFrame; /** * Window function abstraction. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/WindowFunctions.java b/core/src/main/java/org/opensearch/sql/expression/window/WindowFunctions.java similarity index 70% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/WindowFunctions.java rename to core/src/main/java/org/opensearch/sql/expression/window/WindowFunctions.java index 2ff6d79734..ec75862c2c 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/WindowFunctions.java +++ b/core/src/main/java/org/opensearch/sql/expression/window/WindowFunctions.java @@ -25,23 +25,23 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window; +package org.opensearch.sql.expression.window; import static java.util.Collections.emptyList; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionBuilder; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionResolver; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionSignature; -import com.amazon.opendistroforelasticsearch.sql.expression.window.ranking.DenseRankFunction; -import com.amazon.opendistroforelasticsearch.sql.expression.window.ranking.RankFunction; -import com.amazon.opendistroforelasticsearch.sql.expression.window.ranking.RankingWindowFunction; -import com.amazon.opendistroforelasticsearch.sql.expression.window.ranking.RowNumberFunction; import com.google.common.collect.ImmutableMap; import java.util.function.Supplier; import lombok.experimental.UtilityClass; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.expression.function.FunctionBuilder; +import org.opensearch.sql.expression.function.FunctionName; +import org.opensearch.sql.expression.function.FunctionResolver; +import org.opensearch.sql.expression.function.FunctionSignature; +import org.opensearch.sql.expression.window.ranking.DenseRankFunction; +import org.opensearch.sql.expression.window.ranking.RankFunction; +import org.opensearch.sql.expression.window.ranking.RankingWindowFunction; +import org.opensearch.sql.expression.window.ranking.RowNumberFunction; /** * Window functions that register all window functions in function repository. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/aggregation/AggregateWindowFunction.java b/core/src/main/java/org/opensearch/sql/expression/window/aggregation/AggregateWindowFunction.java similarity index 68% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/aggregation/AggregateWindowFunction.java rename to core/src/main/java/org/opensearch/sql/expression/window/aggregation/AggregateWindowFunction.java index 9da2de8e87..552c7afa36 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/aggregation/AggregateWindowFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/window/aggregation/AggregateWindowFunction.java @@ -25,22 +25,22 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window.aggregation; +package org.opensearch.sql.expression.window.aggregation; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.AggregationState; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.Aggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowFunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.window.frame.PeerRowsWindowFrame; -import com.amazon.opendistroforelasticsearch.sql.expression.window.frame.WindowFrame; import java.util.List; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionNodeVisitor; +import org.opensearch.sql.expression.aggregation.AggregationState; +import org.opensearch.sql.expression.aggregation.Aggregator; +import org.opensearch.sql.expression.env.Environment; +import org.opensearch.sql.expression.window.WindowDefinition; +import org.opensearch.sql.expression.window.WindowFunctionExpression; +import org.opensearch.sql.expression.window.frame.PeerRowsWindowFrame; +import org.opensearch.sql.expression.window.frame.WindowFrame; /** * Aggregate function adapter that adapts Aggregator for window operator use. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/frame/CurrentRowWindowFrame.java b/core/src/main/java/org/opensearch/sql/expression/window/frame/CurrentRowWindowFrame.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/frame/CurrentRowWindowFrame.java rename to core/src/main/java/org/opensearch/sql/expression/window/frame/CurrentRowWindowFrame.java index 4e675740c4..4fdefd332e 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/frame/CurrentRowWindowFrame.java +++ b/core/src/main/java/org/opensearch/sql/expression/window/frame/CurrentRowWindowFrame.java @@ -25,12 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window.frame; +package org.opensearch.sql.expression.window.frame; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; import com.google.common.collect.PeekingIterator; import java.util.Collections; import java.util.List; @@ -40,6 +36,10 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.env.Environment; +import org.opensearch.sql.expression.window.WindowDefinition; /** * Conceptually, cumulative window frame should hold all seen rows till next partition. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/frame/PeerRowsWindowFrame.java b/core/src/main/java/org/opensearch/sql/expression/window/frame/PeerRowsWindowFrame.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/frame/PeerRowsWindowFrame.java rename to core/src/main/java/org/opensearch/sql/expression/window/frame/PeerRowsWindowFrame.java index e5bd1b7530..7595592a92 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/frame/PeerRowsWindowFrame.java +++ b/core/src/main/java/org/opensearch/sql/expression/window/frame/PeerRowsWindowFrame.java @@ -25,12 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window.frame; +package org.opensearch.sql.expression.window.frame; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; import com.google.common.collect.PeekingIterator; import java.util.ArrayList; import java.util.Collections; @@ -38,6 +34,10 @@ import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.env.Environment; +import org.opensearch.sql.expression.window.WindowDefinition; /** * Window frame that only keep peers (tuples with same value of fields specified in sort list diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/frame/WindowFrame.java b/core/src/main/java/org/opensearch/sql/expression/window/frame/WindowFrame.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/frame/WindowFrame.java rename to core/src/main/java/org/opensearch/sql/expression/window/frame/WindowFrame.java index dd11635168..9cb0762f68 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/frame/WindowFrame.java +++ b/core/src/main/java/org/opensearch/sql/expression/window/frame/WindowFrame.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window.frame; +package org.opensearch.sql.expression.window.frame; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import com.google.common.collect.PeekingIterator; import java.util.Iterator; import java.util.List; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.env.Environment; /** * Window frame that represents a subset of a window which is all data accessible to diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/DenseRankFunction.java b/core/src/main/java/org/opensearch/sql/expression/window/ranking/DenseRankFunction.java similarity index 84% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/DenseRankFunction.java rename to core/src/main/java/org/opensearch/sql/expression/window/ranking/DenseRankFunction.java index 5c01f81bb1..3458cc9e08 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/DenseRankFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/window/ranking/DenseRankFunction.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window.ranking; +package org.opensearch.sql.expression.window.ranking; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.window.frame.CurrentRowWindowFrame; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.window.frame.CurrentRowWindowFrame; /** * Dense rank window function that assigns a rank number to each row similarly as diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/RankFunction.java b/core/src/main/java/org/opensearch/sql/expression/window/ranking/RankFunction.java similarity index 86% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/RankFunction.java rename to core/src/main/java/org/opensearch/sql/expression/window/ranking/RankFunction.java index 46a50feeab..1fa22ad747 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/RankFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/window/ranking/RankFunction.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window.ranking; +package org.opensearch.sql.expression.window.ranking; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.window.frame.CurrentRowWindowFrame; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.window.frame.CurrentRowWindowFrame; /** * Rank window function that assigns a rank number to each row based on sort items diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/RankingWindowFunction.java b/core/src/main/java/org/opensearch/sql/expression/window/ranking/RankingWindowFunction.java similarity index 75% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/RankingWindowFunction.java rename to core/src/main/java/org/opensearch/sql/expression/window/ranking/RankingWindowFunction.java index 0deea66855..e6689c8fc2 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/RankingWindowFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/window/ranking/RankingWindowFunction.java @@ -25,26 +25,26 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window.ranking; +package org.opensearch.sql.expression.window.ranking; import static java.util.Collections.emptyList; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowFunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.window.frame.CurrentRowWindowFrame; -import com.amazon.opendistroforelasticsearch.sql.expression.window.frame.WindowFrame; -import com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple.BindingTuple; import java.util.List; import java.util.stream.Collectors; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.env.Environment; +import org.opensearch.sql.expression.function.FunctionName; +import org.opensearch.sql.expression.window.WindowDefinition; +import org.opensearch.sql.expression.window.WindowFunctionExpression; +import org.opensearch.sql.expression.window.frame.CurrentRowWindowFrame; +import org.opensearch.sql.expression.window.frame.WindowFrame; +import org.opensearch.sql.storage.bindingtuple.BindingTuple; /** * Ranking window function base class that captures same info across different ranking functions, diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/RowNumberFunction.java b/core/src/main/java/org/opensearch/sql/expression/window/ranking/RowNumberFunction.java similarity index 83% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/RowNumberFunction.java rename to core/src/main/java/org/opensearch/sql/expression/window/ranking/RowNumberFunction.java index 6af23491ab..5db4d8d5a5 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/RowNumberFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/window/ranking/RowNumberFunction.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window.ranking; +package org.opensearch.sql.expression.window.ranking; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.window.frame.CurrentRowWindowFrame; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.window.frame.CurrentRowWindowFrame; /** * Row number window function that assigns row number starting from 1 to each row in a partition. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/monitor/AlwaysHealthyMonitor.java b/core/src/main/java/org/opensearch/sql/monitor/AlwaysHealthyMonitor.java similarity index 95% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/monitor/AlwaysHealthyMonitor.java rename to core/src/main/java/org/opensearch/sql/monitor/AlwaysHealthyMonitor.java index dadf3da3f4..878ef65ec2 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/monitor/AlwaysHealthyMonitor.java +++ b/core/src/main/java/org/opensearch/sql/monitor/AlwaysHealthyMonitor.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.monitor; +package org.opensearch.sql.monitor; /** * Always healthy resource monitor. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/monitor/ResourceMonitor.java b/core/src/main/java/org/opensearch/sql/monitor/ResourceMonitor.java similarity index 95% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/monitor/ResourceMonitor.java rename to core/src/main/java/org/opensearch/sql/monitor/ResourceMonitor.java index d77516f7f0..19bb0ff83a 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/monitor/ResourceMonitor.java +++ b/core/src/main/java/org/opensearch/sql/monitor/ResourceMonitor.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.monitor; +package org.opensearch.sql.monitor; /** * The abstract interface of ResourceMonitor. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/DefaultImplementor.java b/core/src/main/java/org/opensearch/sql/planner/DefaultImplementor.java similarity index 64% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/DefaultImplementor.java rename to core/src/main/java/org/opensearch/sql/planner/DefaultImplementor.java index 49413220f4..bf87f09772 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/DefaultImplementor.java +++ b/core/src/main/java/org/opensearch/sql/planner/DefaultImplementor.java @@ -25,36 +25,36 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner; - -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalAggregation; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalDedupe; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalEval; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalFilter; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalLimit; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalProject; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRareTopN; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRemove; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRename; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalSort; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalValues; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalWindow; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.AggregationOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.DedupeOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.EvalOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.FilterOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.LimitOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.ProjectOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.RareTopNOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.RemoveOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.RenameOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.SortOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.ValuesOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.WindowOperator; +package org.opensearch.sql.planner; + +import org.opensearch.sql.planner.logical.LogicalAggregation; +import org.opensearch.sql.planner.logical.LogicalDedupe; +import org.opensearch.sql.planner.logical.LogicalEval; +import org.opensearch.sql.planner.logical.LogicalFilter; +import org.opensearch.sql.planner.logical.LogicalLimit; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalPlanNodeVisitor; +import org.opensearch.sql.planner.logical.LogicalProject; +import org.opensearch.sql.planner.logical.LogicalRareTopN; +import org.opensearch.sql.planner.logical.LogicalRelation; +import org.opensearch.sql.planner.logical.LogicalRemove; +import org.opensearch.sql.planner.logical.LogicalRename; +import org.opensearch.sql.planner.logical.LogicalSort; +import org.opensearch.sql.planner.logical.LogicalValues; +import org.opensearch.sql.planner.logical.LogicalWindow; +import org.opensearch.sql.planner.physical.AggregationOperator; +import org.opensearch.sql.planner.physical.DedupeOperator; +import org.opensearch.sql.planner.physical.EvalOperator; +import org.opensearch.sql.planner.physical.FilterOperator; +import org.opensearch.sql.planner.physical.LimitOperator; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.ProjectOperator; +import org.opensearch.sql.planner.physical.RareTopNOperator; +import org.opensearch.sql.planner.physical.RemoveOperator; +import org.opensearch.sql.planner.physical.RenameOperator; +import org.opensearch.sql.planner.physical.SortOperator; +import org.opensearch.sql.planner.physical.ValuesOperator; +import org.opensearch.sql.planner.physical.WindowOperator; /** * Default implementor for implementing logical to physical translation. "Default" here means all diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/PlanNode.java b/core/src/main/java/org/opensearch/sql/planner/PlanNode.java similarity index 94% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/PlanNode.java rename to core/src/main/java/org/opensearch/sql/planner/PlanNode.java index db6685a6a7..dd2516af75 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/PlanNode.java +++ b/core/src/main/java/org/opensearch/sql/planner/PlanNode.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner; +package org.opensearch.sql.planner; import java.util.List; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/Planner.java b/core/src/main/java/org/opensearch/sql/planner/Planner.java similarity index 80% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/Planner.java rename to core/src/main/java/org/opensearch/sql/planner/Planner.java index d7ab90c3df..a0f6a16562 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/Planner.java +++ b/core/src/main/java/org/opensearch/sql/planner/Planner.java @@ -25,19 +25,19 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner; +package org.opensearch.sql.planner; import static com.google.common.base.Strings.isNullOrEmpty; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.LogicalPlanOptimizer; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; -import com.amazon.opendistroforelasticsearch.sql.storage.Table; import java.util.List; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalPlanNodeVisitor; +import org.opensearch.sql.planner.logical.LogicalRelation; +import org.opensearch.sql.planner.optimizer.LogicalPlanOptimizer; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.storage.StorageEngine; +import org.opensearch.sql.storage.Table; /** * Planner that plans and chooses the optimal physical plan. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalAggregation.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalAggregation.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalAggregation.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalAggregation.java index ca2ea210b7..18a671e8d4 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalAggregation.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalAggregation.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; import java.util.Collections; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.aggregation.NamedAggregator; /** * Logical Aggregation. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalDedupe.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalDedupe.java similarity index 93% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalDedupe.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalDedupe.java index a1b5735cff..0fc969297d 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalDedupe.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalDedupe.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.Arrays; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.expression.Expression; /** * Logical Dedupe Plan. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalEval.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalEval.java similarity index 89% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalEval.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalEval.java index 2bedab6b5b..db3942c342 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalEval.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalEval.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; import java.util.Collections; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ReferenceExpression; /** * Logical Evaluation represent the evaluation operation. The {@link LogicalEval#expressions} is a diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalFilter.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalFilter.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalFilter.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalFilter.java index 1ac5e36918..62bf683aeb 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalFilter.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalFilter.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.Collections; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.expression.Expression; /** * Logical Filter represent the filter relation. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalLimit.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalLimit.java similarity index 95% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalLimit.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalLimit.java index d6618320c8..add80e1b10 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalLimit.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalLimit.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; import java.util.Collections; import lombok.EqualsAndHashCode; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalPlan.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalPlan.java similarity index 93% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalPlan.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalPlan.java index 0f031a0b61..ba1da1a706 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalPlan.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalPlan.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.planner.PlanNode; import java.util.List; import lombok.EqualsAndHashCode; +import org.opensearch.sql.planner.PlanNode; /** * The abstract base class for all the Logical Plan node. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalPlanDSL.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalPlanDSL.java similarity index 84% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalPlanDSL.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalPlanDSL.java index 839ee80179..6cda3a733c 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalPlanDSL.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalPlanDSL.java @@ -24,22 +24,22 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; - -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.LiteralExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; +package org.opensearch.sql.planner.logical; + import com.google.common.collect.ImmutableSet; import java.util.Arrays; import java.util.List; import java.util.Map; import lombok.experimental.UtilityClass; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.tree.RareTopN.CommandType; +import org.opensearch.sql.ast.tree.Sort.SortOption; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.LiteralExpression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.expression.window.WindowDefinition; /** * Logical Plan DSL. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalPlanNodeVisitor.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalPlanNodeVisitor.java similarity index 97% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalPlanNodeVisitor.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalPlanNodeVisitor.java index 2a3d8cac4f..1d135e2b98 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalPlanNodeVisitor.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalPlanNodeVisitor.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; /** * The visitor of {@link LogicalPlan}. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalProject.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalProject.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalProject.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalProject.java index 69dc479f03..812f9a049f 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalProject.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalProject.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; import java.util.Collections; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.expression.NamedExpression; /** * Project field specified by the {@link LogicalProject#projectList}. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRareTopN.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalRareTopN.java similarity index 89% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRareTopN.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalRareTopN.java index d2d808f257..5e1050f5bf 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRareTopN.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalRareTopN.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.Collections; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.ast.tree.RareTopN.CommandType; +import org.opensearch.sql.expression.Expression; /** * Logical Rare and TopN Plan. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRelation.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalRelation.java similarity index 95% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRelation.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalRelation.java index 8654eba374..5c939d1d06 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRelation.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalRelation.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; import com.google.common.collect.ImmutableList; import lombok.EqualsAndHashCode; diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRemove.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalRemove.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRemove.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalRemove.java index 2cf45c5724..8ce735bbe6 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRemove.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalRemove.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; import java.util.Collections; import java.util.Set; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.expression.ReferenceExpression; /** * Remove field specified by the {@link LogicalRemove#removeList}. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRename.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalRename.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRename.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalRename.java index 6667a2aaa5..2bd6d7b761 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRename.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalRename.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; import java.util.Collections; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.expression.ReferenceExpression; /** * Rename Operator. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalSort.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalSort.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalSort.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalSort.java index f3a43a451f..a7ffa1fe3b 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalSort.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalSort.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.Collections; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.tree.Sort.SortOption; +import org.opensearch.sql.expression.Expression; /** * Sort Plan. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalValues.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalValues.java similarity index 93% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalValues.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalValues.java index 49ec6b8279..bdea5fec85 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalValues.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalValues.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.expression.LiteralExpression; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.expression.LiteralExpression; /** * Logical operator which is a sequence of literal rows (like a relation). diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalWindow.java b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalWindow.java similarity index 89% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalWindow.java rename to core/src/main/java/org/opensearch/sql/planner/logical/LogicalWindow.java index f05c586feb..dff2c99ad8 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalWindow.java +++ b/core/src/main/java/org/opensearch/sql/planner/logical/LogicalWindow.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; import java.util.Collections; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.window.WindowDefinition; /** * Logical operator for window function generated from project list. Logically, each window operator diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/LogicalPlanOptimizer.java b/core/src/main/java/org/opensearch/sql/planner/optimizer/LogicalPlanOptimizer.java similarity index 86% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/LogicalPlanOptimizer.java rename to core/src/main/java/org/opensearch/sql/planner/optimizer/LogicalPlanOptimizer.java index 4ddba18bf6..5c48b4c286 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/LogicalPlanOptimizer.java +++ b/core/src/main/java/org/opensearch/sql/planner/optimizer/LogicalPlanOptimizer.java @@ -26,18 +26,18 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner.optimizer; +package org.opensearch.sql.planner.optimizer; import static com.facebook.presto.matching.DefaultMatcher.DEFAULT_MATCHER; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.rule.MergeFilterAndFilter; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.rule.PushFilterUnderSort; import com.facebook.presto.matching.Match; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.optimizer.rule.MergeFilterAndFilter; +import org.opensearch.sql.planner.optimizer.rule.PushFilterUnderSort; /** * {@link LogicalPlan} Optimizer. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/Rule.java b/core/src/main/java/org/opensearch/sql/planner/optimizer/Rule.java similarity index 90% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/Rule.java rename to core/src/main/java/org/opensearch/sql/planner/optimizer/Rule.java index dfeb1b419e..1c7a026acc 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/Rule.java +++ b/core/src/main/java/org/opensearch/sql/planner/optimizer/Rule.java @@ -26,11 +26,11 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner.optimizer; +package org.opensearch.sql.planner.optimizer; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; import com.facebook.presto.matching.Captures; import com.facebook.presto.matching.Pattern; +import org.opensearch.sql.planner.logical.LogicalPlan; /** * Optimization Rule. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/pattern/Patterns.java b/core/src/main/java/org/opensearch/sql/planner/optimizer/pattern/Patterns.java similarity index 89% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/pattern/Patterns.java rename to core/src/main/java/org/opensearch/sql/planner/optimizer/pattern/Patterns.java index 52950a9e37..852b7ec4cd 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/pattern/Patterns.java +++ b/core/src/main/java/org/opensearch/sql/planner/optimizer/pattern/Patterns.java @@ -26,12 +26,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern; +package org.opensearch.sql.planner.optimizer.pattern; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; import com.facebook.presto.matching.Property; import java.util.Optional; import lombok.experimental.UtilityClass; +import org.opensearch.sql.planner.logical.LogicalPlan; /** * Pattern helper class. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/rule/MergeFilterAndFilter.java b/core/src/main/java/org/opensearch/sql/planner/optimizer/rule/MergeFilterAndFilter.java similarity index 81% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/rule/MergeFilterAndFilter.java rename to core/src/main/java/org/opensearch/sql/planner/optimizer/rule/MergeFilterAndFilter.java index cdfdb4f43e..ba89588ad7 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/rule/MergeFilterAndFilter.java +++ b/core/src/main/java/org/opensearch/sql/planner/optimizer/rule/MergeFilterAndFilter.java @@ -26,20 +26,20 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner.optimizer.rule; +package org.opensearch.sql.planner.optimizer.rule; -import static com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern.Patterns.source; import static com.facebook.presto.matching.Pattern.typeOf; +import static org.opensearch.sql.planner.optimizer.pattern.Patterns.source; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalFilter; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.Rule; import com.facebook.presto.matching.Capture; import com.facebook.presto.matching.Captures; import com.facebook.presto.matching.Pattern; import lombok.Getter; import lombok.experimental.Accessors; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.planner.logical.LogicalFilter; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.optimizer.Rule; /** * Merge Filter --> Filter to the single Filter condition. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/rule/PushFilterUnderSort.java b/core/src/main/java/org/opensearch/sql/planner/optimizer/rule/PushFilterUnderSort.java similarity index 80% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/rule/PushFilterUnderSort.java rename to core/src/main/java/org/opensearch/sql/planner/optimizer/rule/PushFilterUnderSort.java index 33e7dc9ad0..620780af53 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/rule/PushFilterUnderSort.java +++ b/core/src/main/java/org/opensearch/sql/planner/optimizer/rule/PushFilterUnderSort.java @@ -26,20 +26,20 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner.optimizer.rule; +package org.opensearch.sql.planner.optimizer.rule; -import static com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern.Patterns.source; import static com.facebook.presto.matching.Pattern.typeOf; +import static org.opensearch.sql.planner.optimizer.pattern.Patterns.source; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalFilter; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalSort; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.Rule; import com.facebook.presto.matching.Capture; import com.facebook.presto.matching.Captures; import com.facebook.presto.matching.Pattern; import lombok.Getter; import lombok.experimental.Accessors; +import org.opensearch.sql.planner.logical.LogicalFilter; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalSort; +import org.opensearch.sql.planner.optimizer.Rule; /** * Push Filter under Sort. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/AggregationOperator.java b/core/src/main/java/org/opensearch/sql/planner/physical/AggregationOperator.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/AggregationOperator.java rename to core/src/main/java/org/opensearch/sql/planner/physical/AggregationOperator.java index 34863cb5b5..9506462205 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/AggregationOperator.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/AggregationOperator.java @@ -24,16 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; - -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.AggregationState; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.Aggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple.BindingTuple; +package org.opensearch.sql.planner.physical; + import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import java.util.AbstractMap; @@ -49,6 +41,14 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.aggregation.AggregationState; +import org.opensearch.sql.expression.aggregation.Aggregator; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.storage.bindingtuple.BindingTuple; /** * Group the all the input {@link BindingTuple} by {@link AggregationOperator#groupByExprList}, diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/DedupeOperator.java b/core/src/main/java/org/opensearch/sql/planner/physical/DedupeOperator.java similarity index 95% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/DedupeOperator.java rename to core/src/main/java/org/opensearch/sql/planner/physical/DedupeOperator.java index 109af4214c..cad21bae8b 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/DedupeOperator.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/DedupeOperator.java @@ -24,11 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple.BindingTuple; import com.google.common.collect.ImmutableList; import java.util.Collections; import java.util.List; @@ -40,6 +37,9 @@ import lombok.Getter; import lombok.NonNull; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.storage.bindingtuple.BindingTuple; /** * Dedupe operator. Dedupe the input {@link ExprValue} by using the {@link diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/EvalOperator.java b/core/src/main/java/org/opensearch/sql/planner/physical/EvalOperator.java similarity index 84% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/EvalOperator.java rename to core/src/main/java/org/opensearch/sql/planner/physical/EvalOperator.java index ae94f989dc..77e0b370dc 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/EvalOperator.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/EvalOperator.java @@ -24,17 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; -import static com.amazon.opendistroforelasticsearch.sql.expression.env.Environment.extendEnv; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; +import static org.opensearch.sql.expression.env.Environment.extendEnv; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap.Builder; import java.util.Collections; @@ -47,6 +41,12 @@ import lombok.RequiredArgsConstructor; import lombok.ToString; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.env.Environment; /** * The eval operator evaluate the {@link EvalOperator#expressionList} and put the result into to diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/FilterOperator.java b/core/src/main/java/org/opensearch/sql/planner/physical/FilterOperator.java similarity index 80% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/FilterOperator.java rename to core/src/main/java/org/opensearch/sql/planner/physical/FilterOperator.java index ef093a4db2..1830d7e32f 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/FilterOperator.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/FilterOperator.java @@ -9,18 +9,18 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.operator.predicate.BinaryPredicateOperator; -import com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple.BindingTuple; import java.util.Collections; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.operator.predicate.BinaryPredicateOperator; +import org.opensearch.sql.storage.bindingtuple.BindingTuple; /** * The Filter operator use the conditions to evaluate the input {@link BindingTuple}. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/LimitOperator.java b/core/src/main/java/org/opensearch/sql/planner/physical/LimitOperator.java similarity index 94% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/LimitOperator.java rename to core/src/main/java/org/opensearch/sql/planner/physical/LimitOperator.java index 7bac8fd066..3787a7d5b5 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/LimitOperator.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/LimitOperator.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.data.model.ExprValue; /** * The limit operator sets a window, to and block the rows out of the window diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlan.java b/core/src/main/java/org/opensearch/sql/planner/physical/PhysicalPlan.java similarity index 86% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlan.java rename to core/src/main/java/org/opensearch/sql/planner/physical/PhysicalPlan.java index 9bcb9988d0..596b826d48 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlan.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/PhysicalPlan.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.planner.PlanNode; import java.util.Iterator; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.planner.PlanNode; /** * Physical plan. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlanDSL.java b/core/src/main/java/org/opensearch/sql/planner/physical/PhysicalPlanDSL.java similarity index 84% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlanDSL.java rename to core/src/main/java/org/opensearch/sql/planner/physical/PhysicalPlanDSL.java index 426b2007c7..09e4731768 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlanDSL.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/PhysicalPlanDSL.java @@ -24,22 +24,22 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; - -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.LiteralExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; +package org.opensearch.sql.planner.physical; + import com.google.common.collect.ImmutableSet; import java.util.Arrays; import java.util.List; import java.util.Map; import lombok.experimental.UtilityClass; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.tree.RareTopN.CommandType; +import org.opensearch.sql.ast.tree.Sort.SortOption; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.LiteralExpression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.expression.window.WindowDefinition; /** * Physical Plan DSL. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlanNodeVisitor.java b/core/src/main/java/org/opensearch/sql/planner/physical/PhysicalPlanNodeVisitor.java similarity index 94% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlanNodeVisitor.java rename to core/src/main/java/org/opensearch/sql/planner/physical/PhysicalPlanNodeVisitor.java index cdabd3fde4..c254ba812d 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlanNodeVisitor.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/PhysicalPlanNodeVisitor.java @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import com.amazon.opendistroforelasticsearch.sql.storage.TableScanOperator; +import org.opensearch.sql.storage.TableScanOperator; /** * The visitor of {@link PhysicalPlan}. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/ProjectOperator.java b/core/src/main/java/org/opensearch/sql/planner/physical/ProjectOperator.java similarity index 87% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/ProjectOperator.java rename to core/src/main/java/org/opensearch/sql/planner/physical/ProjectOperator.java index 03d287012a..b49b0eec80 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/ProjectOperator.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/ProjectOperator.java @@ -24,12 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap.Builder; import java.util.Collections; @@ -39,6 +35,10 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.expression.NamedExpression; /** * Project the fields specified in {@link ProjectOperator#projectList} from input. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RareTopNOperator.java b/core/src/main/java/org/opensearch/sql/planner/physical/RareTopNOperator.java similarity index 93% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RareTopNOperator.java rename to core/src/main/java/org/opensearch/sql/planner/physical/RareTopNOperator.java index 01a9e458dc..fccfed03df 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RareTopNOperator.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/RareTopNOperator.java @@ -24,13 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple.BindingTuple; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.collect.Streams; @@ -47,6 +42,11 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.ast.tree.RareTopN.CommandType; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.storage.bindingtuple.BindingTuple; /** * Group the all the input {@link BindingTuple} by {@link RareTopNOperator#groupByExprList}, diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RemoveOperator.java b/core/src/main/java/org/opensearch/sql/planner/physical/RemoveOperator.java similarity index 86% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RemoveOperator.java rename to core/src/main/java/org/opensearch/sql/planner/physical/RemoveOperator.java index 25bffa3b4b..c288047afb 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RemoveOperator.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/RemoveOperator.java @@ -24,14 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap.Builder; import java.util.Collections; @@ -43,6 +39,10 @@ import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.expression.ReferenceExpression; /** * Remove the fields specified in {@link RemoveOperator#removeList} from input. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RenameOperator.java b/core/src/main/java/org/opensearch/sql/planner/physical/RenameOperator.java similarity index 85% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RenameOperator.java rename to core/src/main/java/org/opensearch/sql/planner/physical/RenameOperator.java index 89fb5e12c5..728eded571 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RenameOperator.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/RenameOperator.java @@ -24,15 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple.BindingTuple; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap.Builder; import java.util.Collections; @@ -42,6 +37,11 @@ import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.storage.bindingtuple.BindingTuple; /** * Rename the binding name in {@link BindingTuple}. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/SortOperator.java b/core/src/main/java/org/opensearch/sql/planner/physical/SortOperator.java similarity index 87% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/SortOperator.java rename to core/src/main/java/org/opensearch/sql/planner/physical/SortOperator.java index 6649c1f448..347d58693e 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/SortOperator.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/SortOperator.java @@ -24,16 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder.NULL_FIRST; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.ASC; +import static org.opensearch.sql.ast.tree.Sort.NullOrder.NULL_FIRST; +import static org.opensearch.sql.ast.tree.Sort.SortOrder.ASC; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.utils.ExprValueOrdering; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.SortOperator.Sorter.SorterBuilder; import java.util.Collections; import java.util.Comparator; import java.util.Iterator; @@ -45,6 +40,11 @@ import lombok.Singular; import lombok.ToString; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.tree.Sort.SortOption; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.utils.ExprValueOrdering; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.planner.physical.SortOperator.Sorter.SorterBuilder; /** * Sort Operator.The input data is sorted by the sort fields in the {@link SortOperator#sortList}. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/ValuesOperator.java b/core/src/main/java/org/opensearch/sql/planner/physical/ValuesOperator.java similarity index 88% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/ValuesOperator.java rename to core/src/main/java/org/opensearch/sql/planner/physical/ValuesOperator.java index cc5ae526c6..ad4e12866d 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/ValuesOperator.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/ValuesOperator.java @@ -25,11 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprCollectionValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.LiteralExpression; import com.google.common.collect.ImmutableList; import java.util.Iterator; import java.util.List; @@ -37,6 +34,9 @@ import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.data.model.ExprCollectionValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.LiteralExpression; /** * Physical operator for Values. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/WindowOperator.java b/core/src/main/java/org/opensearch/sql/planner/physical/WindowOperator.java similarity index 87% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/WindowOperator.java rename to core/src/main/java/org/opensearch/sql/planner/physical/WindowOperator.java index c0bad5892a..dc962dc21a 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/WindowOperator.java +++ b/core/src/main/java/org/opensearch/sql/planner/physical/WindowOperator.java @@ -25,14 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; - -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowFunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.window.frame.WindowFrame; +package org.opensearch.sql.planner.physical; + import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterators; import com.google.common.collect.PeekingIterator; @@ -41,6 +35,12 @@ import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.window.WindowDefinition; +import org.opensearch.sql.expression.window.WindowFunctionExpression; +import org.opensearch.sql.expression.window.frame.WindowFrame; /** * Physical operator for window function computation. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/StorageEngine.java b/core/src/main/java/org/opensearch/sql/storage/StorageEngine.java similarity index 95% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/StorageEngine.java rename to core/src/main/java/org/opensearch/sql/storage/StorageEngine.java index 45d99b27f0..3c2704b4bf 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/StorageEngine.java +++ b/core/src/main/java/org/opensearch/sql/storage/StorageEngine.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.storage; +package org.opensearch.sql.storage; /** * Storage engine for different storage to provide data access API implementation. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/Table.java b/core/src/main/java/org/opensearch/sql/storage/Table.java similarity index 84% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/Table.java rename to core/src/main/java/org/opensearch/sql/storage/Table.java index 5a2b88887a..7dae42be00 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/Table.java +++ b/core/src/main/java/org/opensearch/sql/storage/Table.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.storage; +package org.opensearch.sql.storage; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; import java.util.Map; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlan; /** * Table. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/TableScanOperator.java b/core/src/main/java/org/opensearch/sql/storage/TableScanOperator.java similarity index 87% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/TableScanOperator.java rename to core/src/main/java/org/opensearch/sql/storage/TableScanOperator.java index f7c0609d9c..e1c868f81d 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/TableScanOperator.java +++ b/core/src/main/java/org/opensearch/sql/storage/TableScanOperator.java @@ -25,12 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.storage; +package org.opensearch.sql.storage; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanNodeVisitor; import java.util.Collections; import java.util.List; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlanNodeVisitor; /** * Abstract table scan class for different storage to implement. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/bindingtuple/BindingTuple.java b/core/src/main/java/org/opensearch/sql/storage/bindingtuple/BindingTuple.java similarity index 77% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/bindingtuple/BindingTuple.java rename to core/src/main/java/org/opensearch/sql/storage/bindingtuple/BindingTuple.java index f977a0ebff..4305dba746 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/bindingtuple/BindingTuple.java +++ b/core/src/main/java/org/opensearch/sql/storage/bindingtuple/BindingTuple.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple; +package org.opensearch.sql.storage.bindingtuple; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprMissingValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; +import org.opensearch.sql.data.model.ExprMissingValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.env.Environment; /** * BindingTuple represents the a relationship between bindingName and ExprValue. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/bindingtuple/LazyBindingTuple.java b/core/src/main/java/org/opensearch/sql/storage/bindingtuple/LazyBindingTuple.java similarity index 81% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/bindingtuple/LazyBindingTuple.java rename to core/src/main/java/org/opensearch/sql/storage/bindingtuple/LazyBindingTuple.java index c53281ffe2..d77d53c4cb 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/storage/bindingtuple/LazyBindingTuple.java +++ b/core/src/main/java/org/opensearch/sql/storage/bindingtuple/LazyBindingTuple.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple; +package org.opensearch.sql.storage.bindingtuple; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; import java.util.function.Supplier; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.ReferenceExpression; /** * Lazy Implementation of {@link BindingTuple}. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/utils/ExpressionUtils.java b/core/src/main/java/org/opensearch/sql/utils/ExpressionUtils.java similarity index 91% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/utils/ExpressionUtils.java rename to core/src/main/java/org/opensearch/sql/utils/ExpressionUtils.java index 835a0344c7..0c4b3e94b3 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/utils/ExpressionUtils.java +++ b/core/src/main/java/org/opensearch/sql/utils/ExpressionUtils.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.utils; +package org.opensearch.sql.utils; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.List; import java.util.stream.Collectors; import lombok.experimental.UtilityClass; +import org.opensearch.sql.expression.Expression; /** * Utils for {@link Expression}. diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/utils/OperatorUtils.java b/core/src/main/java/org/opensearch/sql/utils/OperatorUtils.java similarity index 92% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/utils/OperatorUtils.java rename to core/src/main/java/org/opensearch/sql/utils/OperatorUtils.java index 2b7ae7a691..7cde3a5d26 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/utils/OperatorUtils.java +++ b/core/src/main/java/org/opensearch/sql/utils/OperatorUtils.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.utils; +package org.opensearch.sql.utils; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprBooleanValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; import java.util.regex.Pattern; import lombok.experimental.UtilityClass; +import org.opensearch.sql.data.model.ExprBooleanValue; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprValue; @UtilityClass public class OperatorUtils { diff --git a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/utils/SystemIndexUtils.java b/core/src/main/java/org/opensearch/sql/utils/SystemIndexUtils.java similarity index 98% rename from core/src/main/java/com/amazon/opendistroforelasticsearch/sql/utils/SystemIndexUtils.java rename to core/src/main/java/org/opensearch/sql/utils/SystemIndexUtils.java index 396314c023..db556e3a45 100644 --- a/core/src/main/java/com/amazon/opendistroforelasticsearch/sql/utils/SystemIndexUtils.java +++ b/core/src/main/java/org/opensearch/sql/utils/SystemIndexUtils.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.utils; +package org.opensearch.sql.utils; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/AnalysisContextTest.java b/core/src/test/java/org/opensearch/sql/analysis/AnalysisContextTest.java similarity index 96% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/AnalysisContextTest.java rename to core/src/test/java/org/opensearch/sql/analysis/AnalysisContextTest.java index 167d2fad5a..fc043bea77 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/AnalysisContextTest.java +++ b/core/src/test/java/org/opensearch/sql/analysis/AnalysisContextTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -58,4 +58,4 @@ public void popEmptyEnvironmentStackShouldFail() { NullPointerException exception = assertThrows(NullPointerException.class, () -> context.pop()); assertEquals("Fail to pop context due to no environment present", exception.getMessage()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/AnalyzerTest.java b/core/src/test/java/org/opensearch/sql/analysis/AnalyzerTest.java similarity index 91% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/AnalyzerTest.java rename to core/src/test/java/org/opensearch/sql/analysis/AnalyzerTest.java index 4ce81ecb2c..9b42c70e32 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/AnalyzerTest.java +++ b/core/src/test/java/org/opensearch/sql/analysis/AnalyzerTest.java @@ -24,40 +24,32 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.aggregate; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.alias; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.argument; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.booleanLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.compare; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.field; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.filter; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.function; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.intLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.relation; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static java.util.Collections.emptyList; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.ast.dsl.AstDSL.aggregate; +import static org.opensearch.sql.ast.dsl.AstDSL.alias; +import static org.opensearch.sql.ast.dsl.AstDSL.argument; +import static org.opensearch.sql.ast.dsl.AstDSL.booleanLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.compare; +import static org.opensearch.sql.ast.dsl.AstDSL.field; +import static org.opensearch.sql.ast.dsl.AstDSL.filter; +import static org.opensearch.sql.ast.dsl.AstDSL.function; +import static org.opensearch.sql.ast.dsl.AstDSL.intLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName; +import static org.opensearch.sql.ast.dsl.AstDSL.relation; +import static org.opensearch.sql.ast.tree.Sort.NullOrder; +import static org.opensearch.sql.ast.tree.Sort.SortOption; +import static org.opensearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; +import static org.opensearch.sql.ast.tree.Sort.SortOrder; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Argument; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.Collections; @@ -66,6 +58,14 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opensearch.sql.ast.dsl.AstDSL; +import org.opensearch.sql.ast.expression.Argument; +import org.opensearch.sql.ast.tree.RareTopN.CommandType; +import org.opensearch.sql.exception.SemanticCheckException; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.expression.window.WindowDefinition; +import org.opensearch.sql.planner.logical.LogicalPlanDSL; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/AnalyzerTestBase.java b/core/src/test/java/org/opensearch/sql/analysis/AnalyzerTestBase.java similarity index 74% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/AnalyzerTestBase.java rename to core/src/test/java/org/opensearch/sql/analysis/AnalyzerTestBase.java index f1a2f47e43..2767bc6bdb 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/AnalyzerTestBase.java +++ b/core/src/test/java/org/opensearch/sql/analysis/AnalyzerTestBase.java @@ -24,27 +24,27 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; import static org.junit.jupiter.api.Assertions.assertEquals; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Namespace; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Symbol; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.SymbolTable; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan; -import com.amazon.opendistroforelasticsearch.sql.config.TestConfig; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; -import com.amazon.opendistroforelasticsearch.sql.storage.Table; import java.util.Map; +import org.opensearch.sql.analysis.symbol.Namespace; +import org.opensearch.sql.analysis.symbol.Symbol; +import org.opensearch.sql.analysis.symbol.SymbolTable; +import org.opensearch.sql.ast.tree.UnresolvedPlan; +import org.opensearch.sql.config.TestConfig; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.env.Environment; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.storage.StorageEngine; +import org.opensearch.sql.storage.Table; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/ExpressionAnalyzerTest.java b/core/src/test/java/org/opensearch/sql/analysis/ExpressionAnalyzerTest.java similarity index 83% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/ExpressionAnalyzerTest.java rename to core/src/test/java/org/opensearch/sql/analysis/ExpressionAnalyzerTest.java index 4f205e89cb..aa8d2b12de 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/ExpressionAnalyzerTest.java +++ b/core/src/test/java/org/opensearch/sql/analysis/ExpressionAnalyzerTest.java @@ -24,36 +24,36 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.field; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.function; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.intLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; import static java.util.Collections.emptyList; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.ast.dsl.AstDSL.field; +import static org.opensearch.sql.ast.dsl.AstDSL.function; +import static org.opensearch.sql.ast.dsl.AstDSL.intLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Namespace; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Symbol; -import com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AllFields; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.DataType; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; -import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxCheckException; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.expression.window.aggregation.AggregateWindowFunction; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opensearch.sql.analysis.symbol.Namespace; +import org.opensearch.sql.analysis.symbol.Symbol; +import org.opensearch.sql.ast.dsl.AstDSL; +import org.opensearch.sql.ast.expression.AllFields; +import org.opensearch.sql.ast.expression.DataType; +import org.opensearch.sql.ast.expression.UnresolvedExpression; +import org.opensearch.sql.common.antlr.SyntaxCheckException; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.exception.SemanticCheckException; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.expression.window.aggregation.AggregateWindowFunction; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -300,4 +300,4 @@ protected void assertAnalyzeEqual(Expression expected, UnresolvedExpression unresolvedExpression) { assertEquals(expected, analyze(unresolvedExpression)); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/ExpressionReferenceOptimizerTest.java b/core/src/test/java/org/opensearch/sql/analysis/ExpressionReferenceOptimizerTest.java similarity index 88% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/ExpressionReferenceOptimizerTest.java rename to core/src/test/java/org/opensearch/sql/analysis/ExpressionReferenceOptimizerTest.java index debb576330..31a7249b29 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/ExpressionReferenceOptimizerTest.java +++ b/core/src/test/java/org/opensearch/sql/analysis/ExpressionReferenceOptimizerTest.java @@ -26,23 +26,23 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static java.util.Collections.emptyList; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL; import com.google.common.collect.ImmutableList; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.expression.window.WindowDefinition; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalPlanDSL; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -193,4 +193,4 @@ LogicalPlan logicalPlan() { DSL.named("abs(balance)", dsl.abs(DSL.ref("balance", INTEGER)))) ); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/NamedExpressionAnalyzerTest.java b/core/src/test/java/org/opensearch/sql/analysis/NamedExpressionAnalyzerTest.java similarity index 83% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/NamedExpressionAnalyzerTest.java rename to core/src/test/java/org/opensearch/sql/analysis/NamedExpressionAnalyzerTest.java index 075fb964ef..bac3c66a9b 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/NamedExpressionAnalyzerTest.java +++ b/core/src/test/java/org/opensearch/sql/analysis/NamedExpressionAnalyzerTest.java @@ -26,16 +26,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; import static org.junit.jupiter.api.Assertions.assertEquals; -import com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Alias; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opensearch.sql.ast.dsl.AstDSL; +import org.opensearch.sql.ast.expression.Alias; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.config.ExpressionConfig; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -54,4 +54,4 @@ void visit_named_seleteitem() { NamedExpression analyze = analyzer.analyze(alias, analysisContext); assertEquals("integer_value", analyze.getNameOrAlias()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/QualifierAnalyzerTest.java b/core/src/test/java/org/opensearch/sql/analysis/QualifierAnalyzerTest.java similarity index 85% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/QualifierAnalyzerTest.java rename to core/src/test/java/org/opensearch/sql/analysis/QualifierAnalyzerTest.java index 537c7b1732..8434b327b4 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/QualifierAnalyzerTest.java +++ b/core/src/test/java/org/opensearch/sql/analysis/QualifierAnalyzerTest.java @@ -25,21 +25,21 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.ARRAY; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.type.ExprCoreType.ARRAY; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Namespace; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Symbol; -import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxCheckException; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opensearch.sql.analysis.symbol.Namespace; +import org.opensearch.sql.analysis.symbol.Symbol; +import org.opensearch.sql.common.antlr.SyntaxCheckException; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.config.ExpressionConfig; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -112,4 +112,4 @@ private void runInScope(Symbol symbol, ExprType type, Runnable test) { } } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/SelectAnalyzeTest.java b/core/src/test/java/org/opensearch/sql/analysis/SelectAnalyzeTest.java similarity index 84% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/SelectAnalyzeTest.java rename to core/src/test/java/org/opensearch/sql/analysis/SelectAnalyzeTest.java index 7e3f22c639..0fde46d432 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/SelectAnalyzeTest.java +++ b/core/src/test/java/org/opensearch/sql/analysis/SelectAnalyzeTest.java @@ -26,27 +26,27 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.argument; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.booleanLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.field; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.ast.dsl.AstDSL.argument; +import static org.opensearch.sql.ast.dsl.AstDSL.booleanLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.field; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AllFields; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.Map; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opensearch.sql.ast.dsl.AstDSL; +import org.opensearch.sql.ast.expression.AllFields; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.planner.logical.LogicalPlanDSL; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/SelectExpressionAnalyzerTest.java b/core/src/test/java/org/opensearch/sql/analysis/SelectExpressionAnalyzerTest.java similarity index 84% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/SelectExpressionAnalyzerTest.java rename to core/src/test/java/org/opensearch/sql/analysis/SelectExpressionAnalyzerTest.java index bc0b0df362..25088fdc81 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/SelectExpressionAnalyzerTest.java +++ b/core/src/test/java/org/opensearch/sql/analysis/SelectExpressionAnalyzerTest.java @@ -26,22 +26,15 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Namespace; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Symbol; -import com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.Disabled; @@ -49,6 +42,13 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.analysis.symbol.Namespace; +import org.opensearch.sql.analysis.symbol.Symbol; +import org.opensearch.sql.ast.dsl.AstDSL; +import org.opensearch.sql.ast.expression.UnresolvedExpression; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.config.ExpressionConfig; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/TypeEnvironmentTest.java b/core/src/test/java/org/opensearch/sql/analysis/TypeEnvironmentTest.java similarity index 84% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/TypeEnvironmentTest.java rename to core/src/test/java/org/opensearch/sql/analysis/TypeEnvironmentTest.java index f85f043801..773529c329 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/TypeEnvironmentTest.java +++ b/core/src/test/java/org/opensearch/sql/analysis/TypeEnvironmentTest.java @@ -24,20 +24,20 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Namespace; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Symbol; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; import org.junit.jupiter.api.Test; +import org.opensearch.sql.analysis.symbol.Namespace; +import org.opensearch.sql.analysis.symbol.Symbol; +import org.opensearch.sql.exception.SemanticCheckException; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.ReferenceExpression; public class TypeEnvironmentTest { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/WindowExpressionAnalyzerTest.java b/core/src/test/java/org/opensearch/sql/analysis/WindowExpressionAnalyzerTest.java similarity index 77% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/WindowExpressionAnalyzerTest.java rename to core/src/test/java/org/opensearch/sql/analysis/WindowExpressionAnalyzerTest.java index cc20a566ae..4a55baa23f 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/WindowExpressionAnalyzerTest.java +++ b/core/src/test/java/org/opensearch/sql/analysis/WindowExpressionAnalyzerTest.java @@ -25,28 +25,18 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.analysis; +package org.opensearch.sql.analysis; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder.NULL_FIRST; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder.NULL_LAST; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption.DEFAULT_DESC; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.ASC; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.DESC; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.ast.tree.Sort.NullOrder.NULL_FIRST; +import static org.opensearch.sql.ast.tree.Sort.NullOrder.NULL_LAST; +import static org.opensearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; +import static org.opensearch.sql.ast.tree.Sort.SortOption.DEFAULT_DESC; +import static org.opensearch.sql.ast.tree.Sort.SortOrder.ASC; +import static org.opensearch.sql.ast.tree.Sort.SortOrder.DESC; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Alias; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalSort; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.Collections; @@ -56,6 +46,16 @@ import org.junit.jupiter.api.DisplayNameGenerator; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opensearch.sql.ast.dsl.AstDSL; +import org.opensearch.sql.ast.expression.Alias; +import org.opensearch.sql.ast.tree.Sort.SortOption; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.expression.window.WindowDefinition; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalPlanDSL; +import org.opensearch.sql.planner.logical.LogicalRelation; +import org.opensearch.sql.planner.logical.LogicalSort; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -161,4 +161,4 @@ void can_analyze_sort_options() { }); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/symbol/SymbolTableTest.java b/core/src/test/java/org/opensearch/sql/analysis/symbol/SymbolTableTest.java similarity index 91% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/symbol/SymbolTableTest.java rename to core/src/test/java/org/opensearch/sql/analysis/symbol/SymbolTableTest.java index d0f4668761..512d79bf42 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/analysis/symbol/SymbolTableTest.java +++ b/core/src/test/java/org/opensearch/sql/analysis/symbol/SymbolTableTest.java @@ -24,11 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.analysis.symbol; +package org.opensearch.sql.analysis.symbol; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.aMapWithSize; import static org.hamcrest.Matchers.allOf; @@ -37,12 +34,15 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import java.util.Map; import java.util.Optional; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.type.ExprType; public class SymbolTableTest { @@ -132,4 +132,4 @@ private void defineSymbolShouldBeAbleToResolve(Symbol symbol, ExprType expectedT assertEquals(expectedType, actualType.get()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/CastTest.java b/core/src/test/java/org/opensearch/sql/ast/expression/CastTest.java similarity index 86% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/CastTest.java rename to core/src/test/java/org/opensearch/sql/ast/expression/CastTest.java index 579a0139c0..45234c8f41 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/CastTest.java +++ b/core/src/test/java/org/opensearch/sql/ast/expression/CastTest.java @@ -25,11 +25,11 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.booleanLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.stringLiteral; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.ast.dsl.AstDSL.booleanLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.stringLiteral; import org.junit.jupiter.api.DisplayNameGeneration; import org.junit.jupiter.api.DisplayNameGenerator; @@ -45,4 +45,4 @@ void cast_to_int_and_integer_should_convert_to_same_function_impl() { new Cast(booleanLiteral(true), stringLiteral("INTEGER")).convertFunctionName()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/QualifiedNameTest.java b/core/src/test/java/org/opensearch/sql/ast/expression/QualifiedNameTest.java similarity index 96% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/QualifiedNameTest.java rename to core/src/test/java/org/opensearch/sql/ast/expression/QualifiedNameTest.java index 851b7e3d0e..f7d37ac9c4 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/ast/expression/QualifiedNameTest.java +++ b/core/src/test/java/org/opensearch/sql/ast/expression/QualifiedNameTest.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ast.expression; +package org.opensearch.sql.ast.expression; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -58,4 +58,4 @@ void should_return_empty_if_only_single_part() { assertFalse(name.getPrefix().isPresent()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/RelationTest.java b/core/src/test/java/org/opensearch/sql/ast/tree/RelationTest.java similarity index 90% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/RelationTest.java rename to core/src/test/java/org/opensearch/sql/ast/tree/RelationTest.java index 62d7e0ec08..797e631ca9 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/ast/tree/RelationTest.java +++ b/core/src/test/java/org/opensearch/sql/ast/tree/RelationTest.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ast.tree; +package org.opensearch.sql.ast.tree; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName; import org.junit.jupiter.api.Test; @@ -47,4 +47,4 @@ void should_return_alias_if_aliased() { assertEquals("t", relation.getTableNameOrAlias()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/config/TestConfig.java b/core/src/test/java/org/opensearch/sql/config/TestConfig.java similarity index 79% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/config/TestConfig.java rename to core/src/test/java/org/opensearch/sql/config/TestConfig.java index 54bc841dc3..f30ec53908 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/config/TestConfig.java +++ b/core/src/test/java/org/opensearch/sql/config/TestConfig.java @@ -24,23 +24,23 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.config; +package org.opensearch.sql.config; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Namespace; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.Symbol; -import com.amazon.opendistroforelasticsearch.sql.analysis.symbol.SymbolTable; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; -import com.amazon.opendistroforelasticsearch.sql.storage.Table; import com.google.common.collect.ImmutableMap; import java.util.Map; +import org.opensearch.sql.analysis.symbol.Namespace; +import org.opensearch.sql.analysis.symbol.Symbol; +import org.opensearch.sql.analysis.symbol.SymbolTable; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.env.Environment; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.storage.StorageEngine; +import org.opensearch.sql.storage.Table; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/DateTimeValueTest.java b/core/src/test/java/org/opensearch/sql/data/model/DateTimeValueTest.java similarity index 95% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/DateTimeValueTest.java rename to core/src/test/java/org/opensearch/sql/data/model/DateTimeValueTest.java index ed762f9b3d..129bc5f1e5 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/DateTimeValueTest.java +++ b/core/src/test/java/org/opensearch/sql/data/model/DateTimeValueTest.java @@ -26,22 +26,22 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIMESTAMP; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.type.ExprCoreType.TIME; +import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.ZoneId; import java.time.ZonedDateTime; import org.junit.jupiter.api.Test; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.exception.SemanticCheckException; public class DateTimeValueTest { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprBooleanValueTest.java b/core/src/test/java/org/opensearch/sql/data/model/ExprBooleanValueTest.java similarity index 85% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprBooleanValueTest.java rename to core/src/test/java/org/opensearch/sql/data/model/ExprBooleanValueTest.java index 453e57742f..3505c4baa2 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprBooleanValueTest.java +++ b/core/src/test/java/org/opensearch/sql/data/model/ExprBooleanValueTest.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import static com.amazon.opendistroforelasticsearch.sql.utils.ComparisonUtil.compare; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.utils.ComparisonUtil.compare; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import org.junit.jupiter.api.Test; +import org.opensearch.sql.exception.ExpressionEvaluationException; public class ExprBooleanValueTest { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprCollectionValueTest.java b/core/src/test/java/org/opensearch/sql/data/model/ExprCollectionValueTest.java similarity index 91% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprCollectionValueTest.java rename to core/src/test/java/org/opensearch/sql/data/model/ExprCollectionValueTest.java index aa47c03630..06733ad4e0 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprCollectionValueTest.java +++ b/core/src/test/java/org/opensearch/sql/data/model/ExprCollectionValueTest.java @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import static com.amazon.opendistroforelasticsearch.sql.utils.ComparisonUtil.compare; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.utils.ComparisonUtil.compare; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import com.google.common.collect.ImmutableList; import java.util.Arrays; import org.junit.jupiter.api.Test; +import org.opensearch.sql.exception.ExpressionEvaluationException; public class ExprCollectionValueTest { @Test diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprIntervalValueTest.java b/core/src/test/java/org/opensearch/sql/data/model/ExprIntervalValueTest.java similarity index 91% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprIntervalValueTest.java rename to core/src/test/java/org/opensearch/sql/data/model/ExprIntervalValueTest.java index cb1d578345..6cf900d212 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprIntervalValueTest.java +++ b/core/src/test/java/org/opensearch/sql/data/model/ExprIntervalValueTest.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTERVAL; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.data.type.ExprCoreType.INTERVAL; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import java.time.Duration; import java.time.Period; import org.junit.jupiter.api.Test; +import org.opensearch.sql.exception.ExpressionEvaluationException; public class ExprIntervalValueTest { @Test diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprMissingValueTest.java b/core/src/test/java/org/opensearch/sql/data/model/ExprMissingValueTest.java similarity index 80% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprMissingValueTest.java rename to core/src/test/java/org/opensearch/sql/data/model/ExprMissingValueTest.java index b4a78d9dbb..621b28b6e3 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprMissingValueTest.java +++ b/core/src/test/java/org/opensearch/sql/data/model/ExprMissingValueTest.java @@ -24,20 +24,20 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.utils.ComparisonUtil.compare; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.utils.ComparisonUtil.compare; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.exception.ExpressionEvaluationException; class ExprMissingValueTest { @@ -75,4 +75,4 @@ public void comparabilityTest() { () -> compare(LITERAL_MISSING, LITERAL_MISSING)); assertEquals("invalid to call compare operation on missing value", exception.getMessage()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprNullValueTest.java b/core/src/test/java/org/opensearch/sql/data/model/ExprNullValueTest.java similarity index 80% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprNullValueTest.java rename to core/src/test/java/org/opensearch/sql/data/model/ExprNullValueTest.java index ffeccda1b4..ec380eac0f 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprNullValueTest.java +++ b/core/src/test/java/org/opensearch/sql/data/model/ExprNullValueTest.java @@ -24,20 +24,20 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.utils.ComparisonUtil.compare; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.utils.ComparisonUtil.compare; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.exception.ExpressionEvaluationException; public class ExprNullValueTest { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprNumberValueTest.java b/core/src/test/java/org/opensearch/sql/data/model/ExprNumberValueTest.java similarity index 91% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprNumberValueTest.java rename to core/src/test/java/org/opensearch/sql/data/model/ExprNumberValueTest.java index b25f62a201..080d6bb236 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprNumberValueTest.java +++ b/core/src/test/java/org/opensearch/sql/data/model/ExprNumberValueTest.java @@ -26,14 +26,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.opensearch.sql.exception.ExpressionEvaluationException; public class ExprNumberValueTest { @Test diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprTupleValueTest.java b/core/src/test/java/org/opensearch/sql/data/model/ExprTupleValueTest.java similarity index 92% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprTupleValueTest.java rename to core/src/test/java/org/opensearch/sql/data/model/ExprTupleValueTest.java index b61ef0fc34..24a9f42702 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprTupleValueTest.java +++ b/core/src/test/java/org/opensearch/sql/data/model/ExprTupleValueTest.java @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import static com.amazon.opendistroforelasticsearch.sql.utils.ComparisonUtil.compare; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.utils.ComparisonUtil.compare; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import com.google.common.collect.ImmutableMap; import org.junit.jupiter.api.Test; +import org.opensearch.sql.exception.ExpressionEvaluationException; class ExprTupleValueTest { @Test @@ -76,4 +76,4 @@ public void comparabilityTest() { () -> compare(tupleValue, tupleValue)); assertEquals("ExprTupleValue instances are not comparable", exception.getMessage()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprValueCompareTest.java b/core/src/test/java/org/opensearch/sql/data/model/ExprValueCompareTest.java similarity index 92% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprValueCompareTest.java rename to core/src/test/java/org/opensearch/sql/data/model/ExprValueCompareTest.java index bcaa279e6c..1bf9b93148 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprValueCompareTest.java +++ b/core/src/test/java/org/opensearch/sql/data/model/ExprValueCompareTest.java @@ -26,13 +26,13 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; import org.junit.jupiter.api.Test; diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprValueUtilsTest.java b/core/src/test/java/org/opensearch/sql/data/model/ExprValueUtilsTest.java similarity index 89% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprValueUtilsTest.java rename to core/src/test/java/org/opensearch/sql/data/model/ExprValueUtilsTest.java index bd0c72e44c..a27d90f35d 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/model/ExprValueUtilsTest.java +++ b/core/src/test/java/org/opensearch/sql/data/model/ExprValueUtilsTest.java @@ -24,26 +24,23 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.model; +package org.opensearch.sql.data.model; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.ARRAY; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATETIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTERVAL; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIMESTAMP; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.type.ExprCoreType.ARRAY; +import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN; +import static org.opensearch.sql.data.type.ExprCoreType.DATE; +import static org.opensearch.sql.data.type.ExprCoreType.DATETIME; +import static org.opensearch.sql.data.type.ExprCoreType.INTERVAL; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; +import static org.opensearch.sql.data.type.ExprCoreType.TIME; +import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple.BindingTuple; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; @@ -69,6 +66,9 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.storage.bindingtuple.BindingTuple; @DisplayName("Test Expression Value Utils") public class ExprValueUtilsTest { @@ -231,7 +231,7 @@ public void unSupportedObject() { () -> ExprValueUtils.fromObjectValue(integerValue(1))); assertEquals( "unsupported object " - + "class com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue", + + "class org.opensearch.sql.data.model.ExprIntegerValue", exception.getMessage()); } @@ -277,4 +277,4 @@ public void hashCodeTest() { assertEquals(new ExprTimestampValue("2012-08-07 18:00:00").hashCode(), new ExprTimestampValue("2012-08-07 18:00:00").hashCode()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/type/ExprTypeTest.java b/core/src/test/java/org/opensearch/sql/data/type/ExprTypeTest.java similarity index 73% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/type/ExprTypeTest.java rename to core/src/test/java/org/opensearch/sql/data/type/ExprTypeTest.java index 45e51cff7f..0dc8b8f4cf 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/type/ExprTypeTest.java +++ b/core/src/test/java/org/opensearch/sql/data/type/ExprTypeTest.java @@ -26,22 +26,22 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.data.type; +package org.opensearch.sql.data.type; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.ARRAY; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.SHORT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.UNDEFINED; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.UNKNOWN; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.data.type.ExprCoreType.ARRAY; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.SHORT; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; +import static org.opensearch.sql.data.type.ExprCoreType.UNDEFINED; +import static org.opensearch.sql.data.type.ExprCoreType.UNKNOWN; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; @@ -88,4 +88,4 @@ void defaultLegacyTypeName() { final ExprType exprType = () -> "dummy"; assertEquals("dummy", exprType.legacyTypeName()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/utils/ExprValueOrderingTest.java b/core/src/test/java/org/opensearch/sql/data/utils/ExprValueOrderingTest.java similarity index 86% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/utils/ExprValueOrderingTest.java rename to core/src/test/java/org/opensearch/sql/data/utils/ExprValueOrderingTest.java index fb0d8dcc41..af30ea58f0 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/utils/ExprValueOrderingTest.java +++ b/core/src/test/java/org/opensearch/sql/data/utils/ExprValueOrderingTest.java @@ -24,31 +24,31 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.utils; - -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.byteValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.collectionValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.doubleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.floatValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.longValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.tupleValue; +package org.opensearch.sql.data.utils; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; +import static org.opensearch.sql.data.model.ExprValueUtils.byteValue; +import static org.opensearch.sql.data.model.ExprValueUtils.collectionValue; +import static org.opensearch.sql.data.model.ExprValueUtils.doubleValue; +import static org.opensearch.sql.data.model.ExprValueUtils.floatValue; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.model.ExprValueUtils.longValue; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.data.model.ExprValueUtils.tupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.exception.ExpressionEvaluationException; @ExtendWith(MockitoExtension.class) class ExprValueOrderingTest { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NullsFirstExprValueOrderingTest.java b/core/src/test/java/org/opensearch/sql/data/utils/NullsFirstExprValueOrderingTest.java similarity index 81% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NullsFirstExprValueOrderingTest.java rename to core/src/test/java/org/opensearch/sql/data/utils/NullsFirstExprValueOrderingTest.java index 162d03e251..93ddef7b8d 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NullsFirstExprValueOrderingTest.java +++ b/core/src/test/java/org/opensearch/sql/data/utils/NullsFirstExprValueOrderingTest.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.utils; +package org.opensearch.sql.data.utils; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValue; class NullsFirstExprValueOrderingTest { @Test @@ -55,4 +55,4 @@ public void natural_null_first_compare_same_object() { ExprValue exprValue = integerValue(5); assertEquals(0, ordering.compare(exprValue, exprValue)); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NullsLastExprValueOrderingTest.java b/core/src/test/java/org/opensearch/sql/data/utils/NullsLastExprValueOrderingTest.java similarity index 81% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NullsLastExprValueOrderingTest.java rename to core/src/test/java/org/opensearch/sql/data/utils/NullsLastExprValueOrderingTest.java index 3b2123af7f..e4238df7a3 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/utils/NullsLastExprValueOrderingTest.java +++ b/core/src/test/java/org/opensearch/sql/data/utils/NullsLastExprValueOrderingTest.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.utils; +package org.opensearch.sql.data.utils; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValue; class NullsLastExprValueOrderingTest { @Test @@ -55,4 +55,4 @@ public void natural_null_last_compare_same_object() { ExprValue exprValue = integerValue(5); assertEquals(0, ordering.compare(exprValue, exprValue)); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/utils/ReverseExprValueOrderingTest.java b/core/src/test/java/org/opensearch/sql/data/utils/ReverseExprValueOrderingTest.java similarity index 89% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/utils/ReverseExprValueOrderingTest.java rename to core/src/test/java/org/opensearch/sql/data/utils/ReverseExprValueOrderingTest.java index 2e5f805fe8..15ca5cdc37 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/data/utils/ReverseExprValueOrderingTest.java +++ b/core/src/test/java/org/opensearch/sql/data/utils/ReverseExprValueOrderingTest.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.data.utils; +package org.opensearch.sql.data.utils; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; import org.junit.jupiter.api.Test; @@ -39,4 +39,4 @@ public void natural_reverse_reverse() { assertEquals(0, ordering.compare(integerValue(5), integerValue(5))); assertEquals(-1, ordering.compare(integerValue(4), integerValue(5))); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/executor/ExplainTest.java b/core/src/test/java/org/opensearch/sql/executor/ExplainTest.java similarity index 74% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/executor/ExplainTest.java rename to core/src/test/java/org/opensearch/sql/executor/ExplainTest.java index 7665eff8d1..24a5068d78 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/executor/ExplainTest.java +++ b/core/src/test/java/org/opensearch/sql/executor/ExplainTest.java @@ -25,46 +25,32 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.executor; +package org.opensearch.sql.executor; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType.TOP; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.literal; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.named; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.agg; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.dedupe; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.eval; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.filter; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.limit; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.project; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.rareTopN; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.remove; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.rename; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.sort; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.values; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.window; import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.ast.tree.RareTopN.CommandType.TOP; +import static org.opensearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.DSL.literal; +import static org.opensearch.sql.expression.DSL.named; +import static org.opensearch.sql.expression.DSL.ref; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.agg; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.dedupe; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.eval; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.filter; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.limit; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.project; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.rareTopN; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.remove; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.rename; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.sort; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.values; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.window; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.ExplainResponse; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.ExplainResponseNode; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; -import com.amazon.opendistroforelasticsearch.sql.expression.LiteralExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.storage.TableScanOperator; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.List; @@ -74,6 +60,20 @@ import org.junit.jupiter.api.DisplayNameGeneration; import org.junit.jupiter.api.DisplayNameGenerator; import org.junit.jupiter.api.Test; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.executor.ExecutionEngine.ExplainResponse; +import org.opensearch.sql.executor.ExecutionEngine.ExplainResponseNode; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionTestBase; +import org.opensearch.sql.expression.LiteralExpression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.expression.window.WindowDefinition; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.storage.TableScanOperator; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) class ExplainTest extends ExpressionTestBase { @@ -276,4 +276,4 @@ public String explain() { } } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/ExpressionNodeVisitorTest.java b/core/src/test/java/org/opensearch/sql/expression/ExpressionNodeVisitorTest.java similarity index 78% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/ExpressionNodeVisitorTest.java rename to core/src/test/java/org/opensearch/sql/expression/ExpressionNodeVisitorTest.java index 61a62a5eab..9c1671ae2b 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/ExpressionNodeVisitorTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/ExpressionNodeVisitorTest.java @@ -25,27 +25,27 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression; +package org.opensearch.sql.expression; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.literal; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.named; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.DSL.literal; +import static org.opensearch.sql.expression.DSL.named; +import static org.opensearch.sql.expression.DSL.ref; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.Aggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.AvgAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases.CaseClause; -import com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases.WhenClause; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; import com.google.common.collect.ImmutableList; import java.util.Collections; import java.util.List; import org.junit.jupiter.api.DisplayNameGeneration; import org.junit.jupiter.api.DisplayNameGenerator; import org.junit.jupiter.api.Test; +import org.opensearch.sql.expression.aggregation.Aggregator; +import org.opensearch.sql.expression.aggregation.AvgAggregator; +import org.opensearch.sql.expression.conditional.cases.CaseClause; +import org.opensearch.sql.expression.conditional.cases.WhenClause; +import org.opensearch.sql.expression.config.ExpressionConfig; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) class ExpressionNodeVisitorTest { @@ -105,4 +105,4 @@ private Expression[] visitArguments(List arguments, Object context) assertEquals(expr, actual); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/ExpressionTestBase.java b/core/src/test/java/org/opensearch/sql/expression/ExpressionTestBase.java similarity index 63% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/ExpressionTestBase.java rename to core/src/test/java/org/opensearch/sql/expression/ExpressionTestBase.java index 0535bf7877..19c15b84e8 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/ExpressionTestBase.java +++ b/core/src/test/java/org/opensearch/sql/expression/ExpressionTestBase.java @@ -24,38 +24,38 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression; +package org.opensearch.sql.expression; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.BOOL_TYPE_MISSING_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.BOOL_TYPE_NULL_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.DOUBLE_TYPE_MISSING_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.DOUBLE_TYPE_NULL_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.INT_TYPE_MISSING_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.INT_TYPE_NULL_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.STRING_TYPE_MISSING_VALUE_FILED; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.STRING_TYPE_NULL_VALUE_FILED; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.booleanValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.collectionValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.doubleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.floatValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.longValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.missingValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.nullValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.tupleValue; +import static org.opensearch.sql.config.TestConfig.BOOL_TYPE_MISSING_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.BOOL_TYPE_NULL_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.DOUBLE_TYPE_MISSING_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.DOUBLE_TYPE_NULL_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.INT_TYPE_MISSING_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.INT_TYPE_NULL_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.STRING_TYPE_MISSING_VALUE_FILED; +import static org.opensearch.sql.config.TestConfig.STRING_TYPE_NULL_VALUE_FILED; +import static org.opensearch.sql.data.model.ExprValueUtils.booleanValue; +import static org.opensearch.sql.data.model.ExprValueUtils.collectionValue; +import static org.opensearch.sql.data.model.ExprValueUtils.doubleValue; +import static org.opensearch.sql.data.model.ExprValueUtils.floatValue; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.model.ExprValueUtils.longValue; +import static org.opensearch.sql.data.model.ExprValueUtils.missingValue; +import static org.opensearch.sql.data.model.ExprValueUtils.nullValue; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.data.model.ExprValueUtils.tupleValue; -import com.amazon.opendistroforelasticsearch.sql.config.TestConfig; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.List; import java.util.function.Function; import org.junit.jupiter.api.extension.ExtendWith; +import org.opensearch.sql.config.TestConfig; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.expression.env.Environment; +import org.opensearch.sql.expression.function.BuiltinFunctionName; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/NamedExpressionTest.java b/core/src/test/java/org/opensearch/sql/expression/NamedExpressionTest.java similarity index 97% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/NamedExpressionTest.java rename to core/src/test/java/org/opensearch/sql/expression/NamedExpressionTest.java index 96cc6deb71..13994ae8a0 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/NamedExpressionTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/NamedExpressionTest.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression; +package org.opensearch.sql.expression; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -62,4 +62,4 @@ void name_an_named_expression() { assertEquals("ten", namedExpression.getNameOrAlias()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/ReferenceExpressionTest.java b/core/src/test/java/org/opensearch/sql/expression/ReferenceExpressionTest.java similarity index 69% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/ReferenceExpressionTest.java rename to core/src/test/java/org/opensearch/sql/expression/ReferenceExpressionTest.java index 945ac17a00..8d2e3420c4 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/ReferenceExpressionTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/ReferenceExpressionTest.java @@ -24,43 +24,43 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression; - -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.BOOL_TYPE_MISSING_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.BOOL_TYPE_NULL_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.booleanValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.collectionValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.doubleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.floatValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.longValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.tupleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.ARRAY; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; +package org.opensearch.sql.expression; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.config.TestConfig.BOOL_TYPE_MISSING_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.BOOL_TYPE_NULL_VALUE_FIELD; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.model.ExprValueUtils.booleanValue; +import static org.opensearch.sql.data.model.ExprValueUtils.collectionValue; +import static org.opensearch.sql.data.model.ExprValueUtils.doubleValue; +import static org.opensearch.sql.data.model.ExprValueUtils.floatValue; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.model.ExprValueUtils.longValue; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.data.model.ExprValueUtils.tupleValue; +import static org.opensearch.sql.data.type.ExprCoreType.ARRAY; +import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; +import static org.opensearch.sql.expression.DSL.ref; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import org.junit.jupiter.api.DisplayNameGeneration; import org.junit.jupiter.api.DisplayNameGenerator; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.data.type.ExprCoreType; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) class ReferenceExpressionTest extends ExpressionTestBase { @@ -180,4 +180,4 @@ private ExprTupleValue tuple() { )); return tuple; } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AggregationTest.java b/core/src/test/java/org/opensearch/sql/expression/aggregation/AggregationTest.java similarity index 94% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AggregationTest.java rename to core/src/test/java/org/opensearch/sql/expression/aggregation/AggregationTest.java index 010ba1ecbc..cc2825858a 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AggregationTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/aggregation/AggregationTest.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; +package org.opensearch.sql.expression.aggregation; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.expression.ExpressionTestBase; public class AggregationTest extends ExpressionTestBase { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AvgAggregatorTest.java b/core/src/test/java/org/opensearch/sql/expression/aggregation/AvgAggregatorTest.java similarity index 85% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AvgAggregatorTest.java rename to core/src/test/java/org/opensearch/sql/expression/aggregation/AvgAggregatorTest.java index 025103efb9..494d3cfab2 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AvgAggregatorTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/aggregation/AvgAggregatorTest.java @@ -24,19 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; +package org.opensearch.sql.expression.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.DSL; class AvgAggregatorTest extends AggregationTest { @@ -102,4 +102,4 @@ public void test_nested_to_string() { assertEquals(String.format("avg(*(%s, %d))", DSL.ref("integer_value", INTEGER), 10), avgAggregator.toString()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/CountAggregatorTest.java b/core/src/test/java/org/opensearch/sql/expression/aggregation/CountAggregatorTest.java similarity index 79% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/CountAggregatorTest.java rename to core/src/test/java/org/opensearch/sql/expression/aggregation/CountAggregatorTest.java index 58ebc39b8c..0fdadfc692 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/CountAggregatorTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/aggregation/CountAggregatorTest.java @@ -24,27 +24,27 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; - -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.ARRAY; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATETIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIMESTAMP; +package org.opensearch.sql.expression.aggregation; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.type.ExprCoreType.ARRAY; +import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN; +import static org.opensearch.sql.data.type.ExprCoreType.DATE; +import static org.opensearch.sql.data.type.ExprCoreType.DATETIME; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; +import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.DSL; class CountAggregatorTest extends AggregationTest { @@ -174,4 +174,4 @@ public void test_nested_to_string() { assertEquals(String.format("count(abs(%s))", DSL.ref("integer_value", INTEGER)), countAggregator.toString()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MaxAggregatorTest.java b/core/src/test/java/org/opensearch/sql/expression/aggregation/MaxAggregatorTest.java similarity index 80% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MaxAggregatorTest.java rename to core/src/test/java/org/opensearch/sql/expression/aggregation/MaxAggregatorTest.java index 7e38d56e75..5aa9d3a747 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MaxAggregatorTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/aggregation/MaxAggregatorTest.java @@ -24,26 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; - -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATETIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIMESTAMP; +package org.opensearch.sql.expression.aggregation; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.data.type.ExprCoreType.DATE; +import static org.opensearch.sql.data.type.ExprCoreType.DATETIME; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.TIME; +import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.DSL; public class MaxAggregatorTest extends AggregationTest { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MinAggregatorTest.java b/core/src/test/java/org/opensearch/sql/expression/aggregation/MinAggregatorTest.java similarity index 80% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MinAggregatorTest.java rename to core/src/test/java/org/opensearch/sql/expression/aggregation/MinAggregatorTest.java index c322466952..01e72b9cda 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MinAggregatorTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/aggregation/MinAggregatorTest.java @@ -24,26 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; - -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATETIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIMESTAMP; +package org.opensearch.sql.expression.aggregation; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.data.type.ExprCoreType.DATE; +import static org.opensearch.sql.data.type.ExprCoreType.DATETIME; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.TIME; +import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.DSL; public class MinAggregatorTest extends AggregationTest { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/SumAggregatorTest.java b/core/src/test/java/org/opensearch/sql/expression/aggregation/SumAggregatorTest.java similarity index 82% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/SumAggregatorTest.java rename to core/src/test/java/org/opensearch/sql/expression/aggregation/SumAggregatorTest.java index 7369346fe0..c0872ed434 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/SumAggregatorTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/aggregation/SumAggregatorTest.java @@ -24,26 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.aggregation; +package org.opensearch.sql.expression.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.SumAggregator.SumState; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.aggregation.SumAggregator.SumState; class SumAggregatorTest extends AggregationTest { @@ -141,4 +141,4 @@ public void test_nested_to_string() { assertEquals(String.format("sum(*(%s, %d))", DSL.ref("integer_value", INTEGER), 10), sumAggregator.toString()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/ConditionalFunctionTest.java b/core/src/test/java/org/opensearch/sql/expression/conditional/ConditionalFunctionTest.java similarity index 84% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/ConditionalFunctionTest.java rename to core/src/test/java/org/opensearch/sql/expression/conditional/ConditionalFunctionTest.java index a9365caeca..89d901868f 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/ConditionalFunctionTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/conditional/ConditionalFunctionTest.java @@ -25,16 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.conditional; +package org.opensearch.sql.expression.conditional; import static org.junit.jupiter.api.Assertions.assertEquals; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import java.util.concurrent.Callable; import java.util.stream.Stream; import org.junit.jupiter.api.DisplayNameGeneration; @@ -45,6 +39,12 @@ import org.junit.jupiter.params.provider.MethodSource; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionTestBase; +import org.opensearch.sql.expression.env.Environment; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/cases/CaseClauseTest.java b/core/src/test/java/org/opensearch/sql/expression/conditional/cases/CaseClauseTest.java similarity index 89% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/cases/CaseClauseTest.java rename to core/src/test/java/org/opensearch/sql/expression/conditional/cases/CaseClauseTest.java index b9c81e8826..d9cac2f384 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/cases/CaseClauseTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/conditional/cases/CaseClauseTest.java @@ -25,19 +25,13 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases; +package org.opensearch.sql.expression.conditional.cases; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; import com.google.common.collect.ImmutableList; import org.junit.jupiter.api.DisplayNameGeneration; import org.junit.jupiter.api.DisplayNameGenerator; @@ -45,6 +39,12 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprNullValue; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionTestBase; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -130,4 +130,4 @@ void should_return_all_result_types_excluding_null_result() { caseClause.allResultTypes()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/cases/WhenClauseTest.java b/core/src/test/java/org/opensearch/sql/expression/conditional/cases/WhenClauseTest.java similarity index 83% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/cases/WhenClauseTest.java rename to core/src/test/java/org/opensearch/sql/expression/conditional/cases/WhenClauseTest.java index 313f4f1660..348ecb5bf3 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/conditional/cases/WhenClauseTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/conditional/cases/WhenClauseTest.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.conditional.cases; +package org.opensearch.sql.expression.conditional.cases; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -34,17 +34,17 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; import org.junit.jupiter.api.DisplayNameGeneration; import org.junit.jupiter.api.DisplayNameGenerator; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionTestBase; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -81,4 +81,4 @@ void should_use_result_expression_type() { assertEquals(ExprCoreType.INTEGER, whenClause.type()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/DateTimeFunctionTest.java b/core/src/test/java/org/opensearch/sql/expression/datetime/DateTimeFunctionTest.java similarity index 95% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/DateTimeFunctionTest.java rename to core/src/test/java/org/opensearch/sql/expression/datetime/DateTimeFunctionTest.java index 044e9042bf..a7b592634f 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/DateTimeFunctionTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/datetime/DateTimeFunctionTest.java @@ -26,38 +26,25 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.datetime; - -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.longValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.missingValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.nullValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATETIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTERVAL; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIMESTAMP; +package org.opensearch.sql.expression.datetime; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.model.ExprValueUtils.longValue; +import static org.opensearch.sql.data.model.ExprValueUtils.missingValue; +import static org.opensearch.sql.data.model.ExprValueUtils.nullValue; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.data.type.ExprCoreType.DATE; +import static org.opensearch.sql.data.type.ExprCoreType.DATETIME; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.INTERVAL; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.TIME; +import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDateValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDatetimeValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprLongValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTimeValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTimestampValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.AllArgsConstructor; @@ -66,6 +53,19 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprDateValue; +import org.opensearch.sql.data.model.ExprDatetimeValue; +import org.opensearch.sql.data.model.ExprLongValue; +import org.opensearch.sql.data.model.ExprTimeValue; +import org.opensearch.sql.data.model.ExprTimestampValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.exception.SemanticCheckException; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionTestBase; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.env.Environment; @ExtendWith(MockitoExtension.class) class DateTimeFunctionTest extends ExpressionTestBase { @@ -1014,4 +1014,4 @@ void testDateFormat(DateFormatTester dft) { private ExprValue eval(Expression expression) { return expression.valueOf(env); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/IntervalClauseTest.java b/core/src/test/java/org/opensearch/sql/expression/datetime/IntervalClauseTest.java similarity index 81% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/IntervalClauseTest.java rename to core/src/test/java/org/opensearch/sql/expression/datetime/IntervalClauseTest.java index 21f64f3978..20859ede9f 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/datetime/IntervalClauseTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/datetime/IntervalClauseTest.java @@ -24,30 +24,30 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.datetime; +package org.opensearch.sql.expression.datetime; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.intervalValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.missingValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.nullValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTERVAL; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.model.ExprValueUtils.intervalValue; +import static org.opensearch.sql.data.model.ExprValueUtils.missingValue; +import static org.opensearch.sql.data.model.ExprValueUtils.nullValue; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.INTERVAL; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import java.time.Duration; import java.time.Period; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionTestBase; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.env.Environment; @ExtendWith(MockitoExtension.class) public class IntervalClauseTest extends ExpressionTestBase { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/BuiltinFunctionNameTest.java b/core/src/test/java/org/opensearch/sql/expression/function/BuiltinFunctionNameTest.java similarity index 96% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/BuiltinFunctionNameTest.java rename to core/src/test/java/org/opensearch/sql/expression/function/BuiltinFunctionNameTest.java index bb17bbcc40..fb8a41f6c0 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/BuiltinFunctionNameTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/function/BuiltinFunctionNameTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -57,4 +57,4 @@ public void caseInsensitive() { assertTrue(BuiltinFunctionName.of("aBs").isPresent()); assertEquals(BuiltinFunctionName.of("aBs").get(), BuiltinFunctionName.ABS); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/BuiltinFunctionRepositoryTest.java b/core/src/test/java/org/opensearch/sql/expression/function/BuiltinFunctionRepositoryTest.java similarity index 91% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/BuiltinFunctionRepositoryTest.java rename to core/src/test/java/org/opensearch/sql/expression/function/BuiltinFunctionRepositoryTest.java index 014a6b9652..6f8b3600ea 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/BuiltinFunctionRepositoryTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/function/BuiltinFunctionRepositoryTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -33,10 +33,6 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import java.util.Arrays; import java.util.Map; import org.junit.jupiter.api.DisplayName; @@ -44,6 +40,10 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.env.Environment; @ExtendWith(MockitoExtension.class) class BuiltinFunctionRepositoryTest { @@ -109,4 +109,4 @@ void resolve_unregistered() { () -> repo.resolve(new FunctionSignature(FunctionName.of("unknown"), Arrays.asList()))); assertEquals("unsupported function name: unknown", exception.getMessage()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionResolverTest.java b/core/src/test/java/org/opensearch/sql/expression/function/FunctionResolverTest.java similarity index 93% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionResolverTest.java rename to core/src/test/java/org/opensearch/sql/expression/function/FunctionResolverTest.java index 852679ba86..1cd1e3756b 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionResolverTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/function/FunctionResolverTest.java @@ -24,14 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.data.type.WideningTypeRule; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import com.google.common.collect.ImmutableMap; import org.junit.jupiter.api.DisplayNameGeneration; import org.junit.jupiter.api.DisplayNameGenerator; @@ -39,6 +37,8 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.type.WideningTypeRule; +import org.opensearch.sql.exception.ExpressionEvaluationException; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -96,4 +96,4 @@ void resolve_function_not_match() { assertEquals("add function expected {[INTEGER,INTEGER]}, but get [BOOLEAN,BOOLEAN]", exception.getMessage()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionSignatureTest.java b/core/src/test/java/org/opensearch/sql/expression/function/FunctionSignatureTest.java similarity index 90% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionSignatureTest.java rename to core/src/test/java/org/opensearch/sql/expression/function/FunctionSignatureTest.java index b3f5a081bc..0bdba28b80 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/FunctionSignatureTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/function/FunctionSignatureTest.java @@ -24,15 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionSignature.EXACTLY_MATCH; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionSignature.NOT_MATCH; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; +import static org.opensearch.sql.expression.function.FunctionSignature.EXACTLY_MATCH; +import static org.opensearch.sql.expression.function.FunctionSignature.NOT_MATCH; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.DisplayNameGeneration; @@ -41,6 +39,8 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -113,4 +113,4 @@ void format_types() { assertEquals("[INTEGER,FLOAT]", unresolvedFunSig.formatTypes()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/WideningTypeRuleTest.java b/core/src/test/java/org/opensearch/sql/expression/function/WideningTypeRuleTest.java similarity index 80% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/WideningTypeRuleTest.java rename to core/src/test/java/org/opensearch/sql/expression/function/WideningTypeRuleTest.java index bce0813889..dc57a13694 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/function/WideningTypeRuleTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/function/WideningTypeRuleTest.java @@ -24,23 +24,20 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.function; +package org.opensearch.sql.expression.function; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BYTE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.SHORT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.UNDEFINED; -import static com.amazon.opendistroforelasticsearch.sql.data.type.WideningTypeRule.IMPOSSIBLE_WIDENING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.WideningTypeRule.TYPE_EQUAL; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.type.ExprCoreType.BYTE; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.SHORT; +import static org.opensearch.sql.data.type.ExprCoreType.UNDEFINED; +import static org.opensearch.sql.data.type.WideningTypeRule.IMPOSSIBLE_WIDENING; +import static org.opensearch.sql.data.type.WideningTypeRule.TYPE_EQUAL; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.WideningTypeRule; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; import com.google.common.collect.ImmutableTable; import com.google.common.collect.Lists; import com.google.common.collect.Table; @@ -50,6 +47,9 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.WideningTypeRule; +import org.opensearch.sql.exception.ExpressionEvaluationException; class WideningTypeRuleTest { private static Table numberWidenRule = @@ -138,4 +138,4 @@ public void maxOfUndefinedAndOthersShouldBeTheOtherType() { assertEquals(type, WideningTypeRule.max(UNDEFINED, type))); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/ArithmeticFunctionTest.java b/core/src/test/java/org/opensearch/sql/expression/operator/arthmetic/ArithmeticFunctionTest.java similarity index 87% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/ArithmeticFunctionTest.java rename to core/src/test/java/org/opensearch/sql/expression/operator/arthmetic/ArithmeticFunctionTest.java index 3719ee6994..ba5dae9e2a 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/ArithmeticFunctionTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/operator/arthmetic/ArithmeticFunctionTest.java @@ -24,35 +24,20 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.operator.arthmetic; +package org.opensearch.sql.expression.operator.arthmetic; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.INT_TYPE_MISSING_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.INT_TYPE_NULL_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.SHORT; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.literal; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.config.TestConfig.INT_TYPE_MISSING_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.INT_TYPE_NULL_VALUE_FIELD; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.SHORT; +import static org.opensearch.sql.expression.DSL.literal; +import static org.opensearch.sql.expression.DSL.ref; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprByteValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDoubleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprFloatValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprLongValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprShortValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.data.type.WideningTypeRule; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; import com.google.common.collect.Lists; import java.util.Arrays; import java.util.List; @@ -63,6 +48,21 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import org.opensearch.sql.data.model.ExprByteValue; +import org.opensearch.sql.data.model.ExprDoubleValue; +import org.opensearch.sql.data.model.ExprFloatValue; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprLongValue; +import org.opensearch.sql.data.model.ExprShortValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.data.type.WideningTypeRule; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionTestBase; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.function.BuiltinFunctionName; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) class ArithmeticFunctionTest extends ExpressionTestBase { @@ -365,4 +365,4 @@ protected void assertValueEqual(BuiltinFunctionName builtinFunctionName, ExprTyp throw new IllegalStateException("illegal function name " + builtinFunctionName); } } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/MathematicalFunctionTest.java b/core/src/test/java/org/opensearch/sql/expression/operator/arthmetic/MathematicalFunctionTest.java similarity index 97% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/MathematicalFunctionTest.java rename to core/src/test/java/org/opensearch/sql/expression/operator/arthmetic/MathematicalFunctionTest.java index c5d42f6653..e89ec1aa6c 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/MathematicalFunctionTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/operator/arthmetic/MathematicalFunctionTest.java @@ -24,37 +24,32 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.operator.arthmetic; - -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.DOUBLE_TYPE_MISSING_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.DOUBLE_TYPE_NULL_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.INT_TYPE_MISSING_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.INT_TYPE_NULL_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.STRING_TYPE_MISSING_VALUE_FILED; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.STRING_TYPE_NULL_VALUE_FILED; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getDoubleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getFloatValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BYTE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.SHORT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.utils.MatcherUtils.hasType; -import static com.amazon.opendistroforelasticsearch.sql.utils.MatcherUtils.hasValue; +package org.opensearch.sql.expression.operator.arthmetic; + import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.closeTo; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.config.TestConfig.DOUBLE_TYPE_MISSING_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.DOUBLE_TYPE_NULL_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.INT_TYPE_MISSING_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.INT_TYPE_NULL_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.STRING_TYPE_MISSING_VALUE_FILED; +import static org.opensearch.sql.config.TestConfig.STRING_TYPE_NULL_VALUE_FILED; +import static org.opensearch.sql.data.model.ExprValueUtils.getDoubleValue; +import static org.opensearch.sql.data.model.ExprValueUtils.getFloatValue; +import static org.opensearch.sql.data.type.ExprCoreType.BYTE; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.SHORT; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.utils.MatcherUtils.hasType; +import static org.opensearch.sql.utils.MatcherUtils.hasValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprByteValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprShortValue; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.Random; @@ -67,6 +62,11 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.ValueSource; +import org.opensearch.sql.data.model.ExprByteValue; +import org.opensearch.sql.data.model.ExprShortValue; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.ExpressionTestBase; +import org.opensearch.sql.expression.FunctionExpression; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) public class MathematicalFunctionTest extends ExpressionTestBase { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/UnaryFunctionTest.java b/core/src/test/java/org/opensearch/sql/expression/operator/arthmetic/UnaryFunctionTest.java similarity index 100% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/arthmetic/UnaryFunctionTest.java rename to core/src/test/java/org/opensearch/sql/expression/operator/arthmetic/UnaryFunctionTest.java diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/convert/TypeCastOperatorTest.java b/core/src/test/java/org/opensearch/sql/expression/operator/convert/TypeCastOperatorTest.java similarity index 83% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/convert/TypeCastOperatorTest.java rename to core/src/test/java/org/opensearch/sql/expression/operator/convert/TypeCastOperatorTest.java index c90e9088e8..ffccf9a62e 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/convert/TypeCastOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/operator/convert/TypeCastOperatorTest.java @@ -26,40 +26,40 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.operator.convert; - -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIMESTAMP; +package org.opensearch.sql.expression.operator.convert; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN; +import static org.opensearch.sql.data.type.ExprCoreType.DATE; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.TIME; +import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprBooleanValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprByteValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDateValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDatetimeValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDoubleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprFloatValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprLongValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprShortValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTimeValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTimestampValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; import java.util.stream.Stream; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; +import org.opensearch.sql.data.model.ExprBooleanValue; +import org.opensearch.sql.data.model.ExprByteValue; +import org.opensearch.sql.data.model.ExprDateValue; +import org.opensearch.sql.data.model.ExprDatetimeValue; +import org.opensearch.sql.data.model.ExprDoubleValue; +import org.opensearch.sql.data.model.ExprFloatValue; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprLongValue; +import org.opensearch.sql.data.model.ExprShortValue; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.model.ExprTimeValue; +import org.opensearch.sql.data.model.ExprTimestampValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.config.ExpressionConfig; class TypeCastOperatorTest { @@ -312,4 +312,4 @@ void castToTimestamp() { assertEquals(TIMESTAMP, expression.type()); assertEquals(new ExprTimestampValue("2012-08-07 01:01:01"), expression.valueOf(null)); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/predicate/BinaryPredicateOperatorTest.java b/core/src/test/java/org/opensearch/sql/expression/operator/predicate/BinaryPredicateOperatorTest.java similarity index 92% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/predicate/BinaryPredicateOperatorTest.java rename to core/src/test/java/org/opensearch/sql/expression/operator/predicate/BinaryPredicateOperatorTest.java index 8cc0afd006..67277a6572 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/predicate/BinaryPredicateOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/operator/predicate/BinaryPredicateOperatorTest.java @@ -24,45 +24,29 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.operator.predicate; - -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.BOOL_TYPE_MISSING_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.BOOL_TYPE_NULL_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.INT_TYPE_MISSING_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.INT_TYPE_NULL_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.STRING_TYPE_MISSING_VALUE_FILED; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.STRING_TYPE_NULL_VALUE_FILED; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.booleanValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.fromObjectValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.utils.ComparisonUtil.compare; -import static com.amazon.opendistroforelasticsearch.sql.utils.OperatorUtils.matches; +package org.opensearch.sql.expression.operator.predicate; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.config.TestConfig.BOOL_TYPE_MISSING_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.BOOL_TYPE_NULL_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.INT_TYPE_MISSING_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.INT_TYPE_NULL_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.STRING_TYPE_MISSING_VALUE_FILED; +import static org.opensearch.sql.config.TestConfig.STRING_TYPE_NULL_VALUE_FILED; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; +import static org.opensearch.sql.data.model.ExprValueUtils.booleanValue; +import static org.opensearch.sql.data.model.ExprValueUtils.fromObjectValue; +import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.utils.ComparisonUtil.compare; +import static org.opensearch.sql.utils.OperatorUtils.matches; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprBooleanValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprByteValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprCollectionValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDoubleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprFloatValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprLongValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprShortValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; @@ -80,6 +64,22 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import org.opensearch.sql.data.model.ExprBooleanValue; +import org.opensearch.sql.data.model.ExprByteValue; +import org.opensearch.sql.data.model.ExprCollectionValue; +import org.opensearch.sql.data.model.ExprDoubleValue; +import org.opensearch.sql.data.model.ExprFloatValue; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprLongValue; +import org.opensearch.sql.data.model.ExprShortValue; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionTestBase; +import org.opensearch.sql.expression.FunctionExpression; class BinaryPredicateOperatorTest extends ExpressionTestBase { @@ -839,4 +839,4 @@ public void compare_int_long() { FunctionExpression equal = dsl.equal(DSL.literal(1), DSL.literal(1L)); assertTrue(equal.valueOf(valueEnv()).booleanValue()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/predicate/UnaryPredicateOperatorTest.java b/core/src/test/java/org/opensearch/sql/expression/operator/predicate/UnaryPredicateOperatorTest.java similarity index 86% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/predicate/UnaryPredicateOperatorTest.java rename to core/src/test/java/org/opensearch/sql/expression/operator/predicate/UnaryPredicateOperatorTest.java index 58801c3679..8f8351f83b 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/operator/predicate/UnaryPredicateOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/operator/predicate/UnaryPredicateOperatorTest.java @@ -24,25 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.expression.operator.predicate; - -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.BOOL_TYPE_MISSING_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.config.TestConfig.BOOL_TYPE_NULL_VALUE_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.booleanValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BOOLEAN; +package org.opensearch.sql.expression.operator.predicate; + import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.config.TestConfig.BOOL_TYPE_MISSING_VALUE_FIELD; +import static org.opensearch.sql.config.TestConfig.BOOL_TYPE_NULL_VALUE_FIELD; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; +import static org.opensearch.sql.data.model.ExprValueUtils.booleanValue; +import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; import com.google.common.collect.Lists; import java.util.ArrayList; import java.util.stream.Stream; @@ -51,6 +44,13 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.ValueSource; +import org.opensearch.sql.data.model.ExprNullValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionTestBase; +import org.opensearch.sql.expression.FunctionExpression; class UnaryPredicateOperatorTest extends ExpressionTestBase { @ParameterizedTest(name = "not({0})") @@ -246,4 +246,4 @@ public void test_exprNullIf_predicate(ExprValue v1, ExprValue v2, ExprValue expe assertEquals(expected.value(), UnaryPredicateOperator.exprNullIf(v1, v2).value()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/text/TextFunctionTest.java b/core/src/test/java/org/opensearch/sql/expression/text/TextFunctionTest.java similarity index 92% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/text/TextFunctionTest.java rename to core/src/test/java/org/opensearch/sql/expression/text/TextFunctionTest.java index fc737bbd7e..1f9d92bb87 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/text/TextFunctionTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/text/TextFunctionTest.java @@ -26,24 +26,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.text; +package org.opensearch.sql.expression.text; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.missingValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.nullValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.model.ExprValueUtils.missingValue; +import static org.opensearch.sql.data.model.ExprValueUtils.nullValue; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import com.google.common.collect.ImmutableList; import java.util.List; import java.util.Objects; @@ -55,6 +47,14 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionTestBase; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.env.Environment; @ExtendWith(MockitoExtension.class) public class TextFunctionTest extends ExpressionTestBase { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/window/CurrentRowWindowFrameTest.java b/core/src/test/java/org/opensearch/sql/expression/window/CurrentRowWindowFrameTest.java similarity index 82% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/window/CurrentRowWindowFrameTest.java rename to core/src/test/java/org/opensearch/sql/expression/window/CurrentRowWindowFrameTest.java index f75a922aa6..c649b79165 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/window/CurrentRowWindowFrameTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/window/CurrentRowWindowFrameTest.java @@ -25,28 +25,28 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window; +package org.opensearch.sql.expression.window; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.window.frame.CurrentRowWindowFrame; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterators; import com.google.common.collect.PeekingIterator; import org.apache.commons.lang3.tuple.ImmutablePair; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.window.frame.CurrentRowWindowFrame; class CurrentRowWindowFrameTest { @@ -116,4 +116,4 @@ void can_return_previous_and_current_row() { assertEquals(row2, windowFrame.current()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/window/aggregation/AggregateWindowFunctionTest.java b/core/src/test/java/org/opensearch/sql/expression/window/aggregation/AggregateWindowFunctionTest.java similarity index 80% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/window/aggregation/AggregateWindowFunctionTest.java rename to core/src/test/java/org/opensearch/sql/expression/window/aggregation/AggregateWindowFunctionTest.java index 195913547d..20d726da67 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/window/aggregation/AggregateWindowFunctionTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/window/aggregation/AggregateWindowFunctionTest.java @@ -25,21 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window.aggregation; +package org.opensearch.sql.expression.window.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue.fromExprValueMap; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.model.ExprTupleValue.fromExprValueMap; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.Aggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.window.frame.PeerRowsWindowFrame; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import org.junit.jupiter.api.DisplayNameGeneration; @@ -47,6 +42,11 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.ExpressionTestBase; +import org.opensearch.sql.expression.aggregation.Aggregator; +import org.opensearch.sql.expression.window.frame.PeerRowsWindowFrame; /** * Aggregate window function test collection. diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/window/frame/PeerRowsWindowFrameTest.java b/core/src/test/java/org/opensearch/sql/expression/window/frame/PeerRowsWindowFrameTest.java similarity index 91% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/window/frame/PeerRowsWindowFrameTest.java rename to core/src/test/java/org/opensearch/sql/expression/window/frame/PeerRowsWindowFrameTest.java index c634a30d7f..d134913488 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/window/frame/PeerRowsWindowFrameTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/window/frame/PeerRowsWindowFrameTest.java @@ -25,21 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window.frame; +package org.opensearch.sql.expression.window.frame; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue.fromExprValueMap; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; +import static org.opensearch.sql.data.model.ExprTupleValue.fromExprValueMap; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterators; @@ -50,6 +45,11 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.window.WindowDefinition; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/RankingWindowFunctionTest.java b/core/src/test/java/org/opensearch/sql/expression/window/ranking/RankingWindowFunctionTest.java similarity index 88% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/RankingWindowFunctionTest.java rename to core/src/test/java/org/opensearch/sql/expression/window/ranking/RankingWindowFunctionTest.java index 2a9d082c16..7b727c31e7 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/RankingWindowFunctionTest.java +++ b/core/src/test/java/org/opensearch/sql/expression/window/ranking/RankingWindowFunctionTest.java @@ -25,21 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.expression.window.ranking; +package org.opensearch.sql.expression.window.ranking; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue.fromExprValueMap; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; +import static org.opensearch.sql.data.model.ExprTupleValue.fromExprValueMap; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionTestBase; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; -import com.amazon.opendistroforelasticsearch.sql.expression.window.frame.CurrentRowWindowFrame; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterators; @@ -51,6 +44,13 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.ExpressionTestBase; +import org.opensearch.sql.expression.window.WindowDefinition; +import org.opensearch.sql.expression.window.frame.CurrentRowWindowFrame; /** * Rank window function test collection. @@ -237,4 +237,4 @@ void dense_rank_should_always_return_1_if_no_sort_items_defined() { assertEquals(1, denseRank.rank(windowFrame2)); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/monitor/AlwaysHealthyMonitorTest.java b/core/src/test/java/org/opensearch/sql/monitor/AlwaysHealthyMonitorTest.java similarity index 95% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/monitor/AlwaysHealthyMonitorTest.java rename to core/src/test/java/org/opensearch/sql/monitor/AlwaysHealthyMonitorTest.java index d1c73d9b74..c5c1b60a72 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/monitor/AlwaysHealthyMonitorTest.java +++ b/core/src/test/java/org/opensearch/sql/monitor/AlwaysHealthyMonitorTest.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.monitor; +package org.opensearch.sql.monitor; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -38,4 +38,4 @@ class AlwaysHealthyMonitorTest { void isHealthy() { assertTrue(new AlwaysHealthyMonitor().isHealthy()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/DefaultImplementorTest.java b/core/src/test/java/org/opensearch/sql/planner/DefaultImplementorTest.java similarity index 70% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/DefaultImplementorTest.java rename to core/src/test/java/org/opensearch/sql/planner/DefaultImplementorTest.java index 2d937b02b9..37fc1a24ad 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/DefaultImplementorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/DefaultImplementorTest.java @@ -25,45 +25,28 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner; - -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.literal; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.named; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.eval; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.filter; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.limit; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.project; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.rareTopN; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.remove; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.rename; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.sort; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.values; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.window; +package org.opensearch.sql.planner; + import static java.util.Collections.emptyList; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.DSL.literal; +import static org.opensearch.sql.expression.DSL.named; +import static org.opensearch.sql.expression.DSL.ref; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.aggregation; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.eval; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.filter; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.limit; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.project; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.rareTopN; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.remove; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.rename; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.sort; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.values; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.window; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprBooleanValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.AvgAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; -import com.amazon.opendistroforelasticsearch.sql.expression.window.ranking.RowNumberFunction; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL; import com.google.common.collect.ImmutableMap; import java.util.Arrays; import java.util.Collections; @@ -75,6 +58,23 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.ast.tree.RareTopN.CommandType; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.data.model.ExprBooleanValue; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.AvgAggregator; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.expression.window.WindowDefinition; +import org.opensearch.sql.expression.window.ranking.RowNumberFunction; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalPlanDSL; +import org.opensearch.sql.planner.logical.LogicalRelation; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlanDSL; @ExtendWith(MockitoExtension.class) class DefaultImplementorTest { @@ -214,4 +214,4 @@ public void visitWindowOperatorShouldReturnPhysicalWindowOperator() { assertEquals(physicalPlan, logicalPlan.accept(implementor, null)); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/PlannerTest.java b/core/src/test/java/org/opensearch/sql/planner/PlannerTest.java similarity index 75% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/PlannerTest.java rename to core/src/test/java/org/opensearch/sql/planner/PlannerTest.java index b15b7cda2a..2d5019b539 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/PlannerTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/PlannerTest.java @@ -24,35 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner; +package org.opensearch.sql.planner; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; import static java.util.Collections.emptyList; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.AdditionalAnswers.returnsFirstArg; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalAggregation; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalFilter; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRename; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.LogicalPlanOptimizer; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.AggregationOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.FilterOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanTestBase; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.RenameOperator; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; -import com.amazon.opendistroforelasticsearch.sql.storage.Table; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.Map; @@ -62,6 +44,24 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.planner.logical.LogicalAggregation; +import org.opensearch.sql.planner.logical.LogicalFilter; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalPlanDSL; +import org.opensearch.sql.planner.logical.LogicalPlanNodeVisitor; +import org.opensearch.sql.planner.logical.LogicalRelation; +import org.opensearch.sql.planner.logical.LogicalRename; +import org.opensearch.sql.planner.optimizer.LogicalPlanOptimizer; +import org.opensearch.sql.planner.physical.AggregationOperator; +import org.opensearch.sql.planner.physical.FilterOperator; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlanDSL; +import org.opensearch.sql.planner.physical.PhysicalPlanTestBase; +import org.opensearch.sql.planner.physical.RenameOperator; +import org.opensearch.sql.storage.StorageEngine; +import org.opensearch.sql.storage.Table; @ExtendWith(MockitoExtension.class) public class PlannerTest extends PhysicalPlanTestBase { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalDedupeTest.java b/core/src/test/java/org/opensearch/sql/planner/logical/LogicalDedupeTest.java similarity index 68% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalDedupeTest.java rename to core/src/test/java/org/opensearch/sql/planner/logical/LogicalDedupeTest.java index 10d8c0300c..35b0081279 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalDedupeTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/logical/LogicalDedupeTest.java @@ -24,24 +24,24 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.argument; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.booleanLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.dedupe; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.defaultDedupArgs; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.exprList; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.field; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.intLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.relation; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.ast.dsl.AstDSL.argument; +import static org.opensearch.sql.ast.dsl.AstDSL.booleanLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.dedupe; +import static org.opensearch.sql.ast.dsl.AstDSL.defaultDedupArgs; +import static org.opensearch.sql.ast.dsl.AstDSL.exprList; +import static org.opensearch.sql.ast.dsl.AstDSL.field; +import static org.opensearch.sql.ast.dsl.AstDSL.intLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.relation; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; -import com.amazon.opendistroforelasticsearch.sql.analysis.AnalyzerTestBase; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opensearch.sql.analysis.AnalyzerTestBase; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.config.ExpressionConfig; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -82,4 +82,4 @@ public void analyze_dedup_with_one_field_with_customize_option() { field("integer_value"), field("double_value") )); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalEvalTest.java b/core/src/test/java/org/opensearch/sql/planner/logical/LogicalEvalTest.java similarity index 83% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalEvalTest.java rename to core/src/test/java/org/opensearch/sql/planner/logical/LogicalEvalTest.java index 1158944619..48293bd8f7 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalEvalTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/logical/LogicalEvalTest.java @@ -24,19 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.field; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.ast.dsl.AstDSL.field; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; -import com.amazon.opendistroforelasticsearch.sql.analysis.AnalyzerTestBase; -import com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; import org.apache.commons.lang3.tuple.ImmutablePair; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.analysis.AnalyzerTestBase; +import org.opensearch.sql.ast.dsl.AstDSL; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.config.ExpressionConfig; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalPlanNodeVisitorTest.java b/core/src/test/java/org/opensearch/sql/planner/logical/LogicalPlanNodeVisitorTest.java similarity index 89% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalPlanNodeVisitorTest.java rename to core/src/test/java/org/opensearch/sql/planner/logical/LogicalPlanNodeVisitorTest.java index 9176d98d24..f4692ddcef 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalPlanNodeVisitorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/logical/LogicalPlanNodeVisitorTest.java @@ -24,19 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.named; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; +import static org.opensearch.sql.expression.DSL.named; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.Aggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.stream.Collectors; @@ -45,6 +38,13 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.ast.tree.RareTopN.CommandType; +import org.opensearch.sql.ast.tree.Sort.SortOption; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.Aggregator; +import org.opensearch.sql.expression.window.WindowDefinition; /** * Todo. Temporary added for UT coverage, Will be removed. diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRelationTest.java b/core/src/test/java/org/opensearch/sql/planner/logical/LogicalRelationTest.java similarity index 94% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRelationTest.java rename to core/src/test/java/org/opensearch/sql/planner/logical/LogicalRelationTest.java index 2ceac518fd..5d8c3ef0b0 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalRelationTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/logical/LogicalRelationTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -37,4 +37,4 @@ public void logicalRelationHasNoInput() { LogicalPlan relation = LogicalPlanDSL.relation("index"); assertEquals(0, relation.getChild().size()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalSortTest.java b/core/src/test/java/org/opensearch/sql/planner/logical/LogicalSortTest.java similarity index 67% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalSortTest.java rename to core/src/test/java/org/opensearch/sql/planner/logical/LogicalSortTest.java index 9da7e9f311..ad7f3c11d4 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/logical/LogicalSortTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/logical/LogicalSortTest.java @@ -24,26 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.logical; +package org.opensearch.sql.planner.logical; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.argument; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.booleanLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.defaultSortFieldArgs; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.exprList; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.field; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.nullLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.relation; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.sort; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.ast.dsl.AstDSL.argument; +import static org.opensearch.sql.ast.dsl.AstDSL.booleanLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.defaultSortFieldArgs; +import static org.opensearch.sql.ast.dsl.AstDSL.exprList; +import static org.opensearch.sql.ast.dsl.AstDSL.field; +import static org.opensearch.sql.ast.dsl.AstDSL.nullLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.relation; +import static org.opensearch.sql.ast.dsl.AstDSL.sort; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; -import com.amazon.opendistroforelasticsearch.sql.analysis.AnalyzerTestBase; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; import org.apache.commons.lang3.tuple.ImmutablePair; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opensearch.sql.analysis.AnalyzerTestBase; +import org.opensearch.sql.ast.tree.Sort.SortOption; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.config.ExpressionConfig; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/LogicalPlanOptimizerTest.java b/core/src/test/java/org/opensearch/sql/planner/optimizer/LogicalPlanOptimizerTest.java similarity index 78% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/LogicalPlanOptimizerTest.java rename to core/src/test/java/org/opensearch/sql/planner/optimizer/LogicalPlanOptimizerTest.java index ba12d877e5..db7d150a67 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/LogicalPlanOptimizerTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/optimizer/LogicalPlanOptimizerTest.java @@ -26,25 +26,25 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner.optimizer; +package org.opensearch.sql.planner.optimizer; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.longValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.filter; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.relation; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.sort; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.model.ExprValueUtils.longValue; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.filter; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.relation; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.sort; -import com.amazon.opendistroforelasticsearch.sql.analysis.AnalyzerTestBase; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; import org.apache.commons.lang3.tuple.Pair; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opensearch.sql.analysis.AnalyzerTestBase; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.planner.logical.LogicalPlan; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -135,4 +135,4 @@ private LogicalPlan optimize(LogicalPlan plan) { final LogicalPlan optimize = optimizer.optimize(plan); return optimize; } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/pattern/PatternsTest.java b/core/src/test/java/org/opensearch/sql/planner/optimizer/pattern/PatternsTest.java similarity index 90% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/pattern/PatternsTest.java rename to core/src/test/java/org/opensearch/sql/planner/optimizer/pattern/PatternsTest.java index c8489a9f59..675010acc3 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/optimizer/pattern/PatternsTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/optimizer/pattern/PatternsTest.java @@ -26,17 +26,17 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern; +package org.opensearch.sql.planner.optimizer.pattern; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; import java.util.Collections; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.planner.logical.LogicalPlan; @ExtendWith(MockitoExtension.class) class PatternsTest { @@ -49,4 +49,4 @@ void source_is_empty() { when(plan.getChild()).thenReturn(Collections.emptyList()); assertFalse(Patterns.source().getFunction().apply(plan).isPresent()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/AggregationOperatorTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/AggregationOperatorTest.java similarity index 88% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/AggregationOperatorTest.java rename to core/src/test/java/org/opensearch/sql/planner/physical/AggregationOperatorTest.java index dcdad0208e..d3eef3b06e 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/AggregationOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/AggregationOperatorTest.java @@ -24,22 +24,22 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; import com.google.common.collect.ImmutableMap; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.expression.DSL; class AggregationOperatorTest extends PhysicalPlanTestBase { @Test @@ -88,4 +88,4 @@ public void sum_with_one_groups() { ExprValueUtils.tupleValue(ImmutableMap.of("action", "POST", "sum(response)", 700)) )); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/DedupeOperatorTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/DedupeOperatorTest.java similarity index 95% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/DedupeOperatorTest.java rename to core/src/test/java/org/opensearch/sql/planner/physical/DedupeOperatorTest.java index 81c8cea05a..910536c94f 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/DedupeOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/DedupeOperatorTest.java @@ -24,18 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.tupleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.dedupe; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.contains; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.model.ExprValueUtils.tupleValue; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.dedupe; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.DedupeOperator.Deduper; import com.google.common.collect.ImmutableMap; import java.util.HashMap; import java.util.Map; @@ -43,6 +41,8 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.planner.physical.DedupeOperator.Deduper; @ExtendWith(MockitoExtension.class) class DedupeOperatorTest extends PhysicalPlanTestBase { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/EvalOperatorTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/EvalOperatorTest.java similarity index 89% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/EvalOperatorTest.java rename to core/src/test/java/org/opensearch/sql/planner/physical/EvalOperatorTest.java index cd0f9202c4..0ed664ce07 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/EvalOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/EvalOperatorTest.java @@ -24,21 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.eval; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.Matchers.iterableWithSize; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.eval; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; import com.google.common.collect.ImmutableMap; import java.util.List; import org.apache.commons.lang3.tuple.ImmutablePair; @@ -46,6 +43,9 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.expression.DSL; @ExtendWith(MockitoExtension.class) class EvalOperatorTest extends PhysicalPlanTestBase { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/FilterOperatorTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/FilterOperatorTest.java similarity index 82% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/FilterOperatorTest.java rename to core/src/test/java/org/opensearch/sql/planner/physical/FilterOperatorTest.java index 7c88c849d9..0c3a08ccec 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/FilterOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/FilterOperatorTest.java @@ -24,20 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; import com.google.common.collect.ImmutableMap; import java.util.LinkedHashMap; import java.util.List; @@ -45,6 +41,10 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.expression.DSL; @ExtendWith(MockitoExtension.class) class FilterOperatorTest extends PhysicalPlanTestBase { @@ -88,4 +88,4 @@ public void missingValueShouldBeenIgnored() { List result = execute(plan); assertEquals(0, result.size()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/LimitOperatorTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/LimitOperatorTest.java similarity index 91% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/LimitOperatorTest.java rename to core/src/test/java/org/opensearch/sql/planner/physical/LimitOperatorTest.java index 409b4eeb80..602b8a5457 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/LimitOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/LimitOperatorTest.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.jupiter.api.Assertions.assertEquals; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; import com.google.common.collect.ImmutableMap; import java.util.List; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; public class LimitOperatorTest extends PhysicalPlanTestBase { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlanNodeVisitorTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/PhysicalPlanNodeVisitorTest.java similarity index 90% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlanNodeVisitorTest.java rename to core/src/test/java/org/opensearch/sql/planner/physical/PhysicalPlanNodeVisitorTest.java index 93dd77af87..6f073629f4 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlanNodeVisitorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/PhysicalPlanNodeVisitorTest.java @@ -24,20 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.named; import static java.util.Collections.emptyList; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.expression.DSL.named; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -46,6 +41,11 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.ast.tree.RareTopN.CommandType; +import org.opensearch.sql.ast.tree.Sort.SortOption; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.window.WindowDefinition; /** * Todo, testing purpose, delete later. diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlanTestBase.java b/core/src/test/java/org/opensearch/sql/planner/physical/PhysicalPlanTestBase.java similarity index 88% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlanTestBase.java rename to core/src/test/java/org/opensearch/sql/planner/physical/PhysicalPlanTestBase.java index 64722ba856..749a8d2ed0 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/PhysicalPlanTestBase.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/PhysicalPlanTestBase.java @@ -24,23 +24,23 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; - -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; +package org.opensearch.sql.planner.physical; + import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.junit.jupiter.api.extension.ExtendWith; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.expression.env.Environment; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/ProjectOperatorTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/ProjectOperatorTest.java similarity index 81% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/ProjectOperatorTest.java rename to core/src/test/java/org/opensearch/sql/planner/physical/ProjectOperatorTest.java index b2763a79e1..156dcc1207 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/ProjectOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/ProjectOperatorTest.java @@ -24,31 +24,31 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.project; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.Matchers.iterableWithSize; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.project; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; import com.google.common.collect.ImmutableMap; import java.util.List; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.expression.DSL; @ExtendWith(MockitoExtension.class) class ProjectOperatorTest extends PhysicalPlanTestBase { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RareTopNOperatorTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/RareTopNOperatorTest.java similarity index 90% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RareTopNOperatorTest.java rename to core/src/test/java/org/opensearch/sql/planner/physical/RareTopNOperatorTest.java index 8adaa7cbab..899d111295 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RareTopNOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/RareTopNOperatorTest.java @@ -24,21 +24,21 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.jupiter.api.Assertions.assertEquals; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; import com.google.common.collect.ImmutableMap; import java.util.Collections; import java.util.List; import org.junit.jupiter.api.Test; +import org.opensearch.sql.ast.tree.RareTopN.CommandType; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.expression.DSL; public class RareTopNOperatorTest extends PhysicalPlanTestBase { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RemoveOperatorTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/RemoveOperatorTest.java similarity index 90% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RemoveOperatorTest.java rename to core/src/test/java/org/opensearch/sql/planner/physical/RemoveOperatorTest.java index fab6023b7b..0d6a2d73ba 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RemoveOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/RemoveOperatorTest.java @@ -24,11 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.remove; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.hasItems; @@ -36,16 +33,19 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.remove; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; import com.google.common.collect.ImmutableMap; import java.util.List; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.expression.DSL; @ExtendWith(MockitoExtension.class) class RemoveOperatorTest extends PhysicalPlanTestBase { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RenameOperatorTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/RenameOperatorTest.java similarity index 83% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RenameOperatorTest.java rename to core/src/test/java/org/opensearch/sql/planner/physical/RenameOperatorTest.java index 5d7d543f95..975a679ee3 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/RenameOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/RenameOperatorTest.java @@ -24,19 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; import com.google.common.collect.ImmutableMap; import java.util.Collections; import java.util.List; @@ -44,6 +41,9 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.expression.DSL; @ExtendWith(MockitoExtension.class) public class RenameOperatorTest extends PhysicalPlanTestBase { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/SortOperatorTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/SortOperatorTest.java similarity index 96% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/SortOperatorTest.java rename to core/src/test/java/org/opensearch/sql/planner/physical/SortOperatorTest.java index b46df20897..74b7e508b6 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/SortOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/SortOperatorTest.java @@ -24,18 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.tupleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.sort; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.contains; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.model.ExprValueUtils.tupleValue; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.expression.DSL.ref; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.sort; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; import com.google.common.collect.ImmutableMap; import java.util.HashMap; import java.util.Map; @@ -44,6 +43,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.ast.tree.Sort.SortOption; @ExtendWith(MockitoExtension.class) class SortOperatorTest extends PhysicalPlanTestBase { diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/ValuesOperatorTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/ValuesOperatorTest.java similarity index 81% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/ValuesOperatorTest.java rename to core/src/test/java/org/opensearch/sql/planner/physical/ValuesOperatorTest.java index d21c2f0ffc..d67c3f62bf 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/ValuesOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/ValuesOperatorTest.java @@ -25,22 +25,22 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.collectionValue; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.literal; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.values; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.is; +import static org.opensearch.sql.data.model.ExprValueUtils.collectionValue; +import static org.opensearch.sql.expression.DSL.literal; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.values; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; import com.google.common.collect.ImmutableList; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValue; class ValuesOperatorTest { @@ -67,4 +67,4 @@ public void iterateSingleRow() { ); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/WindowOperatorTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/WindowOperatorTest.java similarity index 86% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/WindowOperatorTest.java rename to core/src/test/java/org/opensearch/sql/planner/physical/WindowOperatorTest.java index 8c9dfb8a78..91767e966e 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/planner/physical/WindowOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/WindowOperatorTest.java @@ -25,23 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.planner.physical; +package org.opensearch.sql.planner.physical; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.DSL.ref; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; -import com.amazon.opendistroforelasticsearch.sql.expression.window.aggregation.AggregateWindowFunction; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.List; @@ -54,6 +47,13 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.ast.tree.Sort.SortOption; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.window.WindowDefinition; +import org.opensearch.sql.expression.window.aggregation.AggregateWindowFunction; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -177,4 +177,4 @@ void done() { } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/storage/TableScanOperatorTest.java b/core/src/test/java/org/opensearch/sql/storage/TableScanOperatorTest.java similarity index 86% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/storage/TableScanOperatorTest.java rename to core/src/test/java/org/opensearch/sql/storage/TableScanOperatorTest.java index c8f2eab235..3563ba4d54 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/storage/TableScanOperatorTest.java +++ b/core/src/test/java/org/opensearch/sql/storage/TableScanOperatorTest.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.storage; +package org.opensearch.sql.storage; import static org.junit.jupiter.api.Assertions.assertTrue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanNodeVisitor; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlanNodeVisitor; class TableScanOperatorTest { @@ -75,4 +75,4 @@ public void getChild() { assertTrue(tableScan.getChild().isEmpty()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/storage/bindingtuple/BindingTupleTest.java b/core/src/test/java/org/opensearch/sql/storage/bindingtuple/BindingTupleTest.java similarity index 85% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/storage/bindingtuple/BindingTupleTest.java rename to core/src/test/java/org/opensearch/sql/storage/bindingtuple/BindingTupleTest.java index 3c7217b62a..bf357a4e98 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/storage/bindingtuple/BindingTupleTest.java +++ b/core/src/test/java/org/opensearch/sql/storage/bindingtuple/BindingTupleTest.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.storage.bindingtuple; +package org.opensearch.sql.storage.bindingtuple; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; import com.google.common.collect.ImmutableMap; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.expression.DSL; class BindingTupleTest { @Test @@ -67,4 +67,4 @@ public void resolve_literal_expression_throw_exception() { () -> bindingTuple.resolve(DSL.literal(1))); assertEquals("can resolve expression: 1", exception.getMessage()); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/utils/ComparisonUtil.java b/core/src/test/java/org/opensearch/sql/utils/ComparisonUtil.java similarity index 65% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/utils/ComparisonUtil.java rename to core/src/test/java/org/opensearch/sql/utils/ComparisonUtil.java index 46a986ad2f..2193328702 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/utils/ComparisonUtil.java +++ b/core/src/test/java/org/opensearch/sql/utils/ComparisonUtil.java @@ -24,23 +24,23 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.utils; +package org.opensearch.sql.utils; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getDoubleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getFloatValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getIntegerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getLongValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.getStringValue; +import static org.opensearch.sql.data.model.ExprValueUtils.getDoubleValue; +import static org.opensearch.sql.data.model.ExprValueUtils.getFloatValue; +import static org.opensearch.sql.data.model.ExprValueUtils.getIntegerValue; +import static org.opensearch.sql.data.model.ExprValueUtils.getLongValue; +import static org.opensearch.sql.data.model.ExprValueUtils.getStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprByteValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDoubleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprFloatValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprLongValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprShortValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.data.model.ExprByteValue; +import org.opensearch.sql.data.model.ExprDoubleValue; +import org.opensearch.sql.data.model.ExprFloatValue; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprLongValue; +import org.opensearch.sql.data.model.ExprShortValue; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.exception.ExpressionEvaluationException; public class ComparisonUtil { /** diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/utils/MatcherUtils.java b/core/src/test/java/org/opensearch/sql/utils/MatcherUtils.java similarity index 90% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/utils/MatcherUtils.java rename to core/src/test/java/org/opensearch/sql/utils/MatcherUtils.java index bdf3abd943..8b6fab72d4 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/utils/MatcherUtils.java +++ b/core/src/test/java/org/opensearch/sql/utils/MatcherUtils.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.utils; +package org.opensearch.sql.utils; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; import org.hamcrest.Description; import org.hamcrest.TypeSafeMatcher; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprCoreType; /** * Matcher Utils. diff --git a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/utils/SystemIndexUtilsTest.java b/core/src/test/java/org/opensearch/sql/utils/SystemIndexUtilsTest.java similarity index 87% rename from core/src/test/java/com/amazon/opendistroforelasticsearch/sql/utils/SystemIndexUtilsTest.java rename to core/src/test/java/org/opensearch/sql/utils/SystemIndexUtilsTest.java index 38f60704b7..07fbb72e84 100644 --- a/core/src/test/java/com/amazon/opendistroforelasticsearch/sql/utils/SystemIndexUtilsTest.java +++ b/core/src/test/java/org/opensearch/sql/utils/SystemIndexUtilsTest.java @@ -26,15 +26,15 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.utils; +package org.opensearch.sql.utils; -import static com.amazon.opendistroforelasticsearch.sql.utils.SystemIndexUtils.isSystemIndex; -import static com.amazon.opendistroforelasticsearch.sql.utils.SystemIndexUtils.mappingTable; -import static com.amazon.opendistroforelasticsearch.sql.utils.SystemIndexUtils.systemTable; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.utils.SystemIndexUtils.isSystemIndex; +import static org.opensearch.sql.utils.SystemIndexUtils.mappingTable; +import static org.opensearch.sql.utils.SystemIndexUtils.systemTable; import org.junit.jupiter.api.Test; @@ -75,4 +75,4 @@ void throw_exception_for_invalid_index() { assertThrows(IllegalStateException.class, () -> systemTable("_ODFE_SYS_TABLE.employee")); assertEquals("Invalid system index name: _ODFE_SYS_TABLE.employee", exception.getMessage()); } -} \ No newline at end of file +} diff --git a/docs/attributions.md b/docs/attributions.md index f956e86ef2..dfa90a7d21 100644 --- a/docs/attributions.md +++ b/docs/attributions.md @@ -2,7 +2,7 @@ This project is based on the Apache 2.0-licensed [elasticsearch-sql](https://git ## What’s OpenSearch SQL? -The Open Distro for Elaticsearch SQL plugin launched early this year which lets you write queries in SQL rather than the OpenSearch query domain-specific language (DSL). While the majority of our codebase is on top of ES-SQL initially, there are a lot of new features and bug fixes introduced in our implementation. And in the following releases this year, we keep improving and refactoring our code as well as maintaining version currency of OpenSearch. Basically OpenSearch SQL is superset of ES-SQL and it’s more reliable and up-to-date. +The OpenSearch plugin lets you write queries in SQL rather than the OpenSearch query domain-specific language (DSL). While the majority of our codebase is on top of ES-SQL initially, there are a lot of new features and bug fixes introduced in our implementation. And in the following releases this year, we keep improving and refactoring our code as well as maintaining version currency of OpenSearch. Basically OpenSearch SQL is superset of ES-SQL and it’s more reliable and up-to-date. ## The problems we found in NLPchina-ES-SQL. @@ -23,7 +23,7 @@ Apart from the problems we identified earlier, we made significant improvement i 1. *Integration Test*: We migrated all integrate tests to standard OpenSearch IT framework which spins up in-memory cluster for testing. Now all test cases treat plugin code as blackbox and verify functionality from externally. 2. *New JDBC Driver*: We developed our own JDBC driver without any dependency on Elasticsearch proprietary code. [sql-jdbc](https://github.com/opensearch-project/sql/tree/master/sql-jdbc) -3. *Better Hash JOIN*: OpenDistro SQL launched with Block Hash Join implementation with circuit break mechanism to protect your OpenSearch memory. Performance testing showed our implementation is 1.5 ~ 2x better than old hash join in terms of throughput and latency and much lower error rate under heavy pressure. +3. *Better Hash JOIN*: Block Hash Join implementation with circuit break mechanism protect your OpenSearch memory. Performance testing showed our implementation is 1.5 ~ 2x better than old hash join in terms of throughput and latency and much lower error rate under heavy pressure. 4. *Query Planner*: Logical and physical planner was added to support JOIN query in efficient and extendible way. 5. *PartiQL Compatibility*: we are partially compatible with PartiQL specification which allows for query involved in nested JSON documents. 6. *New ANTLR Parser*: A new ANTLR4 parser was generated from grammar based on what we support along with a new semantic analyzer to perform scope and type checking. diff --git a/docs/experiment/ppl/admin/settings.rst b/docs/experiment/ppl/admin/settings.rst index b025398911..588ddd5d59 100644 --- a/docs/experiment/ppl/admin/settings.rst +++ b/docs/experiment/ppl/admin/settings.rst @@ -116,8 +116,8 @@ PPL query:: "transient": {} } -opendistro.query.size_limit -================================= +opensearch.query.size_limit +=========================== Description ----------- diff --git a/docs/experiment/ppl/index.rst b/docs/experiment/ppl/index.rst index dded169aeb..f50fda6d04 100644 --- a/docs/experiment/ppl/index.rst +++ b/docs/experiment/ppl/index.rst @@ -1,6 +1,6 @@ =============================== -OpenDistro PPL Reference Manual +OpenSearch PPL Reference Manual =============================== Overview diff --git a/docs/user/admin/settings.rst b/docs/user/admin/settings.rst index bf0c1e9188..bd82e57126 100644 --- a/docs/user/admin/settings.rst +++ b/docs/user/admin/settings.rst @@ -555,7 +555,7 @@ Result set:: } -opendistro.query.size_limit +opensearch.query.size_limit =========================== Description diff --git a/docs/user/dql/basics.rst b/docs/user/dql/basics.rst index 376ef2208d..f3c3003dc9 100644 --- a/docs/user/dql/basics.rst +++ b/docs/user/dql/basics.rst @@ -1113,6 +1113,6 @@ Offset position can be given following the OFFSET keyword as well, here is an ex Limitation ---------- -Generally, sort plan is pushed down into the OpenSearch DSL in plan optimization, but note that if a query has complex sorting, like sort expression, which would not be pushed down during optimization (see `Optimizations <../optimization/optimization.rst>`_ for details), but computed in local memory. However, the engine fetches the index of a default size that is set in plugin setting (See `Settings <../admin/settings.rst>` opendistro.query.size_limit for details). Therefore, the result might not be absolutely correct if the index size is larger than the default size of index scan. For example, the engine has a index scan size of 200 and the index size is 500. Then a query with limit 300 can only fetch 200 rows of the index, compute and return the sorted result with 200 rows, while the rest 300 rows of the index are ignored and would not be fetched into the engine. To get an absolutely correct result, it is suggested to set the query size limit to a larger value before run the query. +Generally, sort plan is pushed down into the OpenSearch DSL in plan optimization, but note that if a query has complex sorting, like sort expression, which would not be pushed down during optimization (see `Optimizations <../optimization/optimization.rst>`_ for details), but computed in local memory. However, the engine fetches the index of a default size that is set in plugin setting (See `Settings <../admin/settings.rst>` opensearch.query.size_limit for details). Therefore, the result might not be absolutely correct if the index size is larger than the default size of index scan. For example, the engine has a index scan size of 200 and the index size is 500. Then a query with limit 300 can only fetch 200 rows of the index, compute and return the sorted result with 200 rows, while the rest 300 rows of the index are ignored and would not be fetched into the engine. To get an absolutely correct result, it is suggested to set the query size limit to a larger value before run the query. diff --git a/doctest/build.gradle b/doctest/build.gradle index c9a3372b76..7e72435b35 100644 --- a/doctest/build.gradle +++ b/doctest/build.gradle @@ -62,4 +62,4 @@ testClusters { tasks.register("runRestTestCluster", RunTask) { description = 'Runs OpenSearch SQL plugin' useCluster testClusters.docTestCluster; -} \ No newline at end of file +} diff --git a/integ-test/build.gradle b/integ-test/build.gradle index f49afc9e71..e1e1122146 100644 --- a/integ-test/build.gradle +++ b/integ-test/build.gradle @@ -122,10 +122,10 @@ integTest { jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005' } - exclude 'com/amazon/opendistroforelasticsearch/sql/ppl/**/*IT.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/sql/**/*IT.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/doctest/**/*IT.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/correctness/**' + exclude 'org/opensearch/sql/ppl/**/*IT.class' + exclude 'org/opensearch/sql/sql/**/*IT.class' + exclude 'org/opensearch/sql/doctest/**/*IT.class' + exclude 'org/opensearch/sql/correctness/**' } // Run PPL ITs and new, legacy and comparison SQL ITs with new SQL engine enabled @@ -150,20 +150,20 @@ task integTestWithNewEngine(type: RestIntegTestTask) { jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005' } - exclude 'com/amazon/opendistroforelasticsearch/sql/doctest/**/*IT.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/correctness/**' + exclude 'org/opensearch/sql/doctest/**/*IT.class' + exclude 'org/opensearch/sql/correctness/**' // Explain IT is dependent on internal implementation of old engine so it's not necessary // to run these with new engine and not necessary to make this consistent with old engine. - exclude 'com/amazon/opendistroforelasticsearch/sql/legacy/ExplainIT.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/legacy/PrettyFormatterIT.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/legacy/TermQueryExplainIT.class' + exclude 'org/opensearch/sql/legacy/ExplainIT.class' + exclude 'org/opensearch/sql/legacy/PrettyFormatterIT.class' + exclude 'org/opensearch/sql/legacy/TermQueryExplainIT.class' // Skip old semantic analyzer IT because analyzer in new engine has different behavior - exclude 'com/amazon/opendistroforelasticsearch/sql/legacy/QueryAnalysisIT.class' + exclude 'org/opensearch/sql/legacy/QueryAnalysisIT.class' // Skip this IT because all assertions are against explain output - exclude 'com/amazon/opendistroforelasticsearch/sql/legacy/OrderIT.class' + exclude 'org/opensearch/sql/legacy/OrderIT.class' } @@ -183,11 +183,11 @@ task docTest(type: RestIntegTestTask) { jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005' } - include 'com/amazon/opendistroforelasticsearch/sql/doctest/**/*IT.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/correctness/**/*IT.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/ppl/**/*IT.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/sql/**/*IT.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/legacy/**/*IT.class' + include 'org/opensearch/sql/doctest/**/*IT.class' + exclude 'org/opensearch/sql/correctness/**/*IT.class' + exclude 'org/opensearch/sql/ppl/**/*IT.class' + exclude 'org/opensearch/sql/sql/**/*IT.class' + exclude 'org/opensearch/sql/legacy/**/*IT.class' } task comparisonTest(type: RestIntegTestTask) { @@ -204,10 +204,10 @@ task comparisonTest(type: RestIntegTestTask) { jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005' } - include 'com/amazon/opendistroforelasticsearch/sql/correctness/**/*IT.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/doctest/**/*IT.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/ppl/**/*IT.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/legacy/**/*IT.class' + include 'org/opensearch/sql/correctness/**/*IT.class' + exclude 'org/opensearch/sql/doctest/**/*IT.class' + exclude 'org/opensearch/sql/ppl/**/*IT.class' + exclude 'org/opensearch/sql/legacy/**/*IT.class' // Enable logging output to console testLogging.showStandardStreams true diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/CorrectnessIT.java b/integ-test/src/test/java/org/opensearch/sql/correctness/CorrectnessIT.java similarity index 88% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/CorrectnessIT.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/CorrectnessIT.java index 3eb146161c..526c5b47cb 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/CorrectnessIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/CorrectnessIT.java @@ -24,17 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness; +package org.opensearch.sql.correctness; -import static com.amazon.opendistroforelasticsearch.sql.util.TestUtils.getResourceFilePath; +import static org.opensearch.sql.util.TestUtils.getResourceFilePath; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.TestReport; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.ComparisonTest; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.connection.DBConnection; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.connection.OpenSearchConnection; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.connection.JDBCConnection; -import com.amazon.opendistroforelasticsearch.sql.correctness.testset.TestDataSet; -import com.amazon.opendistroforelasticsearch.sql.legacy.CustomExternalTestCluster; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope; import com.google.common.collect.Maps; import java.io.IOException; @@ -56,6 +49,13 @@ import org.opensearch.client.RestClient; import org.opensearch.common.Strings; import org.opensearch.common.transport.TransportAddress; +import org.opensearch.sql.correctness.report.TestReport; +import org.opensearch.sql.correctness.runner.ComparisonTest; +import org.opensearch.sql.correctness.runner.connection.DBConnection; +import org.opensearch.sql.correctness.runner.connection.JDBCConnection; +import org.opensearch.sql.correctness.runner.connection.OpenSearchConnection; +import org.opensearch.sql.correctness.testset.TestDataSet; +import org.opensearch.sql.legacy.CustomExternalTestCluster; import org.opensearch.test.OpenSearchIntegTestCase; import org.opensearch.test.TestCluster; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/TestConfig.java b/integ-test/src/test/java/org/opensearch/sql/correctness/TestConfig.java similarity index 94% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/TestConfig.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/TestConfig.java index fb711a37d8..2fe069c5cf 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/TestConfig.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/TestConfig.java @@ -24,19 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness; +package org.opensearch.sql.correctness; import static java.util.stream.Collectors.joining; -import com.amazon.opendistroforelasticsearch.sql.correctness.testset.TestDataSet; -import com.amazon.opendistroforelasticsearch.sql.correctness.testset.TestQuerySet; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.google.common.base.Charsets; import com.google.common.io.Resources; import java.net.URL; import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import org.opensearch.sql.correctness.testset.TestDataSet; +import org.opensearch.sql.correctness.testset.TestQuerySet; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Test configuration parse the following information from command line arguments: diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/ErrorTestCase.java b/integ-test/src/test/java/org/opensearch/sql/correctness/report/ErrorTestCase.java similarity index 88% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/ErrorTestCase.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/report/ErrorTestCase.java index f37378c284..4822936ba2 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/ErrorTestCase.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/report/ErrorTestCase.java @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.report; +package org.opensearch.sql.correctness.report; -import static com.amazon.opendistroforelasticsearch.sql.correctness.report.TestCaseReport.TestResult.FAILURE; +import static org.opensearch.sql.correctness.report.TestCaseReport.TestResult.FAILURE; import lombok.EqualsAndHashCode; import lombok.Getter; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/FailedTestCase.java b/integ-test/src/test/java/org/opensearch/sql/correctness/report/FailedTestCase.java similarity index 88% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/FailedTestCase.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/report/FailedTestCase.java index edced92c75..3c0567ac7e 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/FailedTestCase.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/report/FailedTestCase.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.report; +package org.opensearch.sql.correctness.report; -import static com.amazon.opendistroforelasticsearch.sql.correctness.report.TestCaseReport.TestResult.FAILURE; +import static org.opensearch.sql.correctness.report.TestCaseReport.TestResult.FAILURE; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.DBResult; import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; +import org.opensearch.sql.correctness.runner.resultset.DBResult; /** * Report for test case that fails due to inconsistent result set. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/SuccessTestCase.java b/integ-test/src/test/java/org/opensearch/sql/correctness/report/SuccessTestCase.java similarity index 87% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/SuccessTestCase.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/report/SuccessTestCase.java index 5a9e9cf853..2e6e5742de 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/SuccessTestCase.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/report/SuccessTestCase.java @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.report; +package org.opensearch.sql.correctness.report; -import static com.amazon.opendistroforelasticsearch.sql.correctness.report.TestCaseReport.TestResult.SUCCESS; +import static org.opensearch.sql.correctness.report.TestCaseReport.TestResult.SUCCESS; import lombok.EqualsAndHashCode; import lombok.Getter; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/TestCaseReport.java b/integ-test/src/test/java/org/opensearch/sql/correctness/report/TestCaseReport.java similarity index 89% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/TestCaseReport.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/report/TestCaseReport.java index e3de3bca5a..0a7b974503 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/TestCaseReport.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/report/TestCaseReport.java @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.report; +package org.opensearch.sql.correctness.report; -import static com.amazon.opendistroforelasticsearch.sql.correctness.report.TestCaseReport.TestResult.SUCCESS; +import static org.opensearch.sql.correctness.report.TestCaseReport.TestResult.SUCCESS; import lombok.EqualsAndHashCode; import lombok.Getter; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/TestReport.java b/integ-test/src/test/java/org/opensearch/sql/correctness/report/TestReport.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/TestReport.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/report/TestReport.java index 833f6f3d70..b21417dcbf 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/TestReport.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/report/TestReport.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.report; +package org.opensearch.sql.correctness.report; import java.util.ArrayList; import java.util.List; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/TestSummary.java b/integ-test/src/test/java/org/opensearch/sql/correctness/report/TestSummary.java similarity index 94% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/TestSummary.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/report/TestSummary.java index e240c34679..b305a79e51 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/report/TestSummary.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/report/TestSummary.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.report; +package org.opensearch.sql.correctness.report; import lombok.EqualsAndHashCode; import lombok.Getter; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/ComparisonTest.java b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/ComparisonTest.java similarity index 85% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/ComparisonTest.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/runner/ComparisonTest.java index 95677b0186..d3c3b2df08 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/ComparisonTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/ComparisonTest.java @@ -24,26 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.runner; +package org.opensearch.sql.correctness.runner; import static com.google.common.collect.ObjectArrays.concat; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.ErrorTestCase; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.FailedTestCase; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.SuccessTestCase; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.TestCaseReport; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.TestReport; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.connection.DBConnection; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.DBResult; -import com.amazon.opendistroforelasticsearch.sql.correctness.testset.TestDataSet; -import com.amazon.opendistroforelasticsearch.sql.correctness.testset.TestQuerySet; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.google.common.collect.Iterators; import com.google.common.collect.Lists; import java.util.Arrays; import java.util.Comparator; import java.util.Iterator; import java.util.List; +import org.opensearch.sql.correctness.report.ErrorTestCase; +import org.opensearch.sql.correctness.report.FailedTestCase; +import org.opensearch.sql.correctness.report.SuccessTestCase; +import org.opensearch.sql.correctness.report.TestCaseReport; +import org.opensearch.sql.correctness.report.TestReport; +import org.opensearch.sql.correctness.runner.connection.DBConnection; +import org.opensearch.sql.correctness.runner.resultset.DBResult; +import org.opensearch.sql.correctness.testset.TestDataSet; +import org.opensearch.sql.correctness.testset.TestQuerySet; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Comparison test runner for query result correctness. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/connection/DBConnection.java b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/connection/DBConnection.java similarity index 91% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/connection/DBConnection.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/runner/connection/DBConnection.java index a8cbeebc51..6181d2ec23 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/connection/DBConnection.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/connection/DBConnection.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.runner.connection; +package org.opensearch.sql.correctness.runner.connection; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.DBResult; import java.util.List; +import org.opensearch.sql.correctness.runner.resultset.DBResult; /** * Abstraction for different databases. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/connection/JDBCConnection.java b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/connection/JDBCConnection.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/connection/JDBCConnection.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/runner/connection/JDBCConnection.java index 4f6f458e77..1197e27724 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/connection/JDBCConnection.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/connection/JDBCConnection.java @@ -24,13 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.runner.connection; +package org.opensearch.sql.correctness.runner.connection; import static java.util.stream.Collectors.joining; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.DBResult; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.Row; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.google.common.base.Strings; import java.sql.Connection; import java.sql.DriverManager; @@ -42,6 +39,9 @@ import java.util.List; import java.util.Properties; import org.json.JSONObject; +import org.opensearch.sql.correctness.runner.resultset.DBResult; +import org.opensearch.sql.correctness.runner.resultset.Row; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Database connection by JDBC driver. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/connection/OpenSearchConnection.java b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/connection/OpenSearchConnection.java similarity index 96% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/connection/OpenSearchConnection.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/runner/connection/OpenSearchConnection.java index ead995d745..a83858c43d 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/connection/OpenSearchConnection.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/connection/OpenSearchConnection.java @@ -24,9 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.runner.connection; +package org.opensearch.sql.correctness.runner.connection; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.DBResult; import java.io.IOException; import java.util.List; import java.util.Properties; @@ -34,6 +33,7 @@ import org.opensearch.client.Request; import org.opensearch.client.Response; import org.opensearch.client.RestClient; +import org.opensearch.sql.correctness.runner.resultset.DBResult; /** * OpenSearch database connection for insertion. This class wraps JDBCConnection to delegate query method. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/resultset/DBResult.java b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/resultset/DBResult.java similarity index 97% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/resultset/DBResult.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/runner/resultset/DBResult.java index 38eb1b0616..f43cfaaadc 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/resultset/DBResult.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/resultset/DBResult.java @@ -24,9 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset; +package org.opensearch.sql.correctness.runner.resultset; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.google.common.collect.HashMultiset; import com.google.common.collect.ImmutableSet; import java.util.ArrayList; @@ -38,6 +37,7 @@ import lombok.Getter; import lombok.ToString; import org.json.JSONPropertyName; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Query result for equality comparison. Based on different type of query, such as query with/without ORDER BY and diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/resultset/Row.java b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/resultset/Row.java similarity index 97% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/resultset/Row.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/runner/resultset/Row.java index e243654eee..46218dd061 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/resultset/Row.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/resultset/Row.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset; +package org.opensearch.sql.correctness.runner.resultset; import java.math.BigDecimal; import java.math.RoundingMode; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/resultset/Type.java b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/resultset/Type.java similarity index 93% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/resultset/Type.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/runner/resultset/Type.java index dca115003a..94966f78d7 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/runner/resultset/Type.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/runner/resultset/Type.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset; +package org.opensearch.sql.correctness.runner.resultset; import lombok.Data; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/ComparisonTestTest.java b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/ComparisonTestTest.java similarity index 91% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/ComparisonTestTest.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/tests/ComparisonTestTest.java index 7e9d66347f..98c2b6031a 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/ComparisonTestTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/ComparisonTestTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.tests; +package org.opensearch.sql.correctness.tests; import static java.util.Arrays.asList; import static org.junit.Assert.assertEquals; @@ -32,22 +32,22 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.ErrorTestCase; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.FailedTestCase; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.SuccessTestCase; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.TestReport; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.ComparisonTest; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.connection.DBConnection; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.DBResult; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.Row; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.Type; -import com.amazon.opendistroforelasticsearch.sql.correctness.testset.TestQuerySet; import java.util.Collections; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; +import org.opensearch.sql.correctness.report.ErrorTestCase; +import org.opensearch.sql.correctness.report.FailedTestCase; +import org.opensearch.sql.correctness.report.SuccessTestCase; +import org.opensearch.sql.correctness.report.TestReport; +import org.opensearch.sql.correctness.runner.ComparisonTest; +import org.opensearch.sql.correctness.runner.connection.DBConnection; +import org.opensearch.sql.correctness.runner.resultset.DBResult; +import org.opensearch.sql.correctness.runner.resultset.Row; +import org.opensearch.sql.correctness.runner.resultset.Type; +import org.opensearch.sql.correctness.testset.TestQuerySet; /** * Tests for {@link ComparisonTest} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/DBResultTest.java b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/DBResultTest.java similarity index 94% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/DBResultTest.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/tests/DBResultTest.java index 0d93439639..4ebbb09b9c 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/DBResultTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/DBResultTest.java @@ -24,20 +24,20 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.tests; +package org.opensearch.sql.correctness.tests; import static java.util.Collections.emptyList; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.DBResult; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.Row; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.Type; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import java.util.Arrays; import org.junit.Test; +import org.opensearch.sql.correctness.runner.resultset.DBResult; +import org.opensearch.sql.correctness.runner.resultset.Row; +import org.opensearch.sql.correctness.runner.resultset.Type; /** * Unit tests for {@link DBResult} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/JDBCConnectionTest.java b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/JDBCConnectionTest.java similarity index 96% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/JDBCConnectionTest.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/tests/JDBCConnectionTest.java index c7b1dce684..3b6143e2c6 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/JDBCConnectionTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/JDBCConnectionTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.tests; +package org.opensearch.sql.correctness.tests; import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.anyInt; @@ -34,9 +34,6 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.connection.JDBCConnection; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.DBResult; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.Type; import com.google.common.collect.HashMultiset; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -55,6 +52,9 @@ import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import org.mockito.stubbing.OngoingStubbing; +import org.opensearch.sql.correctness.runner.connection.JDBCConnection; +import org.opensearch.sql.correctness.runner.resultset.DBResult; +import org.opensearch.sql.correctness.runner.resultset.Type; /** * Tests for {@link JDBCConnection} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/OpenSearchConnectionTest.java b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/OpenSearchConnectionTest.java similarity index 96% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/OpenSearchConnectionTest.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/tests/OpenSearchConnectionTest.java index af4a69f8d4..1288c1b3cd 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/OpenSearchConnectionTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/OpenSearchConnectionTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.tests; +package org.opensearch.sql.correctness.tests; import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.any; @@ -32,7 +32,6 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.connection.OpenSearchConnection; import com.google.common.io.CharStreams; import java.io.IOException; import java.io.InputStream; @@ -49,6 +48,7 @@ import org.opensearch.client.Request; import org.opensearch.client.Response; import org.opensearch.client.RestClient; +import org.opensearch.sql.correctness.runner.connection.OpenSearchConnection; /** * Tests for {@link OpenSearchConnection} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/RowTest.java b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/RowTest.java similarity index 92% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/RowTest.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/tests/RowTest.java index ddc92f8495..c6735c26ed 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/RowTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/RowTest.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.tests; +package org.opensearch.sql.correctness.tests; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.Row; import org.junit.Test; +import org.opensearch.sql.correctness.runner.resultset.Row; /** * Unit test {@link Row} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/TestConfigTest.java b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/TestConfigTest.java similarity index 94% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/TestConfigTest.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/tests/TestConfigTest.java index 7f0a619c49..fa25adbd69 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/TestConfigTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/TestConfigTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.tests; +package org.opensearch.sql.correctness.tests; import static java.util.Collections.emptyMap; import static org.hamcrest.Matchers.allOf; @@ -33,10 +33,10 @@ import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; -import com.amazon.opendistroforelasticsearch.sql.correctness.TestConfig; import com.google.common.collect.ImmutableMap; import java.util.Map; import org.junit.Test; +import org.opensearch.sql.correctness.TestConfig; /** * Tests for {@link TestConfig} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/TestDataSetTest.java b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/TestDataSetTest.java similarity index 96% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/TestDataSetTest.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/tests/TestDataSetTest.java index e3c2952f9c..00e3b1bd59 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/TestDataSetTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/TestDataSetTest.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.tests; +package org.opensearch.sql.correctness.tests; import static org.hamcrest.Matchers.contains; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; -import com.amazon.opendistroforelasticsearch.sql.correctness.testset.TestDataSet; import org.junit.Test; +import org.opensearch.sql.correctness.testset.TestDataSet; /** * Tests for {@link TestDataSet} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/TestQuerySetTest.java b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/TestQuerySetTest.java similarity index 90% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/TestQuerySetTest.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/tests/TestQuerySetTest.java index 832ef017a0..df5f2476ba 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/TestQuerySetTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/TestQuerySetTest.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.tests; +package org.opensearch.sql.correctness.tests; import static org.hamcrest.Matchers.contains; import static org.junit.Assert.assertThat; -import com.amazon.opendistroforelasticsearch.sql.correctness.testset.TestQuerySet; import org.junit.Test; +import org.opensearch.sql.correctness.testset.TestQuerySet; /** * Tests for {@link TestQuerySet} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/TestReportTest.java b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/TestReportTest.java similarity index 88% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/TestReportTest.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/tests/TestReportTest.java index 90bdb32bdb..bebcb8c712 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/TestReportTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/TestReportTest.java @@ -24,21 +24,21 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.tests; +package org.opensearch.sql.correctness.tests; import static java.util.Arrays.asList; import static java.util.Collections.singleton; import static org.junit.Assert.fail; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.ErrorTestCase; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.FailedTestCase; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.SuccessTestCase; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.TestReport; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.DBResult; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.Row; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.resultset.Type; import org.json.JSONObject; import org.junit.Test; +import org.opensearch.sql.correctness.report.ErrorTestCase; +import org.opensearch.sql.correctness.report.FailedTestCase; +import org.opensearch.sql.correctness.report.SuccessTestCase; +import org.opensearch.sql.correctness.report.TestReport; +import org.opensearch.sql.correctness.runner.resultset.DBResult; +import org.opensearch.sql.correctness.runner.resultset.Row; +import org.opensearch.sql.correctness.runner.resultset.Type; /** * Test for {@link TestReport} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/UnitTests.java b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/UnitTests.java similarity index 94% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/UnitTests.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/tests/UnitTests.java index fd116f4f4b..b9995c9430 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/tests/UnitTests.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/tests/UnitTests.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.tests; +package org.opensearch.sql.correctness.tests; import org.junit.runner.RunWith; import org.junit.runners.Suite; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/testset/TestDataSet.java b/integ-test/src/test/java/org/opensearch/sql/correctness/testset/TestDataSet.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/testset/TestDataSet.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/testset/TestDataSet.java index b4046095ad..53fbd239c1 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/testset/TestDataSet.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/testset/TestDataSet.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.testset; +package org.opensearch.sql.correctness.testset; -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils.unquoteSingleField; import static java.util.stream.Collectors.joining; +import static org.opensearch.sql.legacy.utils.StringUtils.unquoteSingleField; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.json.JSONObject; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Test data set diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/testset/TestQuerySet.java b/integ-test/src/test/java/org/opensearch/sql/correctness/testset/TestQuerySet.java similarity index 96% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/testset/TestQuerySet.java rename to integ-test/src/test/java/org/opensearch/sql/correctness/testset/TestQuerySet.java index 4497f61745..a874a01957 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/correctness/testset/TestQuerySet.java +++ b/integ-test/src/test/java/org/opensearch/sql/correctness/testset/TestQuerySet.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.correctness.testset; +package org.opensearch.sql.correctness.testset; import static java.util.stream.Collectors.joining; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/admin/MonitoringIT.java b/integ-test/src/test/java/org/opensearch/sql/doctest/admin/MonitoringIT.java similarity index 57% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/admin/MonitoringIT.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/admin/MonitoringIT.java index 7c952d78e3..a6d3741058 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/admin/MonitoringIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/admin/MonitoringIT.java @@ -24,28 +24,28 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.admin; +package org.opensearch.sql.doctest.admin; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.CURL_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName.DEFAULT_CURSOR_REQUEST_COUNT_TOTAL; -import static com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName.DEFAULT_CURSOR_REQUEST_TOTAL; -import static com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName.FAILED_REQ_COUNT_CB; -import static com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName.FAILED_REQ_COUNT_CUS; -import static com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName.FAILED_REQ_COUNT_SYS; -import static com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName.REQ_COUNT_TOTAL; -import static com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName.REQ_TOTAL; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlStatsAction.STATS_API_ENDPOINT; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.CURL_REQUEST; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; +import static org.opensearch.sql.legacy.metrics.MetricName.DEFAULT_CURSOR_REQUEST_COUNT_TOTAL; +import static org.opensearch.sql.legacy.metrics.MetricName.DEFAULT_CURSOR_REQUEST_TOTAL; +import static org.opensearch.sql.legacy.metrics.MetricName.FAILED_REQ_COUNT_CB; +import static org.opensearch.sql.legacy.metrics.MetricName.FAILED_REQ_COUNT_CUS; +import static org.opensearch.sql.legacy.metrics.MetricName.FAILED_REQ_COUNT_SYS; +import static org.opensearch.sql.legacy.metrics.MetricName.REQ_COUNT_TOTAL; +import static org.opensearch.sql.legacy.metrics.MetricName.REQ_TOTAL; +import static org.opensearch.sql.legacy.plugin.RestSqlStatsAction.STATS_API_ENDPOINT; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.DocTest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.DocTestConfig; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.Section; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.builder.Requests; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.response.DataTable; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; +import org.opensearch.sql.doctest.core.DocTest; +import org.opensearch.sql.doctest.core.annotation.DocTestConfig; +import org.opensearch.sql.doctest.core.annotation.Section; +import org.opensearch.sql.doctest.core.builder.Requests; +import org.opensearch.sql.doctest.core.request.SqlRequest; +import org.opensearch.sql.doctest.core.response.DataTable; +import org.opensearch.sql.legacy.metrics.MetricName; /** * Doc test for plugin monitoring functionality diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/admin/PluginSettingIT.java b/integ-test/src/test/java/org/opensearch/sql/doctest/admin/PluginSettingIT.java similarity index 76% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/admin/PluginSettingIT.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/admin/PluginSettingIT.java index bb860bcf44..45e3e0fe3b 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/admin/PluginSettingIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/admin/PluginSettingIT.java @@ -24,41 +24,41 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.admin; - -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.CURL_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.CURSOR_ENABLED; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.CURSOR_FETCH_SIZE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.CURSOR_KEEPALIVE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_ENABLED; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_SEMANTIC_SUGGESTION; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_SEMANTIC_THRESHOLD; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_RESPONSE_FORMAT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_SLOWLOG; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.SQL_ENABLED; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.SQL_NEW_ENGINE_ENABLED; +package org.opensearch.sql.doctest.admin; + import static org.opensearch.common.settings.Setting.Property; import static org.opensearch.common.settings.Setting.Property.Dynamic; import static org.opensearch.common.settings.Setting.Property.Final; import static org.opensearch.common.settings.Setting.Property.IndexScope; import static org.opensearch.common.settings.Setting.Property.NodeScope; import static org.opensearch.common.settings.Settings.EMPTY; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.CURL_REQUEST; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; +import static org.opensearch.sql.legacy.plugin.SqlSettings.CURSOR_ENABLED; +import static org.opensearch.sql.legacy.plugin.SqlSettings.CURSOR_FETCH_SIZE; +import static org.opensearch.sql.legacy.plugin.SqlSettings.CURSOR_KEEPALIVE; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_ENABLED; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_SEMANTIC_SUGGESTION; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_SEMANTIC_THRESHOLD; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_RESPONSE_FORMAT; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_SLOWLOG; +import static org.opensearch.sql.legacy.plugin.SqlSettings.SQL_ENABLED; +import static org.opensearch.sql.legacy.plugin.SqlSettings.SQL_NEW_ENGINE_ENABLED; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.DocTest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.DocTestConfig; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.Section; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.builder.Example; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.builder.ListItems; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.Format; -import com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import java.util.Arrays; import java.util.EnumSet; import java.util.stream.Collectors; import org.opensearch.common.settings.Setting; +import org.opensearch.sql.doctest.core.DocTest; +import org.opensearch.sql.doctest.core.annotation.DocTestConfig; +import org.opensearch.sql.doctest.core.annotation.Section; +import org.opensearch.sql.doctest.core.builder.Example; +import org.opensearch.sql.doctest.core.builder.ListItems; +import org.opensearch.sql.legacy.executor.Format; +import org.opensearch.sql.legacy.plugin.SqlSettings; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Doc test for plugin settings. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/beyond/FullTextIT.java b/integ-test/src/test/java/org/opensearch/sql/doctest/beyond/FullTextIT.java similarity index 94% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/beyond/FullTextIT.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/beyond/FullTextIT.java index cd23a92b5f..89a3850f28 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/beyond/FullTextIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/beyond/FullTextIT.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.beyond; +package org.opensearch.sql.doctest.beyond; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.DocTest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.DocTestConfig; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.Section; +import org.opensearch.sql.doctest.core.DocTest; +import org.opensearch.sql.doctest.core.annotation.DocTestConfig; +import org.opensearch.sql.doctest.core.annotation.Section; @DocTestConfig(template = "beyond/fulltext.rst", testData = {"accounts.json"}) public class FullTextIT extends DocTest { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/beyond/PartiQLIT.java b/integ-test/src/test/java/org/opensearch/sql/doctest/beyond/PartiQLIT.java similarity index 90% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/beyond/PartiQLIT.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/beyond/PartiQLIT.java index ba74d1ff22..4e3c1f9e97 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/beyond/PartiQLIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/beyond/PartiQLIT.java @@ -24,16 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.beyond; +package org.opensearch.sql.doctest.beyond; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.TestData.TEST_DATA_FOLDER_ROOT; -import static com.amazon.opendistroforelasticsearch.sql.util.TestUtils.getResourceFilePath; +import static org.opensearch.sql.doctest.core.TestData.TEST_DATA_FOLDER_ROOT; +import static org.opensearch.sql.util.TestUtils.getResourceFilePath; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.DocTest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.DocTestConfig; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.Section; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.builder.Example; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.JsonPrettyFormatter; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @@ -41,6 +36,11 @@ import java.util.List; import java.util.stream.Collectors; import java.util.stream.IntStream; +import org.opensearch.sql.doctest.core.DocTest; +import org.opensearch.sql.doctest.core.annotation.DocTestConfig; +import org.opensearch.sql.doctest.core.annotation.Section; +import org.opensearch.sql.doctest.core.builder.Example; +import org.opensearch.sql.legacy.utils.JsonPrettyFormatter; @DocTestConfig(template = "beyond/partiql.rst", testData = {"employees_nested.json"}) public class PartiQLIT extends DocTest { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/DocTest.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/DocTest.java similarity index 89% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/DocTest.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/DocTest.java index 56aaf43eaa..3401067153 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/DocTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/DocTest.java @@ -24,19 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core; +package org.opensearch.sql.doctest.core; import static com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope.Scope; import static java.nio.file.StandardOpenOption.APPEND; import static org.opensearch.test.OpenSearchIntegTestCase.Scope.SUITE; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.DocTestConfig; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.Section; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.builder.DocBuilder; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.markup.Document; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.markup.RstDocument; -import com.amazon.opendistroforelasticsearch.sql.legacy.CustomExternalTestCluster; -import com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils; import com.carrotsearch.randomizedtesting.AnnotatedMethodProvider; import com.carrotsearch.randomizedtesting.TestMethodAndParams; import com.carrotsearch.randomizedtesting.annotations.TestCaseOrdering; @@ -54,6 +47,13 @@ import org.opensearch.client.RestClient; import org.opensearch.common.Strings; import org.opensearch.common.transport.TransportAddress; +import org.opensearch.sql.doctest.core.annotation.DocTestConfig; +import org.opensearch.sql.doctest.core.annotation.Section; +import org.opensearch.sql.doctest.core.builder.DocBuilder; +import org.opensearch.sql.doctest.core.markup.Document; +import org.opensearch.sql.doctest.core.markup.RstDocument; +import org.opensearch.sql.legacy.CustomExternalTestCluster; +import org.opensearch.sql.legacy.TestUtils; import org.opensearch.test.OpenSearchIntegTestCase; import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; import org.opensearch.test.TestCluster; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/Template.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/Template.java similarity index 91% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/Template.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/Template.java index 9252015b0a..9ac22993b1 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/Template.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/Template.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core; +package org.opensearch.sql.doctest.core; import static java.nio.file.StandardCopyOption.COPY_ATTRIBUTES; import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; -import com.amazon.opendistroforelasticsearch.sql.util.TestUtils; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import org.opensearch.sql.legacy.utils.StringUtils; +import org.opensearch.sql.util.TestUtils; /** * Abstraction for document template file diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/TestData.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/TestData.java similarity index 86% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/TestData.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/TestData.java index b7f2191b64..1efc4d1ab6 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/TestData.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/TestData.java @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core; +package org.opensearch.sql.doctest.core; -import static com.amazon.opendistroforelasticsearch.sql.util.TestUtils.createIndexByRestClient; -import static com.amazon.opendistroforelasticsearch.sql.util.TestUtils.getResourceFilePath; -import static com.amazon.opendistroforelasticsearch.sql.util.TestUtils.loadDataByRestClient; +import static org.opensearch.sql.util.TestUtils.createIndexByRestClient; +import static org.opensearch.sql.util.TestUtils.getResourceFilePath; +import static org.opensearch.sql.util.TestUtils.loadDataByRestClient; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Test data for document generation diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/annotation/DocTestConfig.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/annotation/DocTestConfig.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/annotation/DocTestConfig.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/annotation/DocTestConfig.java index 1f7546dc17..5629069dcc 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/annotation/DocTestConfig.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/annotation/DocTestConfig.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation; +package org.opensearch.sql.doctest.core.annotation; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/annotation/Section.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/annotation/Section.java similarity index 94% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/annotation/Section.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/annotation/Section.java index 8a556d435c..0f6d5bc49d 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/annotation/Section.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/annotation/Section.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation; +package org.opensearch.sql.doctest.core.annotation; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/Body.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/Body.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/Body.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/Body.java index 589a6f14a7..e4b42feb57 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/Body.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/Body.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.builder; +package org.opensearch.sql.doctest.core.builder; import java.util.Arrays; import java.util.stream.Collectors; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/DocBuilder.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/DocBuilder.java similarity index 84% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/DocBuilder.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/DocBuilder.java index 14edcddced..4ffc5788da 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/DocBuilder.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/DocBuilder.java @@ -24,25 +24,25 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.builder; - -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequest.UrlParam; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.TABLE_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.EXPLAIN_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlSettingsAction.SETTINGS_API_ENDPOINT; - -import com.amazon.opendistroforelasticsearch.sql.doctest.core.markup.Document; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; +package org.opensearch.sql.doctest.core.builder; + +import static org.opensearch.sql.doctest.core.request.SqlRequest.UrlParam; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.TABLE_RESPONSE; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.EXPLAIN_API_ENDPOINT; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; +import static org.opensearch.sql.legacy.plugin.RestSqlSettingsAction.SETTINGS_API_ENDPOINT; + import com.google.common.base.Strings; import java.util.Arrays; import org.opensearch.client.RestClient; +import org.opensearch.sql.doctest.core.markup.Document; +import org.opensearch.sql.doctest.core.request.SqlRequest; +import org.opensearch.sql.doctest.core.request.SqlRequestFormat; +import org.opensearch.sql.doctest.core.response.SqlResponseFormat; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Build document by custom DSL. To make it more readable, each doc test needs to implement this interface diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/Example.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/Example.java similarity index 97% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/Example.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/Example.java index 4ca9c7a5ba..fd3446dbed 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/Example.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/Example.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.builder; +package org.opensearch.sql.doctest.core.builder; /** * Example value object. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/Formats.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/Formats.java similarity index 70% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/Formats.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/Formats.java index 1c977fc5fe..214e3054ab 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/Formats.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/Formats.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.builder; +package org.opensearch.sql.doctest.core.builder; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.TABLE_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.TABLE_UNSORTED_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.TABLE_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.TABLE_UNSORTED_RESPONSE; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponse; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat; +import org.opensearch.sql.doctest.core.request.SqlRequest; +import org.opensearch.sql.doctest.core.request.SqlRequestFormat; +import org.opensearch.sql.doctest.core.response.SqlResponse; +import org.opensearch.sql.doctest.core.response.SqlResponseFormat; /** * Request and response format tuple. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/ListItems.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/ListItems.java similarity index 89% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/ListItems.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/ListItems.java index 2d768762a7..6dab65c154 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/ListItems.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/ListItems.java @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.builder; +package org.opensearch.sql.doctest.core.builder; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Item list diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/Requests.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/Requests.java similarity index 88% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/Requests.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/Requests.java index 3a0b3d792f..6b466623da 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/builder/Requests.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/builder/Requests.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.builder; +package org.opensearch.sql.doctest.core.builder; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponse; import java.util.Objects; import org.opensearch.client.RestClient; +import org.opensearch.sql.doctest.core.request.SqlRequest; +import org.opensearch.sql.doctest.core.response.SqlResponse; /** * Query and explain request tuple. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/markup/Document.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/markup/Document.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/markup/Document.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/markup/Document.java index 4d348f114c..2ba76f0ded 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/markup/Document.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/markup/Document.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.markup; +package org.opensearch.sql.doctest.core.markup; import java.io.Closeable; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/markup/RstDocument.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/markup/RstDocument.java similarity index 97% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/markup/RstDocument.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/markup/RstDocument.java index 5f4ca2f6e5..edf5163574 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/markup/RstDocument.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/markup/RstDocument.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.markup; +package org.opensearch.sql.doctest.core.markup; import com.google.common.base.Strings; import java.io.PrintWriter; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/request/SqlRequest.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/request/SqlRequest.java similarity index 90% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/request/SqlRequest.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/request/SqlRequest.java index 8348541d69..6531983c2c 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/request/SqlRequest.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/request/SqlRequest.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.request; +package org.opensearch.sql.doctest.core.request; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponse; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import java.io.IOException; import org.opensearch.client.Request; import org.opensearch.client.RequestOptions; import org.opensearch.client.ResponseException; import org.opensearch.client.RestClient; +import org.opensearch.sql.doctest.core.response.SqlResponse; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Request to SQL plugin to isolate OpenSearch native request diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/request/SqlRequestFormat.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/request/SqlRequestFormat.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/request/SqlRequestFormat.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/request/SqlRequestFormat.java index 3137e0dc1e..c3728eb30e 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/request/SqlRequestFormat.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/request/SqlRequestFormat.java @@ -24,12 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.request; +package org.opensearch.sql.doctest.core.request; import static java.util.stream.Collectors.joining; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.JsonPrettyFormatter; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.google.common.base.Charsets; import com.google.common.io.CharStreams; import java.io.IOException; @@ -41,6 +39,8 @@ import org.apache.http.Header; import org.json.JSONObject; import org.opensearch.client.Request; +import org.opensearch.sql.legacy.utils.JsonPrettyFormatter; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Different SQL request formats. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/response/DataTable.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/response/DataTable.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/response/DataTable.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/response/DataTable.java index 1c9eb1c786..ab94c38a87 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/response/DataTable.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/response/DataTable.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.response; +package org.opensearch.sql.doctest.core.response; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.google.common.base.Strings; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Data table that represent rows of data with a header. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/response/SqlResponse.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/response/SqlResponse.java similarity index 94% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/response/SqlResponse.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/response/SqlResponse.java index 50c811b076..b730d89661 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/response/SqlResponse.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/response/SqlResponse.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.response; +package org.opensearch.sql.doctest.core.response; -import com.amazon.opendistroforelasticsearch.sql.util.TestUtils; import java.io.IOException; import org.json.JSONException; import org.json.JSONObject; import org.opensearch.client.Response; +import org.opensearch.sql.util.TestUtils; /** * Response from SQL plugin diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/response/SqlResponseFormat.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/response/SqlResponseFormat.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/response/SqlResponseFormat.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/response/SqlResponseFormat.java index 08fffec396..f534bb232d 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/response/SqlResponseFormat.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/response/SqlResponseFormat.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.response; +package org.opensearch.sql.doctest.core.response; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.JsonPrettyFormatter; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONObject; +import org.opensearch.sql.legacy.utils.JsonPrettyFormatter; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Different SQL response formats diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/DataTableTest.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/DataTableTest.java similarity index 93% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/DataTableTest.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/test/DataTableTest.java index 91af92b677..83216c5bb5 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/DataTableTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/DataTableTest.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.test; +package org.opensearch.sql.doctest.core.test; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.response.DataTable; import org.junit.Test; +import org.opensearch.sql.doctest.core.response.DataTable; /** * Test cases for {@link DataTable} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/DocBuilderTest.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/DocBuilderTest.java similarity index 96% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/DocBuilderTest.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/test/DocBuilderTest.java index f4b44de420..a7181d40b7 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/DocBuilderTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/DocBuilderTest.java @@ -24,15 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.test; +package org.opensearch.sql.doctest.core.test; import static org.mockito.Matchers.any; import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.builder.DocBuilder; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.markup.Document; import java.io.ByteArrayInputStream; import java.io.IOException; import org.apache.http.HttpEntity; @@ -46,6 +44,8 @@ import org.mockito.stubbing.Answer; import org.opensearch.client.Response; import org.opensearch.client.RestClient; +import org.opensearch.sql.doctest.core.builder.DocBuilder; +import org.opensearch.sql.doctest.core.markup.Document; /** * Test cases for {@link DocBuilder} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/DocTestTests.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/DocTestTests.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/DocTestTests.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/test/DocTestTests.java index b27d1b01b3..71e0a170a4 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/DocTestTests.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/DocTestTests.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.test; +package org.opensearch.sql.doctest.core.test; import org.junit.runner.RunWith; import org.junit.runners.Suite; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/RstDocumentTest.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/RstDocumentTest.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/RstDocumentTest.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/test/RstDocumentTest.java index d9928f3f45..d9fd832339 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/RstDocumentTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/RstDocumentTest.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.test; +package org.opensearch.sql.doctest.core.test; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.markup.RstDocument; import java.io.ByteArrayOutputStream; import java.io.PrintWriter; import org.junit.Before; import org.junit.Test; +import org.opensearch.sql.doctest.core.markup.RstDocument; /** * Test cases for {@link RstDocument} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/SqlRequestFormatTest.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/SqlRequestFormatTest.java similarity index 77% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/SqlRequestFormatTest.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/test/SqlRequestFormatTest.java index 97524f30f0..944a2ee5b1 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/SqlRequestFormatTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/SqlRequestFormatTest.java @@ -24,20 +24,20 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.test; +package org.opensearch.sql.doctest.core.test; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.CURL_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; import static org.hamcrest.Matchers.emptyString; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.CURL_REQUEST; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequest.UrlParam; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat; import org.junit.Test; +import org.opensearch.sql.doctest.core.request.SqlRequest; +import org.opensearch.sql.doctest.core.request.SqlRequest.UrlParam; +import org.opensearch.sql.doctest.core.request.SqlRequestFormat; /** * Test cases for {@link SqlRequestFormat} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/SqlRequestTest.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/SqlRequestTest.java similarity index 88% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/SqlRequestTest.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/test/SqlRequestTest.java index bb0e2fdb13..ba32f30022 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/SqlRequestTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/SqlRequestTest.java @@ -24,17 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.test; +package org.opensearch.sql.doctest.core.test; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; import static org.hamcrest.Matchers.hasEntry; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequest.UrlParam; import com.google.common.base.Charsets; import com.google.common.io.CharStreams; import java.io.IOException; @@ -44,6 +42,8 @@ import org.mockito.ArgumentCaptor; import org.opensearch.client.Request; import org.opensearch.client.RestClient; +import org.opensearch.sql.doctest.core.request.SqlRequest; +import org.opensearch.sql.doctest.core.request.SqlRequest.UrlParam; /** * Test cases for {@link SqlRequest} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/SqlResponseFormatTest.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/SqlResponseFormatTest.java similarity index 86% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/SqlResponseFormatTest.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/test/SqlResponseFormatTest.java index 4d5c247fc0..d08dcd0678 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/SqlResponseFormatTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/SqlResponseFormatTest.java @@ -24,27 +24,27 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.test; +package org.opensearch.sql.doctest.core.test; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.ORIGINAL_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.TABLE_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.TABLE_UNSORTED_RESPONSE; import static org.hamcrest.Matchers.emptyString; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.ORIGINAL_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.TABLE_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.TABLE_UNSORTED_RESPONSE; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponse; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat; import java.io.ByteArrayInputStream; import java.io.IOException; import org.apache.http.HttpEntity; import org.junit.Before; import org.junit.Test; import org.opensearch.client.Response; +import org.opensearch.sql.doctest.core.response.SqlResponse; +import org.opensearch.sql.doctest.core.response.SqlResponseFormat; /** * Test cases for {@link SqlResponseFormat} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/SqlResponseTest.java b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/SqlResponseTest.java similarity index 92% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/SqlResponseTest.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/core/test/SqlResponseTest.java index 88bdce9b58..77e2ff6336 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/core/test/SqlResponseTest.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/core/test/SqlResponseTest.java @@ -24,19 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.core.test; +package org.opensearch.sql.doctest.core.test; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponse; import java.io.ByteArrayInputStream; import java.io.IOException; import org.apache.http.HttpEntity; import org.junit.Test; import org.opensearch.client.Response; +import org.opensearch.sql.doctest.core.response.SqlResponse; /** * Test cases for {@link SqlResponse} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dml/DeleteIT.java b/integ-test/src/test/java/org/opensearch/sql/doctest/dml/DeleteIT.java similarity index 73% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dml/DeleteIT.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/dml/DeleteIT.java index df40e2db64..2fcd4da068 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dml/DeleteIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/dml/DeleteIT.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.dml; +package org.opensearch.sql.doctest.dml; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.DocTest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.DocTestConfig; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.Section; +import org.opensearch.sql.doctest.core.DocTest; +import org.opensearch.sql.doctest.core.annotation.DocTestConfig; +import org.opensearch.sql.doctest.core.annotation.Section; @DocTestConfig(template = "dml/delete.rst", testData = {"accounts.json"}) public class DeleteIT extends DocTest { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dql/BasicQueryIT.java b/integ-test/src/test/java/org/opensearch/sql/doctest/dql/BasicQueryIT.java similarity index 92% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dql/BasicQueryIT.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/dql/BasicQueryIT.java index 4d393551eb..5d8c28509d 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dql/BasicQueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/dql/BasicQueryIT.java @@ -24,19 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.dql; +package org.opensearch.sql.doctest.dql; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.TABLE_UNSORTED_RESPONSE; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.TABLE_UNSORTED_RESPONSE; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.DocTest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.DocTestConfig; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.Section; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.builder.Example; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.builder.Requests; +import org.opensearch.sql.doctest.core.DocTest; +import org.opensearch.sql.doctest.core.annotation.DocTestConfig; +import org.opensearch.sql.doctest.core.annotation.Section; +import org.opensearch.sql.doctest.core.builder.Example; +import org.opensearch.sql.doctest.core.builder.Requests; /** * Doc test for basic SELECT query. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dql/ComplexQueryIT.java b/integ-test/src/test/java/org/opensearch/sql/doctest/dql/ComplexQueryIT.java similarity index 89% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dql/ComplexQueryIT.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/dql/ComplexQueryIT.java index 089d380786..b766ecbfcb 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dql/ComplexQueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/dql/ComplexQueryIT.java @@ -24,19 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.dql; +package org.opensearch.sql.doctest.dql; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.TABLE_RESPONSE; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.TABLE_RESPONSE; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.DocTest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.DocTestConfig; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.Section; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.builder.Example; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.builder.Requests; import org.junit.Ignore; +import org.opensearch.sql.doctest.core.DocTest; +import org.opensearch.sql.doctest.core.annotation.DocTestConfig; +import org.opensearch.sql.doctest.core.annotation.Section; +import org.opensearch.sql.doctest.core.builder.Example; +import org.opensearch.sql.doctest.core.builder.Requests; @DocTestConfig(template = "dql/complex.rst", testData = {"accounts.json", "employees_nested.json"}) public class ComplexQueryIT extends DocTest { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dql/MetaDataQueryIT.java b/integ-test/src/test/java/org/opensearch/sql/doctest/dql/MetaDataQueryIT.java similarity index 74% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dql/MetaDataQueryIT.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/dql/MetaDataQueryIT.java index b52aca1049..f263d657d3 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dql/MetaDataQueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/dql/MetaDataQueryIT.java @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.dql; +package org.opensearch.sql.doctest.dql; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.TABLE_RESPONSE; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.OPENSEARCH_DASHBOARD_REQUEST; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.TABLE_RESPONSE; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.DocTest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.DocTestConfig; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.Section; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.builder.Example; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.builder.Requests; +import org.opensearch.sql.doctest.core.DocTest; +import org.opensearch.sql.doctest.core.annotation.DocTestConfig; +import org.opensearch.sql.doctest.core.annotation.Section; +import org.opensearch.sql.doctest.core.builder.Example; +import org.opensearch.sql.doctest.core.builder.Requests; @DocTestConfig(template = "dql/metadata.rst", testData = {"accounts.json", "employees_nested.json"}) public class MetaDataQueryIT extends DocTest { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dql/SQLFunctionsIT.java b/integ-test/src/test/java/org/opensearch/sql/doctest/dql/SQLFunctionsIT.java similarity index 75% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dql/SQLFunctionsIT.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/dql/SQLFunctionsIT.java index 3aca602594..71df8a76ac 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/dql/SQLFunctionsIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/dql/SQLFunctionsIT.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.dql; +package org.opensearch.sql.doctest.dql; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.TypeExpression.TypeExpressionSpec; +import static org.opensearch.sql.legacy.antlr.semantic.types.TypeExpression.TypeExpressionSpec; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.DocTest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.DocTestConfig; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.Section; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.function.ScalarFunction; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; +import org.opensearch.sql.doctest.core.DocTest; +import org.opensearch.sql.doctest.core.annotation.DocTestConfig; +import org.opensearch.sql.doctest.core.annotation.Section; +import org.opensearch.sql.legacy.antlr.semantic.types.function.ScalarFunction; +import org.opensearch.sql.legacy.utils.StringUtils; @DocTestConfig(template = "dql/functions.rst") public class SQLFunctionsIT extends DocTest { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/interfaces/EndpointIT.java b/integ-test/src/test/java/org/opensearch/sql/doctest/interfaces/EndpointIT.java similarity index 79% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/interfaces/EndpointIT.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/interfaces/EndpointIT.java index 067bf18692..8ee8054843 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/interfaces/EndpointIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/interfaces/EndpointIT.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.interfaces; +package org.opensearch.sql.doctest.interfaces; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.CURL_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.CURL_REQUEST; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.DocTest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.DocTestConfig; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.Section; +import org.opensearch.sql.doctest.core.DocTest; +import org.opensearch.sql.doctest.core.annotation.DocTestConfig; +import org.opensearch.sql.doctest.core.annotation.Section; /** * Doc test for endpoints to access the plugin. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/interfaces/ProtocolIT.java b/integ-test/src/test/java/org/opensearch/sql/doctest/interfaces/ProtocolIT.java similarity index 85% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/interfaces/ProtocolIT.java rename to integ-test/src/test/java/org/opensearch/sql/doctest/interfaces/ProtocolIT.java index 144c555e81..9be5c4c982 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/doctest/interfaces/ProtocolIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/doctest/interfaces/ProtocolIT.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.doctest.interfaces; +package org.opensearch.sql.doctest.interfaces; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.CURL_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.ORIGINAL_RESPONSE; -import static com.amazon.opendistroforelasticsearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.CURL_REQUEST; +import static org.opensearch.sql.doctest.core.request.SqlRequestFormat.IGNORE_REQUEST; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.IGNORE_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.ORIGINAL_RESPONSE; +import static org.opensearch.sql.doctest.core.response.SqlResponseFormat.PRETTY_JSON_RESPONSE; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.DocTest; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.DocTestConfig; -import com.amazon.opendistroforelasticsearch.sql.doctest.core.annotation.Section; +import org.opensearch.sql.doctest.core.DocTest; +import org.opensearch.sql.doctest.core.annotation.DocTestConfig; +import org.opensearch.sql.doctest.core.annotation.Section; /** * Doc test for plugin supported protocols. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/AggregationExpressionIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/AggregationExpressionIT.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/AggregationExpressionIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/AggregationExpressionIT.java index 093323324e..8dd96b5ee6 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/AggregationExpressionIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/AggregationExpressionIT.java @@ -25,12 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; import org.json.JSONObject; import org.junit.Assume; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/AggregationIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/AggregationIT.java similarity index 98% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/AggregationIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/AggregationIT.java index f1b87a613e..94beb32128 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/AggregationIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/AggregationIT.java @@ -25,22 +25,22 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_GAME_OF_THRONES; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_TYPE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ONLINE; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRowsInOrder; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +package org.opensearch.sql.legacy; + import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.isEmptyString; import static org.hamcrest.Matchers.not; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_GAME_OF_THRONES; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_TYPE; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ONLINE; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRowsInOrder; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; import java.io.IOException; import java.util.Arrays; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/CsvFormatResponseIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/CsvFormatResponseIT.java similarity index 97% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/CsvFormatResponseIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/CsvFormatResponseIT.java index 60c107fe59..80fb0b145e 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/CsvFormatResponseIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/CsvFormatResponseIT.java @@ -25,15 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_CSV_SANITIZE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_GAME_OF_THRONES; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_TYPE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_WITH_QUOTES; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ONLINE; +package org.opensearch.sql.legacy; + import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; @@ -42,8 +35,14 @@ import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.not; import static org.hamcrest.core.StringStartsWith.startsWith; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_CSV_SANITIZE; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_GAME_OF_THRONES; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_TYPE; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_WITH_QUOTES; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ONLINE; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.csv.CSVResult; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -61,6 +60,7 @@ import org.opensearch.client.Request; import org.opensearch.client.RequestOptions; import org.opensearch.client.Response; +import org.opensearch.sql.legacy.executor.csv.CSVResult; /** * Tests to cover requests with "?format=csv" parameter diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/CursorIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/CursorIT.java similarity index 96% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/CursorIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/CursorIT.java index ca439aec42..7b2a1b2f36 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/CursorIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/CursorIT.java @@ -25,17 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getResponseBody; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DATE_TIME; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_SIMPLE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; +import static org.opensearch.sql.legacy.TestUtils.getResponseBody; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DATE_TIME; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_SIMPLE; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -46,6 +45,7 @@ import org.opensearch.client.Request; import org.opensearch.client.Response; import org.opensearch.client.ResponseException; +import org.opensearch.sql.legacy.utils.StringUtils; public class CursorIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/CustomExternalTestCluster.java b/integ-test/src/test/java/org/opensearch/sql/legacy/CustomExternalTestCluster.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/CustomExternalTestCluster.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/CustomExternalTestCluster.java index 54a13630c7..d28be5599c 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/CustomExternalTestCluster.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/CustomExternalTestCluster.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static org.opensearch.action.admin.cluster.node.info.NodesInfoRequest.Metric.HTTP; import static org.opensearch.action.admin.cluster.node.info.NodesInfoRequest.Metric.SETTINGS; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/DateFormatIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/DateFormatIT.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/DateFormatIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/DateFormatIT.java index d41e4b9b04..47e9f963c9 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/DateFormatIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/DateFormatIT.java @@ -25,16 +25,15 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.is; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; import com.google.common.collect.Ordering; import java.io.IOException; import java.util.List; @@ -50,6 +49,7 @@ import org.json.JSONObject; import org.junit.Ignore; import org.junit.Test; +import org.opensearch.sql.legacy.exception.SqlParseException; public class DateFormatIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/DateFunctionsIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/DateFunctionsIT.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/DateFunctionsIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/DateFunctionsIT.java index 760371eb44..a0a0f6a1f5 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/DateFunctionsIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/DateFunctionsIT.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/DeleteIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/DeleteIT.java similarity index 97% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/DeleteIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/DeleteIT.java index b8cbe077f4..f8aeb1127a 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/DeleteIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/DeleteIT.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static org.hamcrest.core.IsEqual.equalTo; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import java.io.IOException; import org.json.JSONObject; import org.junit.Test; +import org.opensearch.sql.legacy.utils.StringUtils; public class DeleteIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/ExplainIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/ExplainIT.java similarity index 93% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/ExplainIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/ExplainIT.java index fb46106a68..86c15d0693 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/ExplainIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/ExplainIT.java @@ -25,16 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_LOCATION; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_TYPE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_PEOPLE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_PHRASE; +package org.opensearch.sql.legacy; + import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_LOCATION; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_TYPE; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_PEOPLE; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_PHRASE; import com.google.common.io.Files; import java.io.File; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/GetEndpointQueryIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/GetEndpointQueryIT.java similarity index 91% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/GetEndpointQueryIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/GetEndpointQueryIT.java index ca4d74a15f..6e8559ba74 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/GetEndpointQueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/GetEndpointQueryIT.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; import java.io.IOException; import org.junit.Rule; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/HashJoinIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/HashJoinIT.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/HashJoinIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/HashJoinIT.java index 4a68b21d95..8bfe93106f 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/HashJoinIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/HashJoinIT.java @@ -25,11 +25,11 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_GAME_OF_THRONES; import static org.hamcrest.Matchers.equalTo; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_GAME_OF_THRONES; import java.io.IOException; import java.util.HashSet; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/HavingIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/HavingIT.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/HavingIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/HavingIT.java index f1ee8da258..24f1db0f2b 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/HavingIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/HavingIT.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.containsInAnyOrder; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/JSONRequestIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/JSONRequestIT.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/JSONRequestIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/JSONRequestIT.java index 3332949668..b32e42161b 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/JSONRequestIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/JSONRequestIT.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static org.hamcrest.CoreMatchers.anyOf; import static org.hamcrest.Matchers.equalTo; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/JdbcTestIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/JdbcTestIT.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/JdbcTestIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/JdbcTestIT.java index 75fdef4408..1708b7aca4 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/JdbcTestIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/JdbcTestIT.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/JoinAliasWriterRuleIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/JoinAliasWriterRuleIT.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/JoinAliasWriterRuleIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/JoinAliasWriterRuleIT.java index db9d0f470a..2c73dbc379 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/JoinAliasWriterRuleIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/JoinAliasWriterRuleIT.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static org.hamcrest.Matchers.equalTo; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/JoinIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/JoinIT.java similarity index 97% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/JoinIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/JoinIT.java index 3499726ba7..51474483cd 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/JoinIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/JoinIT.java @@ -25,19 +25,19 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DOG2; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_GAME_OF_THRONES; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_LOCATION; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_LOCATION2; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_PEOPLE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_PEOPLE2; +package org.opensearch.sql.legacy; + import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DOG2; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_GAME_OF_THRONES; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_LOCATION; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_LOCATION2; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_PEOPLE; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_PEOPLE2; import com.google.common.collect.ImmutableMap; import java.io.IOException; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MathFunctionsIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/MathFunctionsIT.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MathFunctionsIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/MathFunctionsIT.java index 49781f9baf..853d6e09b9 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MathFunctionsIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/MathFunctionsIT.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.containsString; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MetaDataQueriesIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/MetaDataQueriesIT.java similarity index 97% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MetaDataQueriesIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/MetaDataQueriesIT.java index 512f579a8a..0c2c1b4adc 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MetaDataQueriesIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/MetaDataQueriesIT.java @@ -25,16 +25,15 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_GAME_OF_THRONES; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySome; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.Matchers.not; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_GAME_OF_THRONES; +import static org.opensearch.sql.util.MatcherUtils.verifySome; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -46,6 +45,7 @@ import org.junit.Ignore; import org.junit.Test; import org.opensearch.client.Request; +import org.opensearch.sql.legacy.utils.StringUtils; /** diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MethodQueryIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/MethodQueryIT.java similarity index 98% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MethodQueryIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/MethodQueryIT.java index 113496f47c..42623006b5 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MethodQueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/MethodQueryIT.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static org.hamcrest.Matchers.both; import static org.hamcrest.Matchers.containsString; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MetricsIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/MetricsIT.java similarity index 88% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MetricsIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/MetricsIT.java index 87e4421dd1..49f41be3df 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MetricsIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/MetricsIT.java @@ -25,13 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlStatsAction.STATS_API_ENDPOINT; import static org.hamcrest.Matchers.equalTo; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; +import static org.opensearch.sql.legacy.plugin.RestSqlStatsAction.STATS_API_ENDPOINT; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; @@ -43,6 +42,7 @@ import org.junit.Test; import org.opensearch.client.Request; import org.opensearch.client.Response; +import org.opensearch.sql.legacy.metrics.MetricName; @Ignore public class MetricsIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MultiQueryIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/MultiQueryIT.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MultiQueryIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/MultiQueryIT.java index 8b9e201697..e585693788 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/MultiQueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/MultiQueryIT.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasItems; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/NestedFieldQueryIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/NestedFieldQueryIT.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/NestedFieldQueryIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/NestedFieldQueryIT.java index 82d8a30915..8918711fe0 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/NestedFieldQueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/NestedFieldQueryIT.java @@ -25,16 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.hitAll; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.kvString; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.arrayContainingInAnyOrder; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; +import static org.opensearch.sql.util.MatcherUtils.hitAll; +import static org.opensearch.sql.util.MatcherUtils.kvString; import java.io.IOException; import java.util.ArrayList; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/ObjectFieldSelectIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/ObjectFieldSelectIT.java similarity index 86% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/ObjectFieldSelectIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/ObjectFieldSelectIT.java index 369acc0601..b9e2b1003e 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/ObjectFieldSelectIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/ObjectFieldSelectIT.java @@ -25,19 +25,19 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DEEP_NESTED; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DEEP_NESTED; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import org.json.JSONArray; import org.json.JSONObject; import org.junit.Assume; import org.junit.Test; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Integration test for OpenSearch object field (and nested field). diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/OpenSearchSQLRestTestCase.java b/integ-test/src/test/java/org/opensearch/sql/legacy/OpenSearchSQLRestTestCase.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/OpenSearchSQLRestTestCase.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/OpenSearchSQLRestTestCase.java index 705e8d1cf7..9e9080accd 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/OpenSearchSQLRestTestCase.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/OpenSearchSQLRestTestCase.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import java.io.IOException; import java.util.Map; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/OrderIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/OrderIT.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/OrderIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/OrderIT.java index c5d6d7fec5..e3e4e0d618 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/OrderIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/OrderIT.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static org.hamcrest.Matchers.equalTo; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/OrdinalAliasRewriterIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/OrdinalAliasRewriterIT.java similarity index 98% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/OrdinalAliasRewriterIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/OrdinalAliasRewriterIT.java index 5179a3de76..a58b87b495 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/OrdinalAliasRewriterIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/OrdinalAliasRewriterIT.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static org.hamcrest.Matchers.equalTo; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import java.io.IOException; import org.junit.Assume; import org.junit.Test; +import org.opensearch.sql.legacy.utils.StringUtils; public class OrdinalAliasRewriterIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/PluginIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/PluginIT.java similarity index 97% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/PluginIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/PluginIT.java index 81e525f23f..acbce65332 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/PluginIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/PluginIT.java @@ -25,12 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getResponseBody; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlSettingsAction.SETTINGS_API_ENDPOINT; import static org.hamcrest.Matchers.equalTo; +import static org.opensearch.sql.legacy.TestUtils.getResponseBody; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.plugin.RestSqlSettingsAction.SETTINGS_API_ENDPOINT; import java.io.IOException; import java.util.Locale; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/PreparedStatementIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/PreparedStatementIT.java similarity index 98% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/PreparedStatementIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/PreparedStatementIT.java index 3bd7e3cffc..520b987c47 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/PreparedStatementIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/PreparedStatementIT.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import java.io.IOException; import org.json.JSONArray; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/PrettyFormatResponseIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/PrettyFormatResponseIT.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/PrettyFormatResponseIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/PrettyFormatResponseIT.java index 9e20855bbc..ee3790a5f2 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/PrettyFormatResponseIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/PrettyFormatResponseIT.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static java.util.stream.Collectors.toSet; import static org.hamcrest.Matchers.equalTo; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/PrettyFormatterIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/PrettyFormatterIT.java similarity index 92% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/PrettyFormatterIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/PrettyFormatterIT.java index b790f6ab3a..3680b50f4a 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/PrettyFormatterIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/PrettyFormatterIT.java @@ -25,12 +25,11 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; import static org.hamcrest.Matchers.equalTo; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.google.common.io.Files; import java.io.File; import java.io.IOException; @@ -38,6 +37,7 @@ import org.junit.Test; import org.opensearch.client.Request; import org.opensearch.client.Response; +import org.opensearch.sql.legacy.utils.StringUtils; public class PrettyFormatterIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/QueryAnalysisIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/QueryAnalysisIT.java similarity index 93% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/QueryAnalysisIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/QueryAnalysisIT.java index d72e29cc99..8708ec82a1 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/QueryAnalysisIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/QueryAnalysisIT.java @@ -25,22 +25,17 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_ENABLED; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_SEMANTIC_SUGGESTION; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_SEMANTIC_THRESHOLD; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.opensearch.rest.RestStatus.BAD_REQUEST; import static org.opensearch.rest.RestStatus.OK; import static org.opensearch.rest.RestStatus.SERVICE_UNAVAILABLE; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_ENABLED; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_SEMANTIC_SUGGESTION; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_SEMANTIC_THRESHOLD; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.SemanticAnalysisException; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.syntax.SyntaxAnalysisException; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlFeatureNotImplementedException; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import java.io.IOException; import org.junit.Assert; import org.junit.Test; @@ -48,6 +43,11 @@ import org.opensearch.client.Response; import org.opensearch.client.ResponseException; import org.opensearch.rest.RestStatus; +import org.opensearch.sql.legacy.antlr.semantic.SemanticAnalysisException; +import org.opensearch.sql.legacy.antlr.syntax.SyntaxAnalysisException; +import org.opensearch.sql.legacy.exception.SqlFeatureNotImplementedException; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Integration test for syntax and semantic analysis against query by new ANTLR parser. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/QueryFunctionsIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/QueryFunctionsIT.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/QueryFunctionsIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/QueryFunctionsIT.java index afc4dd5ace..3a9e2d5b67 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/QueryFunctionsIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/QueryFunctionsIT.java @@ -25,17 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_TYPE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_PHRASE; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.everyItem; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.startsWith; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_TYPE; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_PHRASE; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import java.io.IOException; import java.util.Arrays; import java.util.HashMap; @@ -56,6 +55,7 @@ import org.opensearch.common.xcontent.XContentParser; import org.opensearch.common.xcontent.XContentType; import org.opensearch.search.SearchHit; +import org.opensearch.sql.legacy.utils.StringUtils; public class QueryFunctionsIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/QueryIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/QueryIT.java similarity index 98% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/QueryIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/QueryIT.java index 38ea583675..17830c6d2c 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/QueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/QueryIT.java @@ -25,14 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_GAME_OF_THRONES; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_TYPE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ONLINE; +package org.opensearch.sql.legacy; + import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -42,8 +36,13 @@ import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.not; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_GAME_OF_THRONES; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_NESTED_TYPE; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ONLINE; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -61,6 +60,7 @@ import org.junit.Test; import org.opensearch.client.ResponseException; import org.opensearch.rest.RestStatus; +import org.opensearch.sql.legacy.utils.StringUtils; public class QueryIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/RestIntegTestCase.java b/integ-test/src/test/java/org/opensearch/sql/legacy/RestIntegTestCase.java similarity index 82% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/RestIntegTestCase.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/RestIntegTestCase.java index e59f15c50b..8fbedd5e98 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/RestIntegTestCase.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/RestIntegTestCase.java @@ -25,30 +25,30 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.createIndexByRestClient; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getAccountIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getBankIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getBankWithNullValuesIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getDateIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getDogIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getDogs2IndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getDogs3IndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getEmployeeNestedTypeIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getGameOfThronesIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getJoinTypeIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getLocationIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getNestedTypeIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getOdbcIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getOrderIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getPeople2IndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getPhraseIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getWeblogsIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.isIndexExist; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.loadDataByRestClient; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.PERSISTENT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TRANSIENT; +import static org.opensearch.sql.legacy.TestUtils.createIndexByRestClient; +import static org.opensearch.sql.legacy.TestUtils.getAccountIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getBankIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getBankWithNullValuesIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getDateIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getDogIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getDogs2IndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getDogs3IndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getEmployeeNestedTypeIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getGameOfThronesIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getJoinTypeIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getLocationIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getNestedTypeIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getOdbcIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getOrderIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getPeople2IndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getPhraseIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getWeblogsIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.isIndexExist; +import static org.opensearch.sql.legacy.TestUtils.loadDataByRestClient; +import static org.opensearch.sql.legacy.TestsConstants.PERSISTENT; +import static org.opensearch.sql.legacy.TestsConstants.TRANSIENT; import java.io.IOException; import java.nio.file.Files; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/SQLFunctionsIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/SQLFunctionsIT.java similarity index 97% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/SQLFunctionsIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/SQLFunctionsIT.java index 3a1a185c02..6edd8393f1 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/SQLFunctionsIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/SQLFunctionsIT.java @@ -25,17 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.hitAny; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.kvDouble; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.kvInt; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.kvString; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +package org.opensearch.sql.legacy; + import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.both; import static org.hamcrest.Matchers.closeTo; @@ -48,6 +39,15 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.isEmptyOrNullString; import static org.hamcrest.Matchers.not; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.util.MatcherUtils.hitAny; +import static org.opensearch.sql.util.MatcherUtils.kvDouble; +import static org.opensearch.sql.util.MatcherUtils.kvInt; +import static org.opensearch.sql.util.MatcherUtils.kvString; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; import java.io.IOException; import java.util.Date; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/SQLIntegTestCase.java b/integ-test/src/test/java/org/opensearch/sql/legacy/SQLIntegTestCase.java similarity index 86% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/SQLIntegTestCase.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/SQLIntegTestCase.java index 18ba7e5eeb..36ba0fd612 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/SQLIntegTestCase.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/SQLIntegTestCase.java @@ -25,40 +25,39 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.createIndexByRestClient; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getAccountIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getBankIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getBankWithNullValuesIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getDataTypeNonnumericIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getDataTypeNumericIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getDateIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getDateTimeIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getDeepNestedIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getDogIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getDogs2IndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getDogs3IndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getEmployeeNestedTypeIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getGameOfThronesIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getJoinTypeIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getLocationIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getNestedSimpleIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getNestedTypeIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getOdbcIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getOrderIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getPeople2IndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getPhraseIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getResponseBody; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getStringIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getWeblogsIndexMapping; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.isIndexExist; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.loadDataByRestClient; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.CURSOR_CLOSE_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.EXPLAIN_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; - -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; +package org.opensearch.sql.legacy; + +import static org.opensearch.sql.legacy.TestUtils.createIndexByRestClient; +import static org.opensearch.sql.legacy.TestUtils.getAccountIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getBankIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getBankWithNullValuesIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getDataTypeNonnumericIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getDataTypeNumericIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getDateIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getDateTimeIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getDeepNestedIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getDogIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getDogs2IndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getDogs3IndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getEmployeeNestedTypeIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getGameOfThronesIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getJoinTypeIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getLocationIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getNestedSimpleIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getNestedTypeIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getOdbcIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getOrderIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getPeople2IndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getPhraseIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getResponseBody; +import static org.opensearch.sql.legacy.TestUtils.getStringIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.getWeblogsIndexMapping; +import static org.opensearch.sql.legacy.TestUtils.isIndexExist; +import static org.opensearch.sql.legacy.TestUtils.loadDataByRestClient; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.CURSOR_CLOSE_ENDPOINT; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.EXPLAIN_API_ENDPOINT; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; + import com.google.common.base.Strings; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -81,6 +80,7 @@ import org.opensearch.client.Request; import org.opensearch.client.RequestOptions; import org.opensearch.client.Response; +import org.opensearch.sql.common.setting.Settings; /** * OpenSearch Rest integration test base for SQL testing @@ -161,7 +161,7 @@ public static void cleanUpIndices() throws IOException { private void configureNewQueryEngine() throws IOException { boolean isEnabled = isNewQueryEngineEabled(); if (!isEnabled) { - com.amazon.opendistroforelasticsearch.sql.util.TestUtils.disableNewQueryEngine(client()); + org.opensearch.sql.util.TestUtils.disableNewQueryEngine(client()); } } diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/ShowIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/ShowIT.java similarity index 91% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/ShowIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/ShowIT.java index 90e1fceded..42817b9dc2 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/ShowIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/ShowIT.java @@ -25,12 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.createIndexByRestClient; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.isIndexExist; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; +import static org.opensearch.sql.legacy.TestUtils.createIndexByRestClient; +import static org.opensearch.sql.legacy.TestUtils.isIndexExist; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/SourceFieldIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/SourceFieldIT.java similarity index 96% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/SourceFieldIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/SourceFieldIT.java index 1f39db36b2..b6ae0ec1bd 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/SourceFieldIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/SourceFieldIT.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; import java.io.IOException; import java.util.Set; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/SubqueryIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/SubqueryIT.java similarity index 92% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/SubqueryIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/SubqueryIT.java index 1c2dcaad1f..5d987b71b7 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/SubqueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/SubqueryIT.java @@ -25,23 +25,22 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DOGSUBQUERY; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_EMPLOYEE_NESTED; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.hitAll; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.kvInt; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.kvString; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +package org.opensearch.sql.legacy; + import static org.hamcrest.Matchers.both; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.core.Is.is; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DOGSUBQUERY; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_EMPLOYEE_NESTED; +import static org.opensearch.sql.util.MatcherUtils.hitAll; +import static org.opensearch.sql.util.MatcherUtils.kvInt; +import static org.opensearch.sql.util.MatcherUtils.kvString; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.google.common.collect.Ordering; import java.io.IOException; import java.util.ArrayList; @@ -54,6 +53,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.opensearch.client.ResponseException; +import org.opensearch.sql.legacy.utils.StringUtils; public class SubqueryIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/TermQueryExplainIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/TermQueryExplainIT.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/TermQueryExplainIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/TermQueryExplainIT.java index 4751c124ed..4a60290fb9 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/TermQueryExplainIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/TermQueryExplainIT.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/TestUtils.java b/integ-test/src/test/java/org/opensearch/sql/legacy/TestUtils.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/TestUtils.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/TestUtils.java index e5ccf204ff..5cafa89fb8 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/TestUtils.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/TestUtils.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; import static com.google.common.base.Strings.isNullOrEmpty; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/TestsConstants.java b/integ-test/src/test/java/org/opensearch/sql/legacy/TestsConstants.java similarity index 98% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/TestsConstants.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/TestsConstants.java index 119ec0372f..e19749192a 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/TestsConstants.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/TestsConstants.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; /** * Created by omershelef on 18/12/14. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/TypeInformationIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/TypeInformationIT.java similarity index 96% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/TypeInformationIT.java rename to integ-test/src/test/java/org/opensearch/sql/legacy/TypeInformationIT.java index 3b9c0f7553..fc657538fe 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/TypeInformationIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/TypeInformationIT.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy; +package org.opensearch.sql.legacy; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; import org.json.JSONObject; import org.junit.Assume; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/CsvFormatIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/CsvFormatIT.java similarity index 92% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/CsvFormatIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/CsvFormatIT.java index 53a7833562..7bb3f198ff 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/CsvFormatIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/CsvFormatIT.java @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_CSV_SANITIZE; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_CSV_SANITIZE; import java.io.IOException; import java.util.Locale; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/DataTypeIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/DataTypeIT.java similarity index 77% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/DataTypeIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/DataTypeIT.java index 89029c5d40..c7bc241731 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/DataTypeIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/DataTypeIT.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase.Index.DATA_TYPE_NONNUMERIC; -import static com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase.Index.DATA_TYPE_NUMERIC; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DATATYPE_NONNUMERIC; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DATATYPE_NUMERIC; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.legacy.SQLIntegTestCase.Index.DATA_TYPE_NONNUMERIC; +import static org.opensearch.sql.legacy.SQLIntegTestCase.Index.DATA_TYPE_NUMERIC; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DATATYPE_NONNUMERIC; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DATATYPE_NUMERIC; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/DateTimeFunctionIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/DateTimeFunctionIT.java similarity index 97% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/DateTimeFunctionIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/DateTimeFunctionIT.java index cfd5308a19..13e876df9e 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/DateTimeFunctionIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/DateTimeFunctionIT.java @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DATE; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySome; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DATE; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.util.MatcherUtils.verifySome; -import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils; import java.io.IOException; import org.json.JSONObject; import org.junit.jupiter.api.Test; +import org.opensearch.sql.common.utils.StringUtils; public class DateTimeFunctionIT extends PPLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/DedupCommandIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/DedupCommandIT.java similarity index 85% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/DedupCommandIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/DedupCommandIT.java index 4619ef5069..8fae14ce0a 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/DedupCommandIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/DedupCommandIT.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/ExplainIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/ExplainIT.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/ExplainIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/ExplainIT.java index 36651daef2..de6c39148b 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/ExplainIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/ExplainIT.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.assertJsonEquals; +import static org.opensearch.sql.util.MatcherUtils.assertJsonEquals; import com.google.common.io.Resources; import java.io.IOException; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/FieldsCommandIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/FieldsCommandIT.java similarity index 74% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/FieldsCommandIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/FieldsCommandIT.java index 00e262a4ec..6038c4d4c9 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/FieldsCommandIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/FieldsCommandIT.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.columnName; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.columnPattern; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyColumn; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; +import static org.opensearch.sql.util.MatcherUtils.columnName; +import static org.opensearch.sql.util.MatcherUtils.columnPattern; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyColumn; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/HeadCommandIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/HeadCommandIT.java similarity index 87% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/HeadCommandIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/HeadCommandIT.java index e0880639a2..e7b56c6c67 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/HeadCommandIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/HeadCommandIT.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/LegacyAPICompatibilityIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/LegacyAPICompatibilityIT.java similarity index 80% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/LegacyAPICompatibilityIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/LegacyAPICompatibilityIT.java index 99f0d95fa3..d414405716 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/LegacyAPICompatibilityIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/LegacyAPICompatibilityIT.java @@ -8,11 +8,11 @@ * Modifications Copyright OpenSearch Contributors. See * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.plugin.rest.RestPPLQueryAction.LEGACY_EXPLAIN_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.plugin.rest.RestPPLQueryAction.LEGACY_QUERY_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.plugin.rest.RestPPLStatsAction.PPL_LEGACY_STATS_API_ENDPOINT; +import static org.opensearch.sql.plugin.rest.RestPPLQueryAction.LEGACY_EXPLAIN_API_ENDPOINT; +import static org.opensearch.sql.plugin.rest.RestPPLQueryAction.LEGACY_QUERY_API_ENDPOINT; +import static org.opensearch.sql.plugin.rest.RestPPLStatsAction.PPL_LEGACY_STATS_API_ENDPOINT; import java.io.IOException; import org.junit.Assert; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/MathematicalFunctionIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/MathematicalFunctionIT.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/MathematicalFunctionIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/MathematicalFunctionIT.java index 8267918dac..aca5e935c8 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/MathematicalFunctionIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/MathematicalFunctionIT.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.closeTo; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySome; +package org.opensearch.sql.ppl; + +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; +import static org.opensearch.sql.util.MatcherUtils.closeTo; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.util.MatcherUtils.verifySome; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/MetricsIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/MetricsIT.java similarity index 92% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/MetricsIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/MetricsIT.java index 729b647afa..f3b81666ee 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/MetricsIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/MetricsIT.java @@ -26,12 +26,11 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; import static org.hamcrest.Matchers.equalTo; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; @@ -42,6 +41,7 @@ import org.junit.Test; import org.opensearch.client.Request; import org.opensearch.client.Response; +import org.opensearch.sql.legacy.metrics.MetricName; public class MetricsIT extends PPLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/ObjectFieldOperateIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/ObjectFieldOperateIT.java similarity index 83% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/ObjectFieldOperateIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/ObjectFieldOperateIT.java index 27bb606173..9e6deb3721 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/ObjectFieldOperateIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/ObjectFieldOperateIT.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase.Index.DEEP_NESTED; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DEEP_NESTED; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.legacy.SQLIntegTestCase.Index.DEEP_NESTED; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DEEP_NESTED; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/OperatorIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/OperatorIT.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/OperatorIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/OperatorIT.java index cc6ba69371..f3002efe25 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/OperatorIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/OperatorIT.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/PPLIntegTestCase.java b/integ-test/src/test/java/org/opensearch/sql/ppl/PPLIntegTestCase.java similarity index 91% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/PPLIntegTestCase.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/PPLIntegTestCase.java index 29d97f411a..3821f512af 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/PPLIntegTestCase.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/PPLIntegTestCase.java @@ -24,13 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestUtils.getResponseBody; -import static com.amazon.opendistroforelasticsearch.sql.plugin.rest.RestPPLQueryAction.EXPLAIN_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.plugin.rest.RestPPLQueryAction.QUERY_API_ENDPOINT; +import static org.opensearch.sql.legacy.TestUtils.getResponseBody; +import static org.opensearch.sql.plugin.rest.RestPPLQueryAction.EXPLAIN_API_ENDPOINT; +import static org.opensearch.sql.plugin.rest.RestPPLQueryAction.QUERY_API_ENDPOINT; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; import java.io.IOException; import java.util.Locale; import org.json.JSONException; @@ -39,6 +38,7 @@ import org.opensearch.client.Request; import org.opensearch.client.RequestOptions; import org.opensearch.client.Response; +import org.opensearch.sql.legacy.SQLIntegTestCase; /** * OpenSearch Rest integration test base for PPL testing. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/PPLPluginIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/PPLPluginIT.java similarity index 88% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/PPLPluginIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/PPLPluginIT.java index 4d60af65e6..ff80a9573b 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/PPLPluginIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/PPLPluginIT.java @@ -24,17 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasProperty; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; -import com.amazon.opendistroforelasticsearch.sql.util.TestUtils; import java.io.IOException; import java.util.Locale; import org.hamcrest.Description; @@ -46,6 +45,7 @@ import org.opensearch.client.Request; import org.opensearch.client.Response; import org.opensearch.client.ResponseException; +import org.opensearch.sql.util.TestUtils; public class PPLPluginIT extends PPLIntegTestCase { @Rule diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/QueryAnalysisIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/QueryAnalysisIT.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/QueryAnalysisIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/QueryAnalysisIT.java index 60520c04b7..120bebfdf2 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/QueryAnalysisIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/QueryAnalysisIT.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxCheckException; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; import java.io.IOException; import org.junit.Ignore; import org.junit.Test; import org.opensearch.client.ResponseException; +import org.opensearch.sql.common.antlr.SyntaxCheckException; +import org.opensearch.sql.exception.SemanticCheckException; public class QueryAnalysisIT extends PPLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/RareCommandIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/RareCommandIT.java similarity index 87% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/RareCommandIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/RareCommandIT.java index 3261961276..c074ede998 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/RareCommandIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/RareCommandIT.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/RenameCommandIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/RenameCommandIT.java similarity index 83% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/RenameCommandIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/RenameCommandIT.java index 66da9e1eac..c31b013128 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/RenameCommandIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/RenameCommandIT.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.columnName; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.columnPattern; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyColumn; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.util.MatcherUtils.columnName; +import static org.opensearch.sql.util.MatcherUtils.columnPattern; +import static org.opensearch.sql.util.MatcherUtils.verifyColumn; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/ResourceMonitorIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/ResourceMonitorIT.java similarity index 87% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/ResourceMonitorIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/ResourceMonitorIT.java index 7d0c46af2f..99226df781 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/ResourceMonitorIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/ResourceMonitorIT.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.columnName; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyColumn; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; +import static org.opensearch.sql.util.MatcherUtils.columnName; +import static org.opensearch.sql.util.MatcherUtils.verifyColumn; import java.io.IOException; import org.hamcrest.Matchers; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/SearchCommandIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/SearchCommandIT.java similarity index 82% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/SearchCommandIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/SearchCommandIT.java index 2faa91f407..1ea35e5f7b 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/SearchCommandIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/SearchCommandIT.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.columnName; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyColumn; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; +import static org.opensearch.sql.util.MatcherUtils.columnName; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.verifyColumn; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/SettingsIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/SettingsIT.java similarity index 84% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/SettingsIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/SettingsIT.java index 1eeb7f13dd..5d6b084e24 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/SettingsIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/SettingsIT.java @@ -26,11 +26,11 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/SortCommandIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/SortCommandIT.java similarity index 83% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/SortCommandIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/SortCommandIT.java index 1f48e5a31c..10b7f2c909 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/SortCommandIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/SortCommandIT.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyOrder; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_DOG; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.verifyOrder; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/StandaloneIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/StandaloneIT.java similarity index 77% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/StandaloneIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/StandaloneIT.java index bb2f3b7ed4..ec2e826bac 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/StandaloneIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/StandaloneIT.java @@ -25,25 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ppl; - -import static com.amazon.opendistroforelasticsearch.sql.protocol.response.format.JsonResponseFormatter.Style.PRETTY; - -import com.amazon.opendistroforelasticsearch.sql.common.response.ResponseListener; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.QueryResponse; -import com.amazon.opendistroforelasticsearch.sql.monitor.AlwaysHealthyMonitor; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchRestClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.executor.OpenSearchExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector.OpenSearchExecutionProtector; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.OpenSearchStorageEngine; -import com.amazon.opendistroforelasticsearch.sql.ppl.config.PPLServiceConfig; -import com.amazon.opendistroforelasticsearch.sql.ppl.domain.PPLQueryRequest; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.QueryResult; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.SimpleJsonResponseFormatter; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; +package org.opensearch.sql.ppl; + +import static org.opensearch.sql.protocol.response.format.JsonResponseFormatter.Style.PRETTY; + import com.google.common.collect.ImmutableMap; import java.io.IOException; import java.util.Collections; @@ -53,6 +38,21 @@ import org.opensearch.client.Request; import org.opensearch.client.RestClient; import org.opensearch.client.RestHighLevelClient; +import org.opensearch.sql.common.response.ResponseListener; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.executor.ExecutionEngine.QueryResponse; +import org.opensearch.sql.monitor.AlwaysHealthyMonitor; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.client.OpenSearchRestClient; +import org.opensearch.sql.opensearch.executor.OpenSearchExecutionEngine; +import org.opensearch.sql.opensearch.executor.protector.OpenSearchExecutionProtector; +import org.opensearch.sql.opensearch.storage.OpenSearchStorageEngine; +import org.opensearch.sql.ppl.config.PPLServiceConfig; +import org.opensearch.sql.ppl.domain.PPLQueryRequest; +import org.opensearch.sql.protocol.response.QueryResult; +import org.opensearch.sql.protocol.response.format.SimpleJsonResponseFormatter; +import org.opensearch.sql.storage.StorageEngine; import org.springframework.context.annotation.AnnotationConfigApplicationContext; /** diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/StatsCommandIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/StatsCommandIT.java similarity index 90% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/StatsCommandIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/StatsCommandIT.java index 95c390df5f..ff3ad2a6c8 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/StatsCommandIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/StatsCommandIT.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +package org.opensearch.sql.ppl; + +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/TextCommandIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/TextCommandIT.java similarity index 90% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/TextCommandIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/TextCommandIT.java index ee50c64be8..1bfb391c63 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/TextCommandIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/TextCommandIT.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_STRINGS; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_STRINGS; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/TopCommandIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/TopCommandIT.java similarity index 85% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/TopCommandIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/TopCommandIT.java index 452ba62b28..162e7a5451 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/TopCommandIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/TopCommandIT.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; import java.io.IOException; import org.json.JSONObject; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/WhereCommandIT.java b/integ-test/src/test/java/org/opensearch/sql/ppl/WhereCommandIT.java similarity index 89% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/WhereCommandIT.java rename to integ-test/src/test/java/org/opensearch/sql/ppl/WhereCommandIT.java index 5d380f9f9c..0db090487e 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/WhereCommandIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/ppl/WhereCommandIT.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; import java.io.IOException; import org.json.JSONObject; @@ -118,4 +118,4 @@ public void testIsNotNullFunction() throws IOException { TEST_INDEX_BANK_WITH_NULL_VALUES)); verifyDataRows(result, rows("Amber JOHnny")); } -} \ No newline at end of file +} diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/AdminIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/AdminIT.java similarity index 89% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/AdminIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/AdminIT.java index 19fba36a70..305ae1fb67 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/AdminIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/AdminIT.java @@ -26,14 +26,11 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.assertJsonEquals; import static org.hamcrest.Matchers.equalTo; +import static org.opensearch.sql.util.MatcherUtils.assertJsonEquals; -import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; -import com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants; import com.google.common.io.Resources; import java.io.IOException; import java.net.URI; @@ -43,6 +40,9 @@ import org.json.JSONObject; import org.junit.Test; import org.opensearch.client.Request; +import org.opensearch.sql.common.utils.StringUtils; +import org.opensearch.sql.legacy.SQLIntegTestCase; +import org.opensearch.sql.legacy.TestsConstants; public class AdminIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/ConditionalIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/ConditionalIT.java similarity index 88% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/ConditionalIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/ConditionalIT.java index acb91ecad0..46ba69bc09 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/ConditionalIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/ConditionalIT.java @@ -25,22 +25,21 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; - -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.hitAny; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.kvInt; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +package org.opensearch.sql.sql; + import static org.hamcrest.Matchers.equalTo; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_FALSE; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_TRUE; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_WITH_NULL_VALUES; +import static org.opensearch.sql.util.MatcherUtils.hitAny; +import static org.opensearch.sql.util.MatcherUtils.kvInt; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; import java.io.IOException; import org.json.JSONObject; import org.junit.Test; @@ -51,6 +50,7 @@ import org.opensearch.common.xcontent.XContentParser; import org.opensearch.common.xcontent.XContentType; import org.opensearch.search.SearchHits; +import org.opensearch.sql.legacy.SQLIntegTestCase; public class ConditionalIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/CorrectnessTestBase.java b/integ-test/src/test/java/org/opensearch/sql/sql/CorrectnessTestBase.java similarity index 77% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/CorrectnessTestBase.java rename to integ-test/src/test/java/org/opensearch/sql/sql/CorrectnessTestBase.java index 23305f0c4b..e0ff076095 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/CorrectnessTestBase.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/CorrectnessTestBase.java @@ -25,25 +25,25 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; import static java.util.Collections.emptyMap; -import com.amazon.opendistroforelasticsearch.sql.correctness.TestConfig; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.TestReport; -import com.amazon.opendistroforelasticsearch.sql.correctness.report.TestSummary; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.ComparisonTest; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.connection.DBConnection; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.connection.OpenSearchConnection; -import com.amazon.opendistroforelasticsearch.sql.correctness.runner.connection.JDBCConnection; -import com.amazon.opendistroforelasticsearch.sql.correctness.testset.TestDataSet; -import com.amazon.opendistroforelasticsearch.sql.correctness.testset.TestQuerySet; -import com.amazon.opendistroforelasticsearch.sql.legacy.RestIntegTestCase; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope; import org.json.JSONObject; import org.junit.AfterClass; import org.junit.Assert; +import org.opensearch.sql.correctness.TestConfig; +import org.opensearch.sql.correctness.report.TestReport; +import org.opensearch.sql.correctness.report.TestSummary; +import org.opensearch.sql.correctness.runner.ComparisonTest; +import org.opensearch.sql.correctness.runner.connection.DBConnection; +import org.opensearch.sql.correctness.runner.connection.JDBCConnection; +import org.opensearch.sql.correctness.runner.connection.OpenSearchConnection; +import org.opensearch.sql.correctness.testset.TestDataSet; +import org.opensearch.sql.correctness.testset.TestQuerySet; +import org.opensearch.sql.legacy.RestIntegTestCase; +import org.opensearch.sql.legacy.utils.StringUtils; /** * SQL integration test base class. This is very similar to CorrectnessIT though diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/CsvFormatIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/CsvFormatIT.java similarity index 89% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/CsvFormatIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/CsvFormatIT.java index 29bf3fce3c..a563fe3d1b 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/CsvFormatIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/CsvFormatIT.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_CSV_SANITIZE; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_CSV_SANITIZE; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; import java.io.IOException; import java.util.Locale; import org.junit.Test; +import org.opensearch.sql.legacy.SQLIntegTestCase; public class CsvFormatIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/DateTimeFunctionIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/DateTimeFunctionIT.java similarity index 95% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/DateTimeFunctionIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/DateTimeFunctionIT.java index 68b9369914..4b1ed29dd6 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/DateTimeFunctionIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/DateTimeFunctionIT.java @@ -24,18 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.sql; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; -import static com.amazon.opendistroforelasticsearch.sql.util.TestUtils.getResponseBody; - -import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; +package org.opensearch.sql.sql; + +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.util.TestUtils.getResponseBody; + import java.io.IOException; import java.util.Locale; import org.json.JSONObject; @@ -43,6 +41,8 @@ import org.opensearch.client.Request; import org.opensearch.client.RequestOptions; import org.opensearch.client.Response; +import org.opensearch.sql.common.utils.StringUtils; +import org.opensearch.sql.legacy.SQLIntegTestCase; public class DateTimeFunctionIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/ExpressionIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/ExpressionIT.java similarity index 91% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/ExpressionIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/ExpressionIT.java index d1e826f121..48a7fd7746 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/ExpressionIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/ExpressionIT.java @@ -25,13 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.featureValueOf; import static org.hamcrest.Matchers.is; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; +import static org.opensearch.sql.util.MatcherUtils.featureValueOf; -import com.amazon.opendistroforelasticsearch.sql.legacy.RestIntegTestCase; import java.io.IOException; import java.util.Locale; import java.util.function.Function; @@ -42,6 +41,7 @@ import org.opensearch.client.RequestOptions; import org.opensearch.client.Response; import org.opensearch.client.ResponseException; +import org.opensearch.sql.legacy.RestIntegTestCase; /** * Integration test for different type of expressions such as literals, arithmetic, predicate diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/IdentifierIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/IdentifierIT.java similarity index 83% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/IdentifierIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/IdentifierIT.java index 88aa7a72c2..6f2e8fc348 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/IdentifierIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/IdentifierIT.java @@ -25,20 +25,20 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; -import static com.amazon.opendistroforelasticsearch.sql.util.TestUtils.createHiddenIndexByRestClient; -import static com.amazon.opendistroforelasticsearch.sql.util.TestUtils.performRequest; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.util.TestUtils.createHiddenIndexByRestClient; +import static org.opensearch.sql.util.TestUtils.performRequest; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; import java.io.IOException; import org.json.JSONObject; import org.junit.jupiter.api.Test; import org.opensearch.client.Request; +import org.opensearch.sql.legacy.SQLIntegTestCase; /** * Integration tests for identifiers including index and field name symbol. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/JdbcFormatIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/JdbcFormatIT.java similarity index 82% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/JdbcFormatIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/JdbcFormatIT.java index e03c557f22..6bf8a9b9e0 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/JdbcFormatIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/JdbcFormatIT.java @@ -25,15 +25,15 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; import org.json.JSONObject; import org.junit.jupiter.api.Test; +import org.opensearch.sql.legacy.SQLIntegTestCase; public class JdbcFormatIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/LegacyAPICompatibilityIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/LegacyAPICompatibilityIT.java similarity index 79% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/LegacyAPICompatibilityIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/LegacyAPICompatibilityIT.java index 5c253ce29e..0c9f8c9413 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/LegacyAPICompatibilityIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/LegacyAPICompatibilityIT.java @@ -8,18 +8,16 @@ * Modifications Copyright OpenSearch Contributors. See * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.LEGACY_CURSOR_CLOSE_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.LEGACY_EXPLAIN_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.LEGACY_QUERY_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlSettingsAction.LEGACY_SETTINGS_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlStatsAction.LEGACY_STATS_API_ENDPOINT; import static org.hamcrest.Matchers.equalTo; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_ACCOUNT; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.LEGACY_CURSOR_CLOSE_ENDPOINT; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.LEGACY_EXPLAIN_API_ENDPOINT; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.LEGACY_QUERY_API_ENDPOINT; +import static org.opensearch.sql.legacy.plugin.RestSqlSettingsAction.LEGACY_SETTINGS_API_ENDPOINT; +import static org.opensearch.sql.legacy.plugin.RestSqlStatsAction.LEGACY_STATS_API_ENDPOINT; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import java.io.IOException; import org.json.JSONObject; import org.junit.Assert; @@ -27,6 +25,8 @@ import org.opensearch.client.Request; import org.opensearch.client.RequestOptions; import org.opensearch.client.Response; +import org.opensearch.sql.legacy.SQLIntegTestCase; +import org.opensearch.sql.legacy.utils.StringUtils; /** * For backward compatibility, check if legacy API endpoints are accessible. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/MathematicalFunctionIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/MathematicalFunctionIT.java similarity index 88% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/MathematicalFunctionIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/MathematicalFunctionIT.java index 3cbaa44a8b..ae03d9a7f5 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/MathematicalFunctionIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/MathematicalFunctionIT.java @@ -24,17 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; -import static com.amazon.opendistroforelasticsearch.sql.util.TestUtils.getResponseBody; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.util.TestUtils.getResponseBody; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; import java.io.IOException; import java.util.Locale; import org.json.JSONObject; @@ -42,6 +41,7 @@ import org.opensearch.client.Request; import org.opensearch.client.RequestOptions; import org.opensearch.client.Response; +import org.opensearch.sql.legacy.SQLIntegTestCase; public class MathematicalFunctionIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/MetricsIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/MetricsIT.java similarity index 86% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/MetricsIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/MetricsIT.java index 88cb99168b..c585ef06bf 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/MetricsIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/MetricsIT.java @@ -25,13 +25,11 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlStatsAction.STATS_API_ENDPOINT; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK; +import static org.opensearch.sql.legacy.plugin.RestSqlStatsAction.STATS_API_ENDPOINT; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; @@ -43,6 +41,8 @@ import org.junit.Test; import org.opensearch.client.Request; import org.opensearch.client.Response; +import org.opensearch.sql.legacy.SQLIntegTestCase; +import org.opensearch.sql.legacy.metrics.MetricName; public class MetricsIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/NullLiteralIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/NullLiteralIT.java similarity index 82% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/NullLiteralIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/NullLiteralIT.java index 59a720798b..23dee49aa6 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/NullLiteralIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/NullLiteralIT.java @@ -25,16 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; import org.json.JSONObject; import org.junit.Test; +import org.opensearch.sql.legacy.SQLIntegTestCase; /** * This manual IT for NULL literal cannot be replaced with comparison test because other database diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/PreparedStatementIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/PreparedStatementIT.java similarity index 89% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/PreparedStatementIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/PreparedStatementIT.java index a602a9148f..6fb7dd3eb0 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/PreparedStatementIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/PreparedStatementIT.java @@ -25,12 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; -import com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants; import org.json.JSONObject; import org.junit.Test; +import org.opensearch.sql.legacy.SQLIntegTestCase; +import org.opensearch.sql.legacy.TestsConstants; public class PreparedStatementIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/QueryValidationIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/QueryValidationIT.java similarity index 94% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/QueryValidationIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/QueryValidationIT.java index 95bf0bdb61..fea0d85191 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/QueryValidationIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/QueryValidationIT.java @@ -25,14 +25,13 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.featureValueOf; import static org.hamcrest.Matchers.is; import static org.opensearch.rest.RestStatus.BAD_REQUEST; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; +import static org.opensearch.sql.util.MatcherUtils.featureValueOf; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; import java.io.IOException; import java.util.Locale; import java.util.function.Function; @@ -44,6 +43,7 @@ import org.opensearch.client.RequestOptions; import org.opensearch.client.ResponseException; import org.opensearch.rest.RestStatus; +import org.opensearch.sql.legacy.SQLIntegTestCase; /** * The query validation IT only covers test for error cases that not doable in comparison test. diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/RawFormatIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/RawFormatIT.java similarity index 87% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/RawFormatIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/RawFormatIT.java index 8945c13f73..70c34a3bf6 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/RawFormatIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/RawFormatIT.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import static com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_RAW_SANITIZE; +import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_BANK_RAW_SANITIZE; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; import java.io.IOException; import java.util.Locale; import org.junit.Test; +import org.opensearch.sql.legacy.SQLIntegTestCase; public class RawFormatIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/SQLCorrectnessIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/SQLCorrectnessIT.java similarity index 97% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/SQLCorrectnessIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/SQLCorrectnessIT.java index 767bcdf3aa..c75551aca1 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/SQLCorrectnessIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/SQLCorrectnessIT.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; import com.google.common.io.Resources; import java.io.IOException; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/TextFunctionIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/TextFunctionIT.java similarity index 87% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/TextFunctionIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/TextFunctionIT.java index b77c089abf..e5b5ce5f48 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/TextFunctionIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/TextFunctionIT.java @@ -24,16 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.schema; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema; -import static com.amazon.opendistroforelasticsearch.sql.util.TestUtils.getResponseBody; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.schema; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.verifySchema; +import static org.opensearch.sql.util.TestUtils.getResponseBody; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; import java.io.IOException; import java.util.Locale; import org.json.JSONObject; @@ -41,6 +40,7 @@ import org.opensearch.client.Request; import org.opensearch.client.RequestOptions; import org.opensearch.client.Response; +import org.opensearch.sql.legacy.SQLIntegTestCase; public class TextFunctionIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/WindowFunctionIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/WindowFunctionIT.java similarity index 84% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/WindowFunctionIT.java rename to integ-test/src/test/java/org/opensearch/sql/sql/WindowFunctionIT.java index 26e9fb439d..b92ca17238 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/WindowFunctionIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/WindowFunctionIT.java @@ -25,15 +25,15 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; +package org.opensearch.sql.sql; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.rows; -import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifyDataRows; +import static org.opensearch.sql.util.MatcherUtils.rows; +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; -import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase; -import com.amazon.opendistroforelasticsearch.sql.legacy.TestsConstants; import org.json.JSONObject; import org.junit.Test; +import org.opensearch.sql.legacy.SQLIntegTestCase; +import org.opensearch.sql.legacy.TestsConstants; public class WindowFunctionIT extends SQLIntegTestCase { diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/util/MatcherUtils.java b/integ-test/src/test/java/org/opensearch/sql/util/MatcherUtils.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/util/MatcherUtils.java rename to integ-test/src/test/java/org/opensearch/sql/util/MatcherUtils.java index 96b94da543..b5692f0b58 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/util/MatcherUtils.java +++ b/integ-test/src/test/java/org/opensearch/sql/util/MatcherUtils.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.util; +package org.opensearch.sql.util; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.arrayContaining; diff --git a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/util/TestUtils.java b/integ-test/src/test/java/org/opensearch/sql/util/TestUtils.java similarity index 99% rename from integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/util/TestUtils.java rename to integ-test/src/test/java/org/opensearch/sql/util/TestUtils.java index 1f9f08ca2c..806629a505 100644 --- a/integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/util/TestUtils.java +++ b/integ-test/src/test/java/org/opensearch/sql/util/TestUtils.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.util; +package org.opensearch.sql.util; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlSettingsAction.SETTINGS_API_ENDPOINT; import static com.google.common.base.Strings.isNullOrEmpty; +import static org.opensearch.sql.legacy.plugin.RestSqlSettingsAction.SETTINGS_API_ENDPOINT; import java.io.BufferedReader; import java.io.File; diff --git a/legacy/build.gradle b/legacy/build.gradle index 7218b67518..13ace7186d 100644 --- a/legacy/build.gradle +++ b/legacy/build.gradle @@ -35,9 +35,9 @@ plugins { } generateGrammarSource { - arguments += ['-visitor', '-package', 'com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser'] + arguments += ['-visitor', '-package', 'org.opensearch.sql.legacy.antlr.parser'] source = sourceSets.main.antlr - outputDirectory = file("build/generated-src/antlr/main/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/parser") + outputDirectory = file("build/generated-src/antlr/main/org/opensearch/sql/legacy/antlr/parser") } // Remove ANTLR plugin jars as it's specified as 'compile' dependency internally @@ -72,7 +72,7 @@ compileTestJava { // TODO: Need to update integration test to use OpenSearch test framework test { include '**/*Test.class' - exclude 'com/amazon/opendistroforelasticsearch/sql/intgtest/**' + exclude 'org/opensearch/sql/intgtest/**' // Gradle runs unit test using a working directory other and project root // set 'project.projectDir' property to allow unit test classes to access test resources // in src/test/resources in current module diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/OpenSearchLegacySqlAnalyzer.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/OpenSearchLegacySqlAnalyzer.java similarity index 78% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/OpenSearchLegacySqlAnalyzer.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/OpenSearchLegacySqlAnalyzer.java index 57b45dd477..41e0ab1044 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/OpenSearchLegacySqlAnalyzer.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/OpenSearchLegacySqlAnalyzer.java @@ -24,26 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr; - -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlLexer; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope.SemanticContext; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.visitor.OpenSearchMappingLoader; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.visitor.SemanticAnalyzer; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.visitor.TypeChecker; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.syntax.CaseInsensitiveCharStream; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.syntax.SyntaxAnalysisErrorListener; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor.AntlrSqlParseTreeVisitor; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor.EarlyExitAnalysisException; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; +package org.opensearch.sql.legacy.antlr; + import java.util.Optional; import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.tree.ParseTree; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlLexer; +import org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser; +import org.opensearch.sql.legacy.antlr.semantic.scope.SemanticContext; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.antlr.semantic.visitor.OpenSearchMappingLoader; +import org.opensearch.sql.legacy.antlr.semantic.visitor.SemanticAnalyzer; +import org.opensearch.sql.legacy.antlr.semantic.visitor.TypeChecker; +import org.opensearch.sql.legacy.antlr.syntax.CaseInsensitiveCharStream; +import org.opensearch.sql.legacy.antlr.syntax.SyntaxAnalysisErrorListener; +import org.opensearch.sql.legacy.antlr.visitor.AntlrSqlParseTreeVisitor; +import org.opensearch.sql.legacy.antlr.visitor.EarlyExitAnalysisException; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; /** * Entry point for ANTLR generated parser to perform strict syntax and semantic analysis. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SimilarSymbols.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/SimilarSymbols.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SimilarSymbols.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/SimilarSymbols.java index b61633453b..9deff9fd98 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SimilarSymbols.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/SimilarSymbols.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr; - -import org.apache.lucene.search.spell.LevenshteinDistance; -import org.apache.lucene.search.spell.StringDistance; +package org.opensearch.sql.legacy.antlr; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.Optional; +import org.apache.lucene.search.spell.LevenshteinDistance; +import org.apache.lucene.search.spell.StringDistance; /** * String similarity for finding most similar string. @@ -80,4 +79,4 @@ public float similarity() { return ALGORITHM.getDistance(candidate, target); } } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SqlAnalysisConfig.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/SqlAnalysisConfig.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SqlAnalysisConfig.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/SqlAnalysisConfig.java index 92f2afc551..1c7b1329b8 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SqlAnalysisConfig.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/SqlAnalysisConfig.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr; +package org.opensearch.sql.legacy.antlr; /** * Configuration for SQL analysis. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SqlAnalysisException.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/SqlAnalysisException.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SqlAnalysisException.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/SqlAnalysisException.java index 27665fd59d..0532ed9c42 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SqlAnalysisException.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/SqlAnalysisException.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr; +package org.opensearch.sql.legacy.antlr; /** * SQL query analysis abstract exception. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalysisException.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalysisException.java similarity index 87% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalysisException.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalysisException.java index 43810dabca..6a9141defe 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalysisException.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalysisException.java @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.SqlAnalysisException; +import org.opensearch.sql.legacy.antlr.SqlAnalysisException; /** * Exception for semantic analysis diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/Environment.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/Environment.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/Environment.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/Environment.java index f0cc333810..314f6296fb 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/Environment.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/Environment.java @@ -24,13 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope; - -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; +package org.opensearch.sql.legacy.antlr.semantic.scope; import java.util.HashMap; import java.util.Map; import java.util.Optional; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; /** * Environment for symbol and its attribute (type) in the current scope diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/Namespace.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/Namespace.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/Namespace.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/Namespace.java index b35a9d1503..78d67aa224 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/Namespace.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/Namespace.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope; +package org.opensearch.sql.legacy.antlr.semantic.scope; /** * Namespace of symbol to avoid naming conflict diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/SemanticContext.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/SemanticContext.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/SemanticContext.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/SemanticContext.java index 4d44d9eeab..c66fe27b6c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/SemanticContext.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/SemanticContext.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope; +package org.opensearch.sql.legacy.antlr.semantic.scope; import java.util.Objects; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/Symbol.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/Symbol.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/Symbol.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/Symbol.java index a0b782cb29..dd42654352 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/Symbol.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/Symbol.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope; +package org.opensearch.sql.legacy.antlr.semantic.scope; /** * Symbol in the scope diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/SymbolTable.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/SymbolTable.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/SymbolTable.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/SymbolTable.java index 73cef73ba8..e533e827d4 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/SymbolTable.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/SymbolTable.java @@ -24,9 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope; +package org.opensearch.sql.legacy.antlr.semantic.scope; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; +import static java.util.Collections.emptyMap; +import static java.util.Collections.emptyNavigableMap; import java.util.EnumMap; import java.util.Map; @@ -34,9 +35,7 @@ import java.util.Optional; import java.util.TreeMap; import java.util.stream.Collectors; - -import static java.util.Collections.emptyMap; -import static java.util.Collections.emptyNavigableMap; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; /** * Symbol table for symbol definition and resolution. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/TypeSupplier.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/TypeSupplier.java similarity index 89% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/TypeSupplier.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/TypeSupplier.java index a1d46d607f..a36742cac1 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/TypeSupplier.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/scope/TypeSupplier.java @@ -24,14 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope; - -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.SemanticAnalysisException; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; +package org.opensearch.sql.legacy.antlr.semantic.scope; import java.util.HashSet; import java.util.Set; import java.util.function.Supplier; +import org.opensearch.sql.legacy.antlr.semantic.SemanticAnalysisException; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; /** * The TypeSupplier is construct by the symbolName and symbolType. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/Type.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/Type.java similarity index 83% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/Type.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/Type.java index 4b6a984c6d..d752e933d9 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/Type.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/Type.java @@ -24,17 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types; +package org.opensearch.sql.legacy.antlr.semantic.types; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.SemanticAnalysisException; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor.Reducible; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; import java.util.List; import java.util.stream.Collectors; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; +import org.opensearch.sql.legacy.antlr.semantic.SemanticAnalysisException; +import org.opensearch.sql.legacy.antlr.visitor.Reducible; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Type interface which represents any type of symbol in the SQL. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/TypeExpression.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/TypeExpression.java similarity index 91% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/TypeExpression.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/TypeExpression.java index 33d21783e2..63e129e843 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/TypeExpression.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/TypeExpression.java @@ -24,18 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types; +package org.opensearch.sql.legacy.antlr.semantic.types; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.special.Generic; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; import java.util.Arrays; import java.util.List; import java.util.function.Function; import java.util.stream.Collectors; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; +import org.opensearch.sql.legacy.antlr.semantic.types.special.Generic; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Type expression representing specification(s) of constructor such as function, operator etc. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/base/BaseType.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/base/BaseType.java similarity index 87% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/base/BaseType.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/base/BaseType.java index 3cb635db14..37742bdd68 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/base/BaseType.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/base/BaseType.java @@ -24,11 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base; - -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; +package org.opensearch.sql.legacy.antlr.semantic.types.base; import java.util.List; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; /** * Base type interface diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/base/OpenSearchDataType.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/base/OpenSearchDataType.java similarity index 90% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/base/OpenSearchDataType.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/base/OpenSearchDataType.java index 1774146780..e0629779ad 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/base/OpenSearchDataType.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/base/OpenSearchDataType.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base; +package org.opensearch.sql.legacy.antlr.semantic.types.base; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.google.common.collect.ImmutableMap; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.NESTED_FIELD; +import static org.opensearch.sql.legacy.utils.StringUtils.toUpper; +import com.google.common.collect.ImmutableMap; import java.util.Map; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.NESTED_FIELD; -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils.toUpper; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; /** * Base type hierarchy based on OpenSearch data type diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/base/OpenSearchIndex.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/base/OpenSearchIndex.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/base/OpenSearchIndex.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/base/OpenSearchIndex.java index 9557e803f7..37d49621bd 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/base/OpenSearchIndex.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/base/OpenSearchIndex.java @@ -24,11 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base; - -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; +package org.opensearch.sql.legacy.antlr.semantic.types.base; import java.util.Objects; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; /** * Index type is not Enum because essentially each index is a brand new type. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/function/AggregateFunction.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/function/AggregateFunction.java similarity index 68% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/function/AggregateFunction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/function/AggregateFunction.java index a4cd2d23ac..467edbde9a 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/function/AggregateFunction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/function/AggregateFunction.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.function; +package org.opensearch.sql.legacy.antlr.semantic.types.function; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.TypeExpression; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DOUBLE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.OPENSEARCH_TYPE; +import static org.opensearch.sql.legacy.antlr.semantic.types.special.Generic.T; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.OPENSEARCH_TYPE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.special.Generic.T; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.antlr.semantic.types.TypeExpression; /** * Aggregate function diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/function/OpenSearchScalarFunction.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/function/OpenSearchScalarFunction.java similarity index 78% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/function/OpenSearchScalarFunction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/function/OpenSearchScalarFunction.java index 5127188974..5ab379440a 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/function/OpenSearchScalarFunction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/function/OpenSearchScalarFunction.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.function; +package org.opensearch.sql.legacy.antlr.semantic.types.function; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.TypeExpression; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.GEO_POINT; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.GEO_POINT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.STRING; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.antlr.semantic.types.TypeExpression; /** * OpenSearch special scalar functions diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/function/ScalarFunction.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/function/ScalarFunction.java similarity index 80% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/function/ScalarFunction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/function/ScalarFunction.java index 20213a9ad0..f55af45bad 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/function/ScalarFunction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/function/ScalarFunction.java @@ -24,19 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.function; +package org.opensearch.sql.legacy.antlr.semantic.types.function; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.TypeExpression; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DOUBLE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.OPENSEARCH_TYPE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.STRING; +import static org.opensearch.sql.legacy.antlr.semantic.types.special.Generic.T; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.OPENSEARCH_TYPE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.special.Generic.T; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.antlr.semantic.types.TypeExpression; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; /** * Scalar SQL function diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/operator/ComparisonOperator.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/operator/ComparisonOperator.java similarity index 83% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/operator/ComparisonOperator.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/operator/ComparisonOperator.java index 2274fe9ee3..41c34e0e2d 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/operator/ComparisonOperator.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/operator/ComparisonOperator.java @@ -24,14 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.operator; +package org.opensearch.sql.legacy.antlr.semantic.types.operator; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; import java.util.List; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; /** * Type for comparison operator diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/operator/JoinOperator.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/operator/JoinOperator.java similarity index 81% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/operator/JoinOperator.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/operator/JoinOperator.java index a89c041b89..28bb9e5916 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/operator/JoinOperator.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/operator/JoinOperator.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.operator; +package org.opensearch.sql.legacy.antlr.semantic.types.operator; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; import java.util.List; import java.util.Optional; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex; /** * Join operator diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/operator/SetOperator.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/operator/SetOperator.java similarity index 87% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/operator/SetOperator.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/operator/SetOperator.java index 0cf68af3bc..2fae7f320a 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/operator/SetOperator.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/operator/SetOperator.java @@ -24,13 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.operator; +package org.opensearch.sql.legacy.antlr.semantic.types.operator; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; import java.util.List; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; /** * Set operator between queries. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/special/Generic.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/special/Generic.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/special/Generic.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/special/Generic.java index 6b7a9bcbc0..684b645ced 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/special/Generic.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/special/Generic.java @@ -24,14 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.special; - -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; +package org.opensearch.sql.legacy.antlr.semantic.types.special; import java.util.Arrays; import java.util.List; import java.util.function.Function; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Generic type for more precise type expression diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/special/Product.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/special/Product.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/special/Product.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/special/Product.java index a29f0cdcf3..b4fbee6ac9 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/special/Product.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/types/special/Product.java @@ -24,14 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.special; - -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import lombok.Getter; +package org.opensearch.sql.legacy.antlr.semantic.types.special; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; +import lombok.Getter; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; /** * Combination of multiple types, ex. function arguments diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/visitor/OpenSearchMappingLoader.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/visitor/OpenSearchMappingLoader.java similarity index 83% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/visitor/OpenSearchMappingLoader.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/visitor/OpenSearchMappingLoader.java index 58e2babd97..58fff3da58 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/visitor/OpenSearchMappingLoader.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/visitor/OpenSearchMappingLoader.java @@ -24,28 +24,27 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.visitor; - -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope.Environment; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope.Namespace; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope.SemanticContext; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope.Symbol; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor.EarlyExitAnalysisException; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor.GenericSqlParseTreeVisitor; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping.FieldMappings; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping.IndexMappings; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; +package org.opensearch.sql.legacy.antlr.semantic.visitor; + +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.INDEX; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.NESTED_FIELD; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.INDEX; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.NESTED_FIELD; +import org.opensearch.sql.legacy.antlr.semantic.scope.Environment; +import org.opensearch.sql.legacy.antlr.semantic.scope.Namespace; +import org.opensearch.sql.legacy.antlr.semantic.scope.SemanticContext; +import org.opensearch.sql.legacy.antlr.semantic.scope.Symbol; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex; +import org.opensearch.sql.legacy.antlr.visitor.EarlyExitAnalysisException; +import org.opensearch.sql.legacy.antlr.visitor.GenericSqlParseTreeVisitor; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.esdomain.mapping.FieldMappings; +import org.opensearch.sql.legacy.esdomain.mapping.IndexMappings; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Load index and nested field mapping into semantic context diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/visitor/SemanticAnalyzer.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/visitor/SemanticAnalyzer.java similarity index 90% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/visitor/SemanticAnalyzer.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/visitor/SemanticAnalyzer.java index 7e1176d892..577cf212ac 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/visitor/SemanticAnalyzer.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/visitor/SemanticAnalyzer.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.visitor; +package org.opensearch.sql.legacy.antlr.semantic.visitor; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor.GenericSqlParseTreeVisitor; +import static org.opensearch.sql.legacy.utils.StringUtils.unquoteFullColumn; +import static org.opensearch.sql.legacy.utils.StringUtils.unquoteSingleField; import java.util.List; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils.unquoteFullColumn; -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils.unquoteSingleField; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.antlr.visitor.GenericSqlParseTreeVisitor; /** * Main visitor implementation to drive the entire semantic analysis. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/visitor/TypeChecker.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/visitor/TypeChecker.java similarity index 78% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/visitor/TypeChecker.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/visitor/TypeChecker.java index 78f70eca55..23f2e7759e 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/visitor/TypeChecker.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/semantic/visitor/TypeChecker.java @@ -24,33 +24,32 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.visitor; - -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.SimilarSymbols; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.SemanticAnalysisException; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope.Environment; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope.Namespace; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope.SemanticContext; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope.Symbol; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.TypeExpression; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.function.AggregateFunction; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.function.OpenSearchScalarFunction; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.function.ScalarFunction; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.operator.ComparisonOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.operator.JoinOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.operator.SetOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.special.Product; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor.GenericSqlParseTreeVisitor; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; -import com.google.common.collect.ImmutableList; +package org.opensearch.sql.legacy.antlr.semantic.visitor; + +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; +import com.google.common.collect.ImmutableList; import java.util.List; import java.util.Optional; import java.util.Set; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; +import org.opensearch.sql.legacy.antlr.SimilarSymbols; +import org.opensearch.sql.legacy.antlr.semantic.SemanticAnalysisException; +import org.opensearch.sql.legacy.antlr.semantic.scope.Environment; +import org.opensearch.sql.legacy.antlr.semantic.scope.Namespace; +import org.opensearch.sql.legacy.antlr.semantic.scope.SemanticContext; +import org.opensearch.sql.legacy.antlr.semantic.scope.Symbol; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.antlr.semantic.types.TypeExpression; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; +import org.opensearch.sql.legacy.antlr.semantic.types.function.AggregateFunction; +import org.opensearch.sql.legacy.antlr.semantic.types.function.OpenSearchScalarFunction; +import org.opensearch.sql.legacy.antlr.semantic.types.function.ScalarFunction; +import org.opensearch.sql.legacy.antlr.semantic.types.operator.ComparisonOperator; +import org.opensearch.sql.legacy.antlr.semantic.types.operator.JoinOperator; +import org.opensearch.sql.legacy.antlr.semantic.types.operator.SetOperator; +import org.opensearch.sql.legacy.antlr.semantic.types.special.Product; +import org.opensearch.sql.legacy.antlr.visitor.GenericSqlParseTreeVisitor; +import org.opensearch.sql.legacy.utils.StringUtils; /** * SQL semantic analyzer that determines if a syntactical correct query is meaningful. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/syntax/CaseInsensitiveCharStream.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/syntax/CaseInsensitiveCharStream.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/syntax/CaseInsensitiveCharStream.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/syntax/CaseInsensitiveCharStream.java index a7bc9f84fd..6435d8edfd 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/syntax/CaseInsensitiveCharStream.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/syntax/CaseInsensitiveCharStream.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.syntax; +package org.opensearch.sql.legacy.antlr.syntax; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/syntax/SyntaxAnalysisErrorListener.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/syntax/SyntaxAnalysisErrorListener.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/syntax/SyntaxAnalysisErrorListener.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/syntax/SyntaxAnalysisErrorListener.java index 2a00ef51ff..5dff29fbf7 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/syntax/SyntaxAnalysisErrorListener.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/syntax/SyntaxAnalysisErrorListener.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.syntax; +package org.opensearch.sql.legacy.antlr.syntax; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import org.antlr.v4.runtime.BaseErrorListener; import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.RecognitionException; import org.antlr.v4.runtime.Recognizer; import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.misc.IntervalSet; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Syntax analysis error listener that handles any syntax error by throwing exception with useful information. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/syntax/SyntaxAnalysisException.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/syntax/SyntaxAnalysisException.java similarity index 87% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/syntax/SyntaxAnalysisException.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/syntax/SyntaxAnalysisException.java index 949116eb34..bb08b1f8e5 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/syntax/SyntaxAnalysisException.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/syntax/SyntaxAnalysisException.java @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.syntax; +package org.opensearch.sql.legacy.antlr.syntax; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.SqlAnalysisException; +import org.opensearch.sql.legacy.antlr.SqlAnalysisException; /** * Exception for syntax analysis diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitor.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitor.java similarity index 72% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitor.java index 05d9715d7e..c000097e1c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitor.java @@ -24,57 +24,56 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor; - -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.InnerJoinContext; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.QuerySpecificationContext; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.SelectColumnElementContext; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.SubqueryTableItemContext; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.TableNamePatternContext; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParserBaseVisitor; -import com.google.common.base.Strings; -import org.antlr.v4.runtime.ParserRuleContext; -import org.antlr.v4.runtime.tree.ParseTree; +package org.opensearch.sql.legacy.antlr.visitor; + +import static java.util.Collections.emptyList; +import static java.util.Collections.singleton; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.AggregateWindowedFunctionContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.AtomTableItemContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.BinaryComparisonPredicateContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.BooleanLiteralContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.ComparisonOperatorContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.ConstantContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.DecimalLiteralContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.FromClauseContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.FullColumnNameContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.FunctionNameBaseContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.InPredicateContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.IsExpressionContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.MathOperatorContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.MinusSelectContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.OuterJoinContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.PredicateContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.RegexpPredicateContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.RootContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.ScalarFunctionCallContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.SelectElementsContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.SelectExpressionElementContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.SelectFunctionElementContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.SimpleTableNameContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.StringLiteralContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.TableAndTypeNameContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.TableSourceBaseContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.TableSourceItemContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.TableSourcesContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.UdfFunctionCallContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.UidContext; +import static org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.UnionSelectContext; +import com.google.common.base.Strings; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.AggregateWindowedFunctionContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.AtomTableItemContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.BinaryComparisonPredicateContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.BooleanLiteralContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.ComparisonOperatorContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.ConstantContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.DecimalLiteralContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.FromClauseContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.FullColumnNameContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.FunctionNameBaseContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.InPredicateContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.IsExpressionContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.MathOperatorContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.MinusSelectContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.OuterJoinContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.PredicateContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.RegexpPredicateContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.RootContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.ScalarFunctionCallContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.SelectElementsContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.SelectExpressionElementContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.SelectFunctionElementContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.SimpleTableNameContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.StringLiteralContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.TableAndTypeNameContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.TableSourceBaseContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.TableSourceItemContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.TableSourcesContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.UdfFunctionCallContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.UidContext; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.UnionSelectContext; -import static java.util.Collections.emptyList; -import static java.util.Collections.singleton; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; +import org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser; +import org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.InnerJoinContext; +import org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.QuerySpecificationContext; +import org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.SelectColumnElementContext; +import org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.SubqueryTableItemContext; +import org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.TableNamePatternContext; +import org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParserBaseVisitor; /** * ANTLR parse tree visitor to drive the analysis process. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/EarlyExitAnalysisException.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/EarlyExitAnalysisException.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/EarlyExitAnalysisException.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/EarlyExitAnalysisException.java index 645a5b252a..7ef4e24011 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/EarlyExitAnalysisException.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/EarlyExitAnalysisException.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor; +package org.opensearch.sql.legacy.antlr.visitor; /** * Exit visitor early due to some reason. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/GenericSqlParseTreeVisitor.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/GenericSqlParseTreeVisitor.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/GenericSqlParseTreeVisitor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/GenericSqlParseTreeVisitor.java index 39161d4c5f..44d657f23d 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/GenericSqlParseTreeVisitor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/GenericSqlParseTreeVisitor.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor; +package org.opensearch.sql.legacy.antlr.visitor; import java.util.List; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/Reducible.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/Reducible.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/Reducible.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/Reducible.java index a1af4a7c7a..d62e4fd45c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/Reducible.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/Reducible.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor; +package org.opensearch.sql.legacy.antlr.visitor; import java.util.List; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/UnsupportedSemanticVerifier.java b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/UnsupportedSemanticVerifier.java similarity index 86% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/UnsupportedSemanticVerifier.java rename to legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/UnsupportedSemanticVerifier.java index 21df3358bb..c5f5abbd59 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/UnsupportedSemanticVerifier.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/UnsupportedSemanticVerifier.java @@ -24,18 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor; +package org.opensearch.sql.legacy.antlr.visitor; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlFeatureNotImplementedException; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.google.common.collect.Sets; - import java.util.Set; - -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.MathOperatorContext; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.RegexpPredicateContext; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.ScalarFunctionCallContext; +import org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser; +import org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.MathOperatorContext; +import org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.RegexpPredicateContext; +import org.opensearch.sql.legacy.antlr.parser.OpenSearchLegacySqlParser.ScalarFunctionCallContext; +import org.opensearch.sql.legacy.exception.SqlFeatureNotImplementedException; +import org.opensearch.sql.legacy.utils.StringUtils; public class UnsupportedSemanticVerifier { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/cursor/Cursor.java b/legacy/src/main/java/org/opensearch/sql/legacy/cursor/Cursor.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/cursor/Cursor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/cursor/Cursor.java index cffa1ce47d..789c820b4b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/cursor/Cursor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/cursor/Cursor.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.cursor; +package org.opensearch.sql.legacy.cursor; public interface Cursor { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/cursor/CursorType.java b/legacy/src/main/java/org/opensearch/sql/legacy/cursor/CursorType.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/cursor/CursorType.java rename to legacy/src/main/java/org/opensearch/sql/legacy/cursor/CursorType.java index 2f1d5431df..9f5bb158a9 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/cursor/CursorType.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/cursor/CursorType.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.cursor; +package org.opensearch.sql.legacy.cursor; import java.util.HashMap; import java.util.Map; @@ -61,4 +61,4 @@ public String getId() { public static CursorType getById(String id) { return LOOKUP.getOrDefault(id, NULL); } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/cursor/DefaultCursor.java b/legacy/src/main/java/org/opensearch/sql/legacy/cursor/DefaultCursor.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/cursor/DefaultCursor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/cursor/DefaultCursor.java index 68802afc83..f0a1f555d4 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/cursor/DefaultCursor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/cursor/DefaultCursor.java @@ -24,23 +24,22 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.cursor; +package org.opensearch.sql.legacy.cursor; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.Schema; import com.google.common.base.Strings; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.NonNull; -import lombok.Setter; -import org.json.JSONArray; -import org.json.JSONObject; - import java.util.Base64; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.IntStream; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.NonNull; +import lombok.Setter; +import org.json.JSONArray; +import org.json.JSONObject; +import org.opensearch.sql.legacy.executor.format.Schema; /** @@ -63,7 +62,7 @@ public class DefaultCursor implements Cursor { private static final String FIELD_ALIAS_MAP = "a"; /** To get mappings for index to check if type is date needed for - * @see com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.DateFieldFormatter */ + * @see org.opensearch.sql.legacy.executor.format.DateFieldFormatter */ @NonNull private String indexPattern; @@ -80,7 +79,7 @@ public class DefaultCursor implements Cursor { */ private long rowsLeft; - /** @see com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.SelectResultSet */ + /** @see org.opensearch.sql.legacy.executor.format.SelectResultSet */ @NonNull private Map fieldAliasMap; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/cursor/NullCursor.java b/legacy/src/main/java/org/opensearch/sql/legacy/cursor/NullCursor.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/cursor/NullCursor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/cursor/NullCursor.java index 10fdc84a45..140c731347 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/cursor/NullCursor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/cursor/NullCursor.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.cursor; +package org.opensearch.sql.legacy.cursor; /** * A placeholder Cursor implementation to work with non-paginated queries. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/ColumnTypeProvider.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/ColumnTypeProvider.java similarity index 89% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/ColumnTypeProvider.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/ColumnTypeProvider.java index 0cfdd5f5e1..d42517e57f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/ColumnTypeProvider.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/ColumnTypeProvider.java @@ -24,19 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.special.Product; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.Schema; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; - import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; +import org.opensearch.sql.legacy.antlr.semantic.types.special.Product; +import org.opensearch.sql.legacy.executor.format.Schema; /** * The definition of column type provider diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Condition.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Condition.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Condition.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/Condition.java index 119f7cb69b..845e89bc51 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Condition.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Condition.java @@ -24,19 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; import com.alibaba.druid.sql.ast.SQLExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.ChildrenType; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.NestedType; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; - import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.parser.ChildrenType; +import org.opensearch.sql.legacy.parser.NestedType; +import org.opensearch.sql.legacy.utils.StringUtils; /** * 过滤条件 diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Delete.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Delete.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Delete.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/Delete.java index b9fc893ae2..5a4f4ae90d 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Delete.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Delete.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; /** * SQL Delete statement. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Field.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Field.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Field.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/Field.java index 66aa2b28ca..eb28aa0b0c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Field.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Field.java @@ -24,14 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLAggregateOption; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.ChildrenType; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.NestedType; - import java.util.Objects; +import org.opensearch.sql.legacy.parser.ChildrenType; +import org.opensearch.sql.legacy.parser.NestedType; /** * 搜索域 diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/From.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/From.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/From.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/From.java index 8e75f66a95..b1dc833900 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/From.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/From.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; /** diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Having.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Having.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Having.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/Having.java index 1169dca0f8..55e1a165bf 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Having.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Having.java @@ -24,27 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; + +import static java.util.stream.Collectors.joining; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.bucketSelector; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.statement.SQLSelectGroupByClause; import com.alibaba.druid.util.StringUtils; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.HavingParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.NestedType; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.WhereParser; import com.google.common.collect.Iterables; -import org.opensearch.script.Script; -import org.opensearch.search.aggregations.AggregationBuilder; - import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; - -import static java.util.stream.Collectors.joining; -import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.bucketSelector; +import org.opensearch.script.Script; +import org.opensearch.search.aggregations.AggregationBuilder; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.parser.HavingParser; +import org.opensearch.sql.legacy.parser.NestedType; +import org.opensearch.sql.legacy.parser.WhereParser; /** * Domain object for HAVING clause in SQL which covers both the parsing and explain logic. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/IndexStatement.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/IndexStatement.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/IndexStatement.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/IndexStatement.java index 67804f6dd0..546b1b7804 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/IndexStatement.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/IndexStatement.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; /** * Class used to differentiate SHOW and DESCRIBE statements diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/JoinSelect.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/JoinSelect.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/JoinSelect.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/JoinSelect.java index 413d855d43..19307074a6 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/JoinSelect.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/JoinSelect.java @@ -24,12 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.Hint; - import java.util.List; +import org.opensearch.sql.legacy.domain.hints.Hint; /** * Created by Eliran on 20/8/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/KVValue.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/KVValue.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/KVValue.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/KVValue.java index b7efd4501d..87342ae64b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/KVValue.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/KVValue.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; public class KVValue implements Cloneable { public String key; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/MethodField.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/MethodField.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/MethodField.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/MethodField.java index c394951b8d..e90877335c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/MethodField.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/MethodField.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; import com.alibaba.druid.sql.ast.expr.SQLAggregateOption; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.NestedType; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; - import java.util.HashMap; import java.util.List; import java.util.Map; +import org.opensearch.sql.legacy.parser.NestedType; +import org.opensearch.sql.legacy.utils.Util; /** * 搜索域 diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Order.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Order.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Order.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/Order.java index ddcc4c9233..09119335b4 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Order.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Order.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; /** * 排序规则 diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Paramer.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Paramer.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Paramer.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/Paramer.java index 3ec5b92db2..489225f45d 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Paramer.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Paramer.java @@ -24,15 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; import com.alibaba.druid.sql.ast.expr.SQLCharExpr; import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr; import com.alibaba.druid.sql.ast.expr.SQLNumericLiteralExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import org.opensearch.common.Strings; import org.opensearch.common.xcontent.ToXContent; import org.opensearch.index.query.MatchPhraseQueryBuilder; @@ -41,10 +42,8 @@ import org.opensearch.index.query.Operator; import org.opensearch.index.query.QueryStringQueryBuilder; import org.opensearch.index.query.WildcardQueryBuilder; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.utils.Util; public class Paramer { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Query.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Query.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Query.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/Query.java index c98cffa28d..713381074c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Query.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Query.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; import java.util.ArrayList; import java.util.List; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/QueryActionRequest.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/QueryActionRequest.java similarity index 89% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/QueryActionRequest.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/QueryActionRequest.java index af98f1d2d5..896e3a0626 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/QueryActionRequest.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/QueryActionRequest.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.Format; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.legacy.executor.Format; /** * The definition of QueryActionRequest. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/QueryStatement.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/QueryStatement.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/QueryStatement.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/QueryStatement.java index 55bb6fa3da..455eb69f6a 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/QueryStatement.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/QueryStatement.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; /** * Identifier interface used to encompass Query and IndexStatements diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/ScriptMethodField.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/ScriptMethodField.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/ScriptMethodField.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/ScriptMethodField.java index f3cbd566de..02c1d6accd 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/ScriptMethodField.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/ScriptMethodField.java @@ -24,10 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; import com.alibaba.druid.sql.ast.expr.SQLAggregateOption; - import java.util.List; /** diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/SearchResult.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/SearchResult.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/SearchResult.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/SearchResult.java index f44a2afc10..9efd7a70bf 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/SearchResult.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/SearchResult.java @@ -24,9 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; import org.opensearch.action.search.SearchResponse; import org.opensearch.common.document.DocumentField; import org.opensearch.search.SearchHit; @@ -40,14 +46,7 @@ import org.opensearch.search.aggregations.metrics.InternalNumericMetricsAggregation; import org.opensearch.search.aggregations.metrics.InternalTopHits; import org.opensearch.search.aggregations.metrics.InternalValueCount; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Optional; +import org.opensearch.sql.legacy.exception.SqlParseException; public class SearchResult { /** diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Select.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Select.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Select.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/Select.java index 7dd33990f7..f334d05c68 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Select.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Select.java @@ -24,18 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.Hint; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.SubQueryExpression; -import com.google.common.collect.ImmutableSet; +import static com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType; +import static org.opensearch.sql.legacy.domain.Field.STAR; +import com.google.common.collect.ImmutableSet; import java.util.ArrayList; import java.util.List; import java.util.Set; - -import static com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType; -import static com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field.STAR; +import org.opensearch.sql.legacy.domain.hints.Hint; +import org.opensearch.sql.legacy.parser.SubQueryExpression; /** diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/TableOnJoinSelect.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/TableOnJoinSelect.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/TableOnJoinSelect.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/TableOnJoinSelect.java index c603b0604c..6810034412 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/TableOnJoinSelect.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/TableOnJoinSelect.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; import java.util.List; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Where.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Where.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Where.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/Where.java index 4f27aae1fc..4ef92dd337 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/Where.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Where.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain; +package org.opensearch.sql.legacy.domain; import java.util.LinkedList; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/bucketpath/BucketPath.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/bucketpath/BucketPath.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/bucketpath/BucketPath.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/bucketpath/BucketPath.java index 22d0c29191..5219a6a03f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/bucketpath/BucketPath.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/bucketpath/BucketPath.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain.bucketpath; +package org.opensearch.sql.legacy.domain.bucketpath; import java.util.ArrayDeque; import java.util.Deque; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/bucketpath/Path.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/bucketpath/Path.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/bucketpath/Path.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/bucketpath/Path.java index 70b2033a0e..b656c4f06b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/bucketpath/Path.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/bucketpath/Path.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain.bucketpath; +package org.opensearch.sql.legacy.domain.bucketpath; public class Path { private final String path; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/hints/Hint.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/hints/Hint.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/hints/Hint.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/hints/Hint.java index 58a9bd2ad3..a189e285ac 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/hints/Hint.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/hints/Hint.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints; +package org.opensearch.sql.legacy.domain.hints; /** * Created by Eliran on 5/9/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/hints/HintFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/hints/HintFactory.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/hints/HintFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/hints/HintFactory.java index b5f03aa8a3..050c494fb6 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/hints/HintFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/hints/HintFactory.java @@ -24,20 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints; +package org.opensearch.sql.legacy.domain.hints; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.fasterxml.jackson.dataformat.yaml.YAMLParser; -import org.opensearch.common.xcontent.LoggingDeprecationHandler; -import org.opensearch.common.xcontent.NamedXContentRegistry; -import org.opensearch.common.xcontent.yaml.YamlXContentParser; - import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; +import org.opensearch.common.xcontent.LoggingDeprecationHandler; +import org.opensearch.common.xcontent.NamedXContentRegistry; +import org.opensearch.common.xcontent.yaml.YamlXContentParser; +import org.opensearch.sql.legacy.exception.SqlParseException; /** * Created by Eliran on 5/9/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/hints/HintType.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/hints/HintType.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/hints/HintType.java rename to legacy/src/main/java/org/opensearch/sql/legacy/domain/hints/HintType.java index 7d4d9289be..db94c28486 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/domain/hints/HintType.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/hints/HintType.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints; +package org.opensearch.sql.legacy.domain.hints; /** * Created by Eliran on 29/8/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/LocalClusterState.java b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/LocalClusterState.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/LocalClusterState.java rename to legacy/src/main/java/org/opensearch/sql/legacy/esdomain/LocalClusterState.java index 554b8ddfb4..a4b4332192 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/LocalClusterState.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/LocalClusterState.java @@ -24,22 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.esdomain; +package org.opensearch.sql.legacy.esdomain; + +import static org.opensearch.common.settings.Settings.EMPTY; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping.IndexMappings; -import com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.opensearch.action.support.IndicesOptions; -import org.opensearch.cluster.ClusterState; -import org.opensearch.cluster.metadata.IndexNameExpressionResolver; -import org.opensearch.cluster.service.ClusterService; -import org.opensearch.common.collect.Tuple; -import org.opensearch.common.settings.Setting; -import org.opensearch.index.IndexNotFoundException; - import java.io.IOException; import java.util.Arrays; import java.util.List; @@ -49,8 +39,17 @@ import java.util.concurrent.ExecutionException; import java.util.function.Function; import java.util.function.Predicate; - -import static org.opensearch.common.settings.Settings.EMPTY; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.collect.Tuple; +import org.opensearch.common.settings.Setting; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.sql.legacy.esdomain.mapping.IndexMappings; +import org.opensearch.sql.legacy.plugin.SqlSettings; /** * Local cluster state information which may be stale but help avoid blocking operation in NIO thread. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/OpenSearchClient.java b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/OpenSearchClient.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/OpenSearchClient.java rename to legacy/src/main/java/org/opensearch/sql/legacy/esdomain/OpenSearchClient.java index a2fe571844..3407628f02 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/OpenSearchClient.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/OpenSearchClient.java @@ -24,19 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.esdomain; +package org.opensearch.sql.legacy.esdomain; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.BackOffRetryStrategy; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.IntStream; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.action.search.MultiSearchRequest; import org.opensearch.action.search.MultiSearchResponse; import org.opensearch.client.Client; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; -import java.util.stream.IntStream; +import org.opensearch.sql.legacy.query.join.BackOffRetryStrategy; public class OpenSearchClient { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/FieldMapping.java b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMapping.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/FieldMapping.java rename to legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMapping.java index 2b0d79d6be..53a0339fb2 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/FieldMapping.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMapping.java @@ -24,17 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.DescribeResultSet; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; - -import java.util.Map; +package org.opensearch.sql.legacy.esdomain.mapping; import static java.util.Collections.emptyMap; import static org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsResponse.FieldMappingMetadata; +import java.util.Map; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.executor.format.DescribeResultSet; +import org.opensearch.sql.legacy.utils.StringUtils; + /** * Field mapping that parses native OpenSearch mapping. *

diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/FieldMappings.java b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMappings.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/FieldMappings.java rename to legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMappings.java index a1ba6711ec..68dcdd6378 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/FieldMappings.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMappings.java @@ -24,16 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping; - -import org.opensearch.cluster.metadata.MappingMetadata; -import org.json.JSONObject; +package org.opensearch.sql.legacy.esdomain.mapping; import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.function.BiConsumer; +import org.json.JSONObject; +import org.opensearch.cluster.metadata.MappingMetadata; /** * Field mappings in a specific type. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/IndexMappings.java b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/IndexMappings.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/IndexMappings.java rename to legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/IndexMappings.java index 3fe9538ce2..1f5b225fee 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/IndexMappings.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/IndexMappings.java @@ -24,16 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping; +package org.opensearch.sql.legacy.esdomain.mapping; -import org.opensearch.cluster.metadata.MappingMetadata; -import org.opensearch.cluster.metadata.Metadata; -import org.opensearch.common.collect.ImmutableOpenMap; +import static java.util.Collections.emptyMap; import java.util.Map; import java.util.Objects; - -import static java.util.Collections.emptyMap; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.common.collect.ImmutableOpenMap; /** * Index mappings in the cluster. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/Mappings.java b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/Mappings.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/Mappings.java rename to legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/Mappings.java index 5aa66444aa..cbbb10ce7d 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/Mappings.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/Mappings.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping; +package org.opensearch.sql.legacy.esdomain.mapping; import com.carrotsearch.hppc.cursors.ObjectObjectCursor; import com.google.common.collect.ImmutableMap; -import org.opensearch.common.collect.ImmutableOpenMap; - import java.util.Collection; import java.util.Map; import java.util.function.Function; +import org.opensearch.common.collect.ImmutableOpenMap; /** * Mappings interface to provide default implementation (minimal set of Map methods) for subclass in hierarchy. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/TypeMappings.java b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/TypeMappings.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/TypeMappings.java rename to legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/TypeMappings.java index 98f19713e8..5a8c1f9671 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/TypeMappings.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/TypeMappings.java @@ -24,13 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping; - -import org.opensearch.cluster.metadata.MappingMetadata; -import org.opensearch.common.collect.ImmutableOpenMap; +package org.opensearch.sql.legacy.esdomain.mapping; import java.util.Map; import java.util.Objects; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.common.collect.ImmutableOpenMap; /** * Type mappings in a specific index. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/exception/SQLFeatureDisabledException.java b/legacy/src/main/java/org/opensearch/sql/legacy/exception/SQLFeatureDisabledException.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/exception/SQLFeatureDisabledException.java rename to legacy/src/main/java/org/opensearch/sql/legacy/exception/SQLFeatureDisabledException.java index f05697e88e..41decc0492 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/exception/SQLFeatureDisabledException.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/exception/SQLFeatureDisabledException.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.exception; +package org.opensearch.sql.legacy.exception; public class SQLFeatureDisabledException extends Exception { @@ -34,4 +34,4 @@ public SQLFeatureDisabledException(String message) { super(message); } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/exception/SqlFeatureNotImplementedException.java b/legacy/src/main/java/org/opensearch/sql/legacy/exception/SqlFeatureNotImplementedException.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/exception/SqlFeatureNotImplementedException.java rename to legacy/src/main/java/org/opensearch/sql/legacy/exception/SqlFeatureNotImplementedException.java index 95d34fd655..0ce903872b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/exception/SqlFeatureNotImplementedException.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/exception/SqlFeatureNotImplementedException.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.exception; +package org.opensearch.sql.legacy.exception; /** * Intended for cases when we knowingly omitted some case, letting users know that we didn't implemented feature, but diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/exception/SqlParseException.java b/legacy/src/main/java/org/opensearch/sql/legacy/exception/SqlParseException.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/exception/SqlParseException.java rename to legacy/src/main/java/org/opensearch/sql/legacy/exception/SqlParseException.java index b618129132..3c6235007f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/exception/SqlParseException.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/exception/SqlParseException.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.exception; +package org.opensearch.sql.legacy.exception; public class SqlParseException extends Exception { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/ActionRequestRestExecutorFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ActionRequestRestExecutorFactory.java similarity index 80% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/ActionRequestRestExecutorFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/ActionRequestRestExecutorFactory.java index 28d47c7414..e3a4518c74 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/ActionRequestRestExecutorFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ActionRequestRestExecutorFactory.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor; +package org.opensearch.sql.legacy.executor; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.csv.CSVResultRestExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.PrettyFormatRestExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.OpenSearchJoinQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.multi.MultiQueryAction; +import org.opensearch.sql.legacy.executor.csv.CSVResultRestExecutor; +import org.opensearch.sql.legacy.executor.format.PrettyFormatRestExecutor; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.query.join.OpenSearchJoinQueryAction; +import org.opensearch.sql.legacy.query.multi.MultiQueryAction; /** * Created by Eliran on 26/12/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/AsyncRestExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/AsyncRestExecutor.java similarity index 90% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/AsyncRestExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/AsyncRestExecutor.java index c09bd65391..2484335f2f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/AsyncRestExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/AsyncRestExecutor.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor; - -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.BackOffRetryStrategy; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.LogUtils; +package org.opensearch.sql.legacy.executor; + +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_SLOWLOG; + +import java.io.IOException; +import java.time.Duration; +import java.util.Map; +import java.util.function.Predicate; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.OpenSearchException; @@ -41,16 +40,16 @@ import org.opensearch.rest.BytesRestResponse; import org.opensearch.rest.RestChannel; import org.opensearch.rest.RestStatus; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.metrics.MetricName; +import org.opensearch.sql.legacy.metrics.Metrics; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.query.join.BackOffRetryStrategy; +import org.opensearch.sql.legacy.utils.LogUtils; import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.Transports; -import java.io.IOException; -import java.time.Duration; -import java.util.Map; -import java.util.function.Predicate; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_SLOWLOG; - /** * A RestExecutor wrapper to execute request asynchronously to avoid blocking transport thread. */ diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/ElasticDefaultRestExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java similarity index 87% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/ElasticDefaultRestExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java index d30cc35b25..6f91126bee 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/ElasticDefaultRestExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java @@ -24,18 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor; +package org.opensearch.sql.legacy.executor; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.join.ElasticJoinExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.join.ElasticUtils; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.join.MetaSearchResult; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.multi.MultiRequestExecutorFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.SqlElasticRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.JoinRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.multi.MultiQueryRequestBuilder; import com.google.common.collect.Maps; +import java.io.IOException; +import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.action.ActionFuture; @@ -52,9 +45,15 @@ import org.opensearch.rest.RestStatus; import org.opensearch.rest.action.RestStatusToXContentListener; import org.opensearch.search.SearchHits; - -import java.io.IOException; -import java.util.Map; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.executor.join.ElasticJoinExecutor; +import org.opensearch.sql.legacy.executor.join.ElasticUtils; +import org.opensearch.sql.legacy.executor.join.MetaSearchResult; +import org.opensearch.sql.legacy.executor.multi.MultiRequestExecutorFactory; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.query.SqlElasticRequestBuilder; +import org.opensearch.sql.legacy.query.join.JoinRequestBuilder; +import org.opensearch.sql.legacy.query.multi.MultiQueryRequestBuilder; public class ElasticDefaultRestExecutor implements RestExecutor { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/ElasticHitsExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticHitsExecutor.java similarity index 88% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/ElasticHitsExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticHitsExecutor.java index 93b8a68cfa..d528d3b4ae 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/ElasticHitsExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticHitsExecutor.java @@ -24,12 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor; - -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import org.opensearch.search.SearchHits; +package org.opensearch.sql.legacy.executor; import java.io.IOException; +import org.opensearch.search.SearchHits; +import org.opensearch.sql.legacy.exception.SqlParseException; /** * Created by Eliran on 21/8/2016. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/ElasticResultHandler.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticResultHandler.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/ElasticResultHandler.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticResultHandler.java index c568f63d4f..ae590bb656 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/ElasticResultHandler.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticResultHandler.java @@ -24,11 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor; - -import org.opensearch.search.SearchHit; +package org.opensearch.sql.legacy.executor; import java.util.Map; +import org.opensearch.search.SearchHit; /** * Created by Eliran on 3/10/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/Format.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/Format.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/Format.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/Format.java index af66bb5676..e238bd76d4 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/Format.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/Format.java @@ -24,14 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor; +package org.opensearch.sql.legacy.executor; import com.google.common.collect.ImmutableMap; -import lombok.Getter; -import lombok.RequiredArgsConstructor; - import java.util.Map; import java.util.Optional; +import lombok.Getter; +import lombok.RequiredArgsConstructor; @RequiredArgsConstructor public enum Format { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/GetIndexRequestRestListener.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/GetIndexRequestRestListener.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/GetIndexRequestRestListener.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/GetIndexRequestRestListener.java index e0bff333a3..128b4bd7f4 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/GetIndexRequestRestListener.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/GetIndexRequestRestListener.java @@ -24,10 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor; +package org.opensearch.sql.legacy.executor; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.SemanticAnalysisException; import com.carrotsearch.hppc.cursors.ObjectObjectCursor; +import java.io.IOException; +import java.util.List; import org.opensearch.action.admin.indices.get.GetIndexRequest; import org.opensearch.action.admin.indices.get.GetIndexResponse; import org.opensearch.cluster.metadata.AliasMetadata; @@ -41,9 +42,7 @@ import org.opensearch.rest.RestResponse; import org.opensearch.rest.RestStatus; import org.opensearch.rest.action.RestBuilderListener; - -import java.io.IOException; -import java.util.List; +import org.opensearch.sql.legacy.antlr.semantic.SemanticAnalysisException; /** * Created by Eliran on 6/10/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/QueryActionElasticExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/QueryActionElasticExecutor.java similarity index 75% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/QueryActionElasticExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/QueryActionElasticExecutor.java index 3319c20bfe..f2dbb7bbb8 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/QueryActionElasticExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/QueryActionElasticExecutor.java @@ -24,33 +24,32 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor; +package org.opensearch.sql.legacy.executor; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.join.ElasticJoinExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.multi.MultiRequestExecutorFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.adapter.QueryPlanQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.adapter.QueryPlanRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain.BindingTuple; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.AggregationQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.DefaultQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.DeleteQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.DescribeQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.ShowQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.SqlElasticRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.SqlOpenSearchRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.OpenSearchJoinQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.multi.MultiQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.multi.MultiQueryRequestBuilder; +import java.io.IOException; +import java.util.List; import org.opensearch.action.ActionResponse; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; import org.opensearch.search.SearchHits; import org.opensearch.search.aggregations.Aggregations; - -import java.io.IOException; -import java.util.List; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.executor.adapter.QueryPlanQueryAction; +import org.opensearch.sql.legacy.executor.adapter.QueryPlanRequestBuilder; +import org.opensearch.sql.legacy.executor.join.ElasticJoinExecutor; +import org.opensearch.sql.legacy.executor.multi.MultiRequestExecutorFactory; +import org.opensearch.sql.legacy.expression.domain.BindingTuple; +import org.opensearch.sql.legacy.query.AggregationQueryAction; +import org.opensearch.sql.legacy.query.DefaultQueryAction; +import org.opensearch.sql.legacy.query.DeleteQueryAction; +import org.opensearch.sql.legacy.query.DescribeQueryAction; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.query.ShowQueryAction; +import org.opensearch.sql.legacy.query.SqlElasticRequestBuilder; +import org.opensearch.sql.legacy.query.SqlOpenSearchRequestBuilder; +import org.opensearch.sql.legacy.query.join.OpenSearchJoinQueryAction; +import org.opensearch.sql.legacy.query.multi.MultiQueryAction; +import org.opensearch.sql.legacy.query.multi.MultiQueryRequestBuilder; /** * Created by Eliran on 3/10/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/RestExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/RestExecutor.java similarity index 90% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/RestExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/RestExecutor.java index b3be61e316..d847ac0287 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/RestExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/RestExecutor.java @@ -24,13 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor; +package org.opensearch.sql.legacy.executor; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; +import java.util.Map; import org.opensearch.client.Client; import org.opensearch.rest.RestChannel; - -import java.util.Map; +import org.opensearch.sql.legacy.query.QueryAction; /** * Created by Eliran on 26/12/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/adapter/QueryPlanQueryAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanQueryAction.java similarity index 88% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/adapter/QueryPlanQueryAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanQueryAction.java index 792c2db5dd..235984becc 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/adapter/QueryPlanQueryAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanQueryAction.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.adapter; +package org.opensearch.sql.legacy.executor.adapter; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.SqlElasticRequestBuilder; import com.google.common.base.Strings; - import java.util.List; import java.util.Optional; import java.util.stream.Collectors; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.query.SqlElasticRequestBuilder; /** * The definition of QueryPlan of QueryAction which works as the adapter to the current QueryAction framework. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java similarity index 81% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java index 3b1b9f1f77..44144cb6e4 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java @@ -24,18 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.adapter; +package org.opensearch.sql.legacy.executor.adapter; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain.BindingTuple; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.ColumnNode; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.BindingTupleQueryPlanner; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.SqlElasticRequestBuilder; +import java.util.List; import lombok.RequiredArgsConstructor; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; import org.opensearch.action.ActionResponse; - -import java.util.List; +import org.opensearch.sql.legacy.expression.domain.BindingTuple; +import org.opensearch.sql.legacy.query.SqlElasticRequestBuilder; +import org.opensearch.sql.legacy.query.planner.core.BindingTupleQueryPlanner; +import org.opensearch.sql.legacy.query.planner.core.ColumnNode; /** * The definition of QueryPlan SqlElasticRequestBuilder. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CSVResult.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/csv/CSVResult.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CSVResult.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/csv/CSVResult.java index 7918222330..fceb0690d4 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CSVResult.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/csv/CSVResult.java @@ -24,10 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.csv; +package org.opensearch.sql.legacy.executor.csv; import com.google.common.collect.ImmutableSet; - import java.util.ArrayList; import java.util.List; import java.util.Set; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CSVResultRestExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/csv/CSVResultRestExecutor.java similarity index 89% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CSVResultRestExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/csv/CSVResultRestExecutor.java index e1a8d30cd7..fab4fcfac3 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CSVResultRestExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/csv/CSVResultRestExecutor.java @@ -24,20 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.csv; +package org.opensearch.sql.legacy.executor.csv; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.QueryActionElasticExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.RestExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.BackOffRetryStrategy; import com.google.common.base.Joiner; +import java.util.List; +import java.util.Map; import org.opensearch.client.Client; import org.opensearch.rest.BytesRestResponse; import org.opensearch.rest.RestChannel; import org.opensearch.rest.RestStatus; - -import java.util.List; -import java.util.Map; +import org.opensearch.sql.legacy.executor.QueryActionElasticExecutor; +import org.opensearch.sql.legacy.executor.RestExecutor; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.query.join.BackOffRetryStrategy; /** * Created by Eliran on 26/12/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CSVResultsExtractor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/csv/CSVResultsExtractor.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CSVResultsExtractor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/csv/CSVResultsExtractor.java index bf5f119bb9..ab64986dc3 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CSVResultsExtractor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/csv/CSVResultsExtractor.java @@ -24,11 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.csv; +package org.opensearch.sql.legacy.executor.csv; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain.BindingTuple; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; import org.opensearch.common.document.DocumentField; import org.opensearch.search.SearchHit; import org.opensearch.search.SearchHits; @@ -43,14 +47,9 @@ import org.opensearch.search.aggregations.metrics.Percentiles; import org.opensearch.search.aggregations.metrics.Stats; import org.opensearch.search.aggregations.metrics.TopHits; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; +import org.opensearch.sql.legacy.expression.domain.BindingTuple; +import org.opensearch.sql.legacy.expression.model.ExprValue; +import org.opensearch.sql.legacy.utils.Util; /** * Created by Eliran on 27/12/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CsvExtractorException.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/csv/CsvExtractorException.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CsvExtractorException.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/csv/CsvExtractorException.java index c86e99ab7a..ef97faf5e5 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CsvExtractorException.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/csv/CsvExtractorException.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.csv; +package org.opensearch.sql.legacy.executor.csv; /** * Created by Eliran on 29/12/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorActionRequestRestExecutorFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorActionRequestRestExecutorFactory.java similarity index 91% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorActionRequestRestExecutorFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorActionRequestRestExecutorFactory.java index 65d65b9232..1cdfa248d1 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorActionRequestRestExecutorFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorActionRequestRestExecutorFactory.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.cursor; +package org.opensearch.sql.legacy.executor.cursor; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.Format; import org.opensearch.rest.RestRequest; +import org.opensearch.sql.legacy.executor.Format; public class CursorActionRequestRestExecutorFactory { @@ -43,4 +43,4 @@ public static CursorAsyncRestExecutor createExecutor(RestRequest request, String private static boolean isCursorCloseRequest(final RestRequest request) { return request.path().endsWith("/_sql/close"); } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorAsyncRestExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorAsyncRestExecutor.java similarity index 89% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorAsyncRestExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorAsyncRestExecutor.java index c79f6815ec..1c956d3842 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorAsyncRestExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorAsyncRestExecutor.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.cursor; +package org.opensearch.sql.legacy.executor.cursor; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.BackOffRetryStrategy; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.LogUtils; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_SLOWLOG; + +import java.io.IOException; +import java.time.Duration; +import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.client.Client; @@ -38,14 +38,13 @@ import org.opensearch.rest.BytesRestResponse; import org.opensearch.rest.RestChannel; import org.opensearch.rest.RestStatus; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.metrics.MetricName; +import org.opensearch.sql.legacy.metrics.Metrics; +import org.opensearch.sql.legacy.query.join.BackOffRetryStrategy; +import org.opensearch.sql.legacy.utils.LogUtils; import org.opensearch.threadpool.ThreadPool; -import java.io.IOException; -import java.time.Duration; -import java.util.Map; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_SLOWLOG; - public class CursorAsyncRestExecutor { /** * Custom thread pool name managed by OpenSearch @@ -127,4 +126,4 @@ private void doExecuteWithTimeMeasured(Client client, } } } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorCloseExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorCloseExecutor.java similarity index 89% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorCloseExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorCloseExecutor.java index 87907437f7..78e5c06266 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorCloseExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorCloseExecutor.java @@ -24,25 +24,24 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.cursor; +package org.opensearch.sql.legacy.executor.cursor; -import com.amazon.opendistroforelasticsearch.sql.legacy.cursor.CursorType; -import com.amazon.opendistroforelasticsearch.sql.legacy.cursor.DefaultCursor; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm.VerificationException; +import static org.opensearch.rest.RestStatus.OK; + +import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.json.JSONException; import org.opensearch.OpenSearchException; import org.opensearch.action.search.ClearScrollResponse; import org.opensearch.client.Client; import org.opensearch.rest.BytesRestResponse; import org.opensearch.rest.RestChannel; -import org.json.JSONException; - -import java.util.Map; - -import static org.opensearch.rest.RestStatus.OK; +import org.opensearch.sql.legacy.cursor.CursorType; +import org.opensearch.sql.legacy.cursor.DefaultCursor; +import org.opensearch.sql.legacy.metrics.MetricName; +import org.opensearch.sql.legacy.metrics.Metrics; +import org.opensearch.sql.legacy.rewriter.matchtoterm.VerificationException; public class CursorCloseExecutor implements CursorRestExecutor { @@ -108,4 +107,4 @@ private String handleDefaultCursorCloseRequest(Client client, DefaultCursor curs return SUCCEEDED_FALSE; } } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorRestExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorRestExecutor.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorRestExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorRestExecutor.java index a3e0a9acdb..d4d9e8234d 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorRestExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorRestExecutor.java @@ -25,13 +25,12 @@ */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.cursor; +package org.opensearch.sql.legacy.executor.cursor; +import java.util.Map; import org.opensearch.client.Client; import org.opensearch.rest.RestChannel; -import java.util.Map; - /** * Interface to execute cursor request. */ diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorResultExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorResultExecutor.java similarity index 88% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorResultExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorResultExecutor.java index 45da00d2ec..7763dcc9d6 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/cursor/CursorResultExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/cursor/CursorResultExecutor.java @@ -24,18 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.cursor; - -import com.amazon.opendistroforelasticsearch.sql.legacy.cursor.CursorType; -import com.amazon.opendistroforelasticsearch.sql.legacy.cursor.DefaultCursor; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.Format; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.Protocol; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm.VerificationException; +package org.opensearch.sql.legacy.executor.cursor; + +import static org.opensearch.rest.RestStatus.OK; +import static org.opensearch.sql.legacy.plugin.SqlSettings.CURSOR_KEEPALIVE; + +import java.util.Arrays; +import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.json.JSONException; import org.opensearch.OpenSearchException; import org.opensearch.action.search.ClearScrollResponse; import org.opensearch.action.search.SearchResponse; @@ -45,13 +43,14 @@ import org.opensearch.rest.RestChannel; import org.opensearch.search.SearchHit; import org.opensearch.search.SearchHits; -import org.json.JSONException; - -import java.util.Arrays; -import java.util.Map; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.CURSOR_KEEPALIVE; -import static org.opensearch.rest.RestStatus.OK; +import org.opensearch.sql.legacy.cursor.CursorType; +import org.opensearch.sql.legacy.cursor.DefaultCursor; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.executor.Format; +import org.opensearch.sql.legacy.executor.format.Protocol; +import org.opensearch.sql.legacy.metrics.MetricName; +import org.opensearch.sql.legacy.metrics.Metrics; +import org.opensearch.sql.legacy.rewriter.matchtoterm.VerificationException; public class CursorResultExecutor implements CursorRestExecutor { @@ -150,4 +149,4 @@ private String handleDefaultCursorRequest(Client client, DefaultCursor cursor) { Protocol protocol = new Protocol(client, searchHits, format.name().toLowerCase(), cursor); return protocol.cursorFormat(); } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/BindingTupleResultSet.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/BindingTupleResultSet.java similarity index 86% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/BindingTupleResultSet.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/BindingTupleResultSet.java index b346b0479d..29fa97889f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/BindingTupleResultSet.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/BindingTupleResultSet.java @@ -24,20 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; +package org.opensearch.sql.legacy.executor.format; -import static com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.DateFieldFormatter.FORMAT_JDBC; +import static org.opensearch.sql.legacy.executor.format.DateFieldFormatter.FORMAT_JDBC; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain.BindingTuple; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.ColumnNode; import com.google.common.annotations.VisibleForTesting; - import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import org.opensearch.sql.legacy.expression.domain.BindingTuple; +import org.opensearch.sql.legacy.expression.model.ExprValue; +import org.opensearch.sql.legacy.query.planner.core.ColumnNode; /** * The definition of BindingTuple ResultSet. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DataRows.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DataRows.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DataRows.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DataRows.java index 5f2bbbcdad..5a838cd8ae 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DataRows.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DataRows.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; +package org.opensearch.sql.legacy.executor.format; import java.util.Iterator; import java.util.List; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DateFieldFormatter.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DateFieldFormatter.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DateFieldFormatter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DateFieldFormatter.java index d536b80442..1ee6319da1 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DateFieldFormatter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DateFieldFormatter.java @@ -24,16 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; +package org.opensearch.sql.legacy.executor.format; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping.FieldMappings; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping.TypeMappings; import com.google.common.annotations.VisibleForTesting; -import org.apache.commons.lang3.time.DateUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - import java.text.ParseException; import java.util.Arrays; import java.util.Collection; @@ -44,6 +37,12 @@ import java.util.Set; import java.util.TimeZone; import java.util.stream.Collectors; +import org.apache.commons.lang3.time.DateUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.esdomain.mapping.FieldMappings; +import org.opensearch.sql.legacy.esdomain.mapping.TypeMappings; /** * Formatter to transform date fields into a consistent format for consumption by clients. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DateFormat.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DateFormat.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DateFormat.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DateFormat.java index c14a3934c5..1f531d7ce3 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DateFormat.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DateFormat.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; +package org.opensearch.sql.legacy.executor.format; import java.time.Instant; import java.time.ZoneId; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DeleteResultSet.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DeleteResultSet.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DeleteResultSet.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DeleteResultSet.java index 1fa3b3bba2..853c36decf 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DeleteResultSet.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DeleteResultSet.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Delete; -import org.opensearch.client.Client; -import org.opensearch.index.reindex.BulkByScrollResponse; +package org.opensearch.sql.legacy.executor.format; import java.util.Collections; import java.util.List; import java.util.Map; +import org.opensearch.client.Client; +import org.opensearch.index.reindex.BulkByScrollResponse; +import org.opensearch.sql.legacy.domain.Delete; public class DeleteResultSet extends ResultSet { private Delete query; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DescribeResultSet.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DescribeResultSet.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DescribeResultSet.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DescribeResultSet.java index b335d8f46a..ee52b92013 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DescribeResultSet.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/DescribeResultSet.java @@ -24,23 +24,22 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; +package org.opensearch.sql.legacy.executor.format; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.IndexStatement; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.DataRows.Row; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.Schema.Column; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.Schema.Type; import com.carrotsearch.hppc.cursors.ObjectObjectCursor; -import org.opensearch.action.admin.indices.get.GetIndexResponse; -import org.opensearch.client.Client; -import org.opensearch.cluster.metadata.MappingMetadata; -import org.opensearch.common.collect.ImmutableOpenMap; - import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import org.opensearch.action.admin.indices.get.GetIndexResponse; +import org.opensearch.client.Client; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.sql.legacy.domain.IndexStatement; +import org.opensearch.sql.legacy.executor.format.DataRows.Row; +import org.opensearch.sql.legacy.executor.format.Schema.Column; +import org.opensearch.sql.legacy.executor.format.Schema.Type; public class DescribeResultSet extends ResultSet { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ErrorMessage.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/ErrorMessage.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ErrorMessage.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/ErrorMessage.java index 2f705a0ff0..8672442e23 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ErrorMessage.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/ErrorMessage.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; +package org.opensearch.sql.legacy.executor.format; -import org.opensearch.rest.RestStatus; import org.json.JSONObject; +import org.opensearch.rest.RestStatus; public class ErrorMessage { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ErrorMessageFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/ErrorMessageFactory.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ErrorMessageFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/ErrorMessageFactory.java index 8fb42846d8..9b0c0e597c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ErrorMessageFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/ErrorMessageFactory.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; +package org.opensearch.sql.legacy.executor.format; import org.opensearch.OpenSearchException; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/OpenSearchErrorMessage.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/OpenSearchErrorMessage.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/OpenSearchErrorMessage.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/OpenSearchErrorMessage.java index fd835fc2a1..2dee3017b9 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/OpenSearchErrorMessage.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/OpenSearchErrorMessage.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; +package org.opensearch.sql.legacy.executor.format; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import org.opensearch.OpenSearchException; import org.opensearch.action.search.SearchPhaseExecutionException; import org.opensearch.action.search.ShardSearchFailure; +import org.opensearch.sql.legacy.utils.StringUtils; public class OpenSearchErrorMessage extends ErrorMessage { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/PrettyFormatRestExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/PrettyFormatRestExecutor.java similarity index 86% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/PrettyFormatRestExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/PrettyFormatRestExecutor.java index 542d17121f..f027570ffa 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/PrettyFormatRestExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/PrettyFormatRestExecutor.java @@ -24,27 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; - -import com.amazon.opendistroforelasticsearch.sql.legacy.cursor.Cursor; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.QueryActionElasticExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.RestExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.cursor.DefaultCursor; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.DefaultQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.BackOffRetryStrategy; +package org.opensearch.sql.legacy.executor.format; + +import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.opensearch.action.search.SearchResponse; import org.opensearch.OpenSearchException; +import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; import org.opensearch.common.Strings; import org.opensearch.rest.BytesRestResponse; import org.opensearch.rest.RestChannel; import org.opensearch.rest.RestStatus; - -import java.util.Map; +import org.opensearch.sql.legacy.cursor.Cursor; +import org.opensearch.sql.legacy.cursor.DefaultCursor; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.executor.QueryActionElasticExecutor; +import org.opensearch.sql.legacy.executor.RestExecutor; +import org.opensearch.sql.legacy.query.DefaultQueryAction; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.query.join.BackOffRetryStrategy; public class PrettyFormatRestExecutor implements RestExecutor { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/Protocol.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/Protocol.java similarity index 86% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/Protocol.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/Protocol.java index e55804dd6d..0f50e44cd3 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/Protocol.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/Protocol.java @@ -24,35 +24,32 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.ColumnTypeProvider; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Delete; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.IndexStatement; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Query; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.QueryStatement; -import com.amazon.opendistroforelasticsearch.sql.legacy.cursor.Cursor; -import com.amazon.opendistroforelasticsearch.sql.legacy.cursor.NullCursor; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.DataRows.Row; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.Schema.Column; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.adapter.QueryPlanQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.adapter.QueryPlanRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain.BindingTuple; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.DefaultQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; +package org.opensearch.sql.legacy.executor.format; -import com.google.common.base.Strings; - -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.ColumnNode; +import static org.opensearch.sql.legacy.domain.IndexStatement.StatementType; -import org.opensearch.client.Client; -import org.json.JSONArray; -import org.json.JSONObject; +import com.google.common.base.Strings; import java.util.List; import java.util.stream.Collectors; import java.util.stream.StreamSupport; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.domain.IndexStatement.StatementType; +import org.json.JSONArray; +import org.json.JSONObject; +import org.opensearch.client.Client; +import org.opensearch.sql.legacy.cursor.Cursor; +import org.opensearch.sql.legacy.cursor.NullCursor; +import org.opensearch.sql.legacy.domain.ColumnTypeProvider; +import org.opensearch.sql.legacy.domain.Delete; +import org.opensearch.sql.legacy.domain.IndexStatement; +import org.opensearch.sql.legacy.domain.Query; +import org.opensearch.sql.legacy.domain.QueryStatement; +import org.opensearch.sql.legacy.executor.adapter.QueryPlanQueryAction; +import org.opensearch.sql.legacy.executor.adapter.QueryPlanRequestBuilder; +import org.opensearch.sql.legacy.executor.format.DataRows.Row; +import org.opensearch.sql.legacy.executor.format.Schema.Column; +import org.opensearch.sql.legacy.expression.domain.BindingTuple; +import org.opensearch.sql.legacy.query.DefaultQueryAction; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.query.planner.core.ColumnNode; public class Protocol { @@ -267,4 +264,4 @@ private JSONArray dataEntry(Row dataRow, Schema schema) { } return entry; } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ResultSet.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/ResultSet.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ResultSet.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/ResultSet.java index d9f783f3ce..bbc62b2e5d 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ResultSet.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/ResultSet.java @@ -24,12 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; - -import org.opensearch.client.Client; +package org.opensearch.sql.legacy.executor.format; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.opensearch.client.Client; public abstract class ResultSet { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/Schema.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/Schema.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/Schema.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/Schema.java index c3d387bb30..853ed261dd 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/Schema.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/Schema.java @@ -24,17 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; +package org.opensearch.sql.legacy.executor.format; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.IndexStatement; +import static java.util.Collections.unmodifiableList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.stream.Collectors; - -import static java.util.Collections.unmodifiableList; +import org.opensearch.sql.legacy.domain.IndexStatement; public class Schema implements Iterable { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/SelectResultSet.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/SelectResultSet.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/SelectResultSet.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/SelectResultSet.java index 06e3482140..1013b1b7fb 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/SelectResultSet.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/SelectResultSet.java @@ -24,27 +24,27 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; +package org.opensearch.sql.legacy.executor.format; + +import static java.util.Collections.unmodifiableMap; +import static java.util.stream.Collectors.toSet; +import static org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsResponse.FieldMappingMetadata; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLCaseExpr; import com.alibaba.druid.sql.ast.expr.SQLCastExpr; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.ColumnTypeProvider; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.JoinSelect; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.MethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Query; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.TableOnJoinSelect; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping.FieldMapping; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlFeatureNotImplementedException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.Format; -import com.amazon.opendistroforelasticsearch.sql.legacy.cursor.Cursor; -import com.amazon.opendistroforelasticsearch.sql.legacy.cursor.DefaultCursor; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.SQLFunctions; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsRequest; @@ -61,22 +61,21 @@ import org.opensearch.search.aggregations.metrics.NumericMetricsAggregation; import org.opensearch.search.aggregations.metrics.Percentile; import org.opensearch.search.aggregations.metrics.Percentiles; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; -import java.util.stream.StreamSupport; - -import static java.util.Collections.unmodifiableMap; -import static java.util.stream.Collectors.toSet; -import static org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsResponse.FieldMappingMetadata; +import org.opensearch.sql.legacy.cursor.Cursor; +import org.opensearch.sql.legacy.cursor.DefaultCursor; +import org.opensearch.sql.legacy.domain.ColumnTypeProvider; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.JoinSelect; +import org.opensearch.sql.legacy.domain.MethodField; +import org.opensearch.sql.legacy.domain.Query; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.TableOnJoinSelect; +import org.opensearch.sql.legacy.esdomain.mapping.FieldMapping; +import org.opensearch.sql.legacy.exception.SqlFeatureNotImplementedException; +import org.opensearch.sql.legacy.executor.Format; +import org.opensearch.sql.legacy.metrics.MetricName; +import org.opensearch.sql.legacy.metrics.Metrics; +import org.opensearch.sql.legacy.utils.SQLFunctions; public class SelectResultSet extends ResultSet { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ShowResultSet.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/ShowResultSet.java similarity index 89% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ShowResultSet.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/format/ShowResultSet.java index b746da443f..ad4997335f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ShowResultSet.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/ShowResultSet.java @@ -24,14 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.IndexStatement; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.DataRows.Row; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.Schema.Column; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.Schema.Type; -import org.opensearch.action.admin.indices.get.GetIndexResponse; -import org.opensearch.client.Client; +package org.opensearch.sql.legacy.executor.format; import java.util.ArrayList; import java.util.Arrays; @@ -39,6 +32,12 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import org.opensearch.action.admin.indices.get.GetIndexResponse; +import org.opensearch.client.Client; +import org.opensearch.sql.legacy.domain.IndexStatement; +import org.opensearch.sql.legacy.executor.format.DataRows.Row; +import org.opensearch.sql.legacy.executor.format.Schema.Column; +import org.opensearch.sql.legacy.executor.format.Schema.Type; public class ShowResultSet extends ResultSet { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/ElasticJoinExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/ElasticJoinExecutor.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/ElasticJoinExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/join/ElasticJoinExecutor.java index 9700b2be5c..9c3cd6bfe3 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/ElasticJoinExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/ElasticJoinExecutor.java @@ -24,17 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.join; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.ElasticHitsExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.SqlElasticRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.HashJoinElasticRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.JoinRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.NestedLoopsElasticRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.TableInJoinRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.HashJoinQueryPlanRequestBuilder; +package org.opensearch.sql.legacy.executor.join; + +import java.io.IOException; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.lucene.search.TotalHits; @@ -54,14 +52,15 @@ import org.opensearch.search.SearchHits; import org.opensearch.search.sort.FieldSortBuilder; import org.opensearch.search.sort.SortOrder; - -import java.io.IOException; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.executor.ElasticHitsExecutor; +import org.opensearch.sql.legacy.query.SqlElasticRequestBuilder; +import org.opensearch.sql.legacy.query.join.HashJoinElasticRequestBuilder; +import org.opensearch.sql.legacy.query.join.JoinRequestBuilder; +import org.opensearch.sql.legacy.query.join.NestedLoopsElasticRequestBuilder; +import org.opensearch.sql.legacy.query.join.TableInJoinRequestBuilder; +import org.opensearch.sql.legacy.query.planner.HashJoinQueryPlanRequestBuilder; /** * Created by Eliran on 15/9/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/ElasticUtils.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/ElasticUtils.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/ElasticUtils.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/join/ElasticUtils.java index 450dc88d83..deb4df6241 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/ElasticUtils.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/ElasticUtils.java @@ -24,11 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.join; +package org.opensearch.sql.legacy.executor.join; + +import static org.opensearch.common.xcontent.ToXContent.EMPTY_PARAMS; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.BackOffRetryStrategy; import com.google.common.collect.ImmutableMap; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; import org.apache.lucene.search.TotalHits.Relation; import org.opensearch.action.search.SearchRequestBuilder; import org.opensearch.action.search.SearchResponse; @@ -44,13 +48,8 @@ import org.opensearch.search.SearchHits; import org.opensearch.search.sort.FieldSortBuilder; import org.opensearch.search.sort.SortOrder; - -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Optional; - -import static org.opensearch.common.xcontent.ToXContent.EMPTY_PARAMS; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.query.join.BackOffRetryStrategy; /** * Created by Eliran on 2/9/2016. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/HashJoinComparisonStructure.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/HashJoinComparisonStructure.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/HashJoinComparisonStructure.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/join/HashJoinComparisonStructure.java index 3c6a5f95bf..9ceef23720 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/HashJoinComparisonStructure.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/HashJoinComparisonStructure.java @@ -24,16 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.join; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import org.opensearch.search.SearchHit; +package org.opensearch.sql.legacy.executor.join; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; +import org.opensearch.search.SearchHit; +import org.opensearch.sql.legacy.domain.Field; /** * Created by Eliran on 2/11/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/HashJoinElasticExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/HashJoinElasticExecutor.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/HashJoinElasticExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/join/HashJoinElasticExecutor.java index 9041e05c4f..8e7acd485b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/HashJoinElasticExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/HashJoinElasticExecutor.java @@ -24,27 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.join; +package org.opensearch.sql.legacy.executor.join; import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.HashJoinElasticRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.TableInJoinRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.maker.QueryMaker; -import org.opensearch.action.search.SearchRequestBuilder; -import org.opensearch.action.search.SearchResponse; -import org.opensearch.client.Client; -import org.opensearch.common.document.DocumentField; -import org.opensearch.common.text.Text; -import org.opensearch.common.unit.TimeValue; -import org.opensearch.index.mapper.MapperService; -import org.opensearch.index.query.BoolQueryBuilder; -import org.opensearch.index.query.QueryBuilders; -import org.opensearch.search.SearchHit; - import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -55,6 +37,23 @@ import java.util.List; import java.util.Map; import java.util.Set; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.client.Client; +import org.opensearch.common.document.DocumentField; +import org.opensearch.common.text.Text; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.index.mapper.MapperService; +import org.opensearch.index.query.BoolQueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.SearchHit; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.join.HashJoinElasticRequestBuilder; +import org.opensearch.sql.legacy.query.join.TableInJoinRequestBuilder; +import org.opensearch.sql.legacy.query.maker.QueryMaker; /** * Created by Eliran on 22/8/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/MetaSearchResult.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/MetaSearchResult.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/MetaSearchResult.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/join/MetaSearchResult.java index f5c2230ece..2213987432 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/MetaSearchResult.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/MetaSearchResult.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.join; +package org.opensearch.sql.legacy.executor.join; /** * Created by Eliran on 4/9/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/NestedLoopsElasticExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/NestedLoopsElasticExecutor.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/NestedLoopsElasticExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/join/NestedLoopsElasticExecutor.java index f88cc44f91..5fed786fba 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/NestedLoopsElasticExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/NestedLoopsElasticExecutor.java @@ -24,19 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.join; +package org.opensearch.sql.legacy.executor.join; import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Condition; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.DefaultQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.BackOffRetryStrategy; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.NestedLoopsElasticRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.TableInJoinRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.maker.Maker; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.action.search.MultiSearchRequest; @@ -50,11 +44,16 @@ import org.opensearch.index.mapper.MapperService; import org.opensearch.search.SearchHit; import org.opensearch.search.SearchHits; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.opensearch.sql.legacy.domain.Condition; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.esdomain.OpenSearchClient; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.DefaultQueryAction; +import org.opensearch.sql.legacy.query.join.BackOffRetryStrategy; +import org.opensearch.sql.legacy.query.join.NestedLoopsElasticRequestBuilder; +import org.opensearch.sql.legacy.query.join.TableInJoinRequestBuilder; +import org.opensearch.sql.legacy.query.maker.Maker; /** * Created by Eliran on 15/9/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/QueryPlanElasticExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/QueryPlanElasticExecutor.java similarity index 88% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/QueryPlanElasticExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/join/QueryPlanElasticExecutor.java index ff593ffbef..bc8063795c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/QueryPlanElasticExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/QueryPlanElasticExecutor.java @@ -24,13 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.join; - -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.HashJoinQueryPlanRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.QueryPlanner; -import org.opensearch.search.SearchHit; +package org.opensearch.sql.legacy.executor.join; import java.util.List; +import org.opensearch.search.SearchHit; +import org.opensearch.sql.legacy.query.planner.HashJoinQueryPlanRequestBuilder; +import org.opensearch.sql.legacy.query.planner.core.QueryPlanner; /** * Executor for generic QueryPlanner execution. This executor is just acting as adaptor to integrate with diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/SearchHitsResult.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/SearchHitsResult.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/SearchHitsResult.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/join/SearchHitsResult.java index 804f9fefb2..e4fb7ae57a 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/join/SearchHitsResult.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/join/SearchHitsResult.java @@ -24,12 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.join; - -import org.opensearch.search.SearchHit; +package org.opensearch.sql.legacy.executor.join; import java.util.ArrayList; import java.util.List; +import org.opensearch.search.SearchHit; /** * Created by Eliran on 28/8/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/ComperableHitResult.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/ComperableHitResult.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/ComperableHitResult.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/ComperableHitResult.java index 745da4d2ad..9711996a9b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/ComperableHitResult.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/ComperableHitResult.java @@ -24,16 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.multi; +package org.opensearch.sql.legacy.executor.multi; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; import com.google.common.base.Joiner; -import org.opensearch.search.SearchHit; - import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import org.opensearch.search.SearchHit; +import org.opensearch.sql.legacy.utils.Util; /** * Created by Eliran on 9/9/2016. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/MinusExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/MinusExecutor.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/MinusExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/MinusExecutor.java index f9373f2791..8bef60377f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/MinusExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/MinusExecutor.java @@ -24,20 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.multi; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Condition; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.Hint; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.HintType; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.ElasticHitsExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.join.ElasticUtils; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.DefaultQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.multi.MultiQueryRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; +package org.opensearch.sql.legacy.executor.multi; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; import org.apache.lucene.search.TotalHits; import org.apache.lucene.search.TotalHits.Relation; import org.opensearch.action.search.SearchResponse; @@ -48,15 +44,18 @@ import org.opensearch.index.mapper.MapperService; import org.opensearch.search.SearchHit; import org.opensearch.search.SearchHits; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; +import org.opensearch.sql.legacy.domain.Condition; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.domain.hints.Hint; +import org.opensearch.sql.legacy.domain.hints.HintType; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.executor.ElasticHitsExecutor; +import org.opensearch.sql.legacy.executor.join.ElasticUtils; +import org.opensearch.sql.legacy.query.DefaultQueryAction; +import org.opensearch.sql.legacy.query.multi.MultiQueryRequestBuilder; +import org.opensearch.sql.legacy.utils.Util; /** diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/MinusOneFieldAndOptimizationResult.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/MinusOneFieldAndOptimizationResult.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/MinusOneFieldAndOptimizationResult.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/MinusOneFieldAndOptimizationResult.java index ef1e83b2ad..dc1b4be24f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/MinusOneFieldAndOptimizationResult.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/MinusOneFieldAndOptimizationResult.java @@ -24,11 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.multi; - -import org.opensearch.search.SearchHit; +package org.opensearch.sql.legacy.executor.multi; import java.util.Set; +import org.opensearch.search.SearchHit; /** @@ -50,4 +49,4 @@ public Set getFieldValues() { public SearchHit getSomeHit() { return someHit; } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/MultiRequestExecutorFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/MultiRequestExecutorFactory.java similarity index 82% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/MultiRequestExecutorFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/MultiRequestExecutorFactory.java index b0321d552a..10ba4fd34b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/MultiRequestExecutorFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/MultiRequestExecutorFactory.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.multi; +package org.opensearch.sql.legacy.executor.multi; import com.alibaba.druid.sql.ast.statement.SQLUnionOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.SemanticAnalysisException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.ElasticHitsExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.multi.MultiQueryRequestBuilder; import org.opensearch.client.Client; +import org.opensearch.sql.legacy.antlr.semantic.SemanticAnalysisException; +import org.opensearch.sql.legacy.executor.ElasticHitsExecutor; +import org.opensearch.sql.legacy.query.multi.MultiQueryRequestBuilder; /** * Created by Eliran on 21/8/2016. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/UnionExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/UnionExecutor.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/UnionExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/UnionExecutor.java index 21afbbb44c..0508cb7199 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/multi/UnionExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/multi/UnionExecutor.java @@ -24,11 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.multi; +package org.opensearch.sql.legacy.executor.multi; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.ElasticHitsExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.multi.MultiQueryRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import org.apache.lucene.search.TotalHits; import org.apache.lucene.search.TotalHits.Relation; import org.opensearch.action.search.SearchResponse; @@ -38,12 +40,9 @@ import org.opensearch.index.mapper.MapperService; import org.opensearch.search.SearchHit; import org.opensearch.search.SearchHits; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.opensearch.sql.legacy.executor.ElasticHitsExecutor; +import org.opensearch.sql.legacy.query.multi.MultiQueryRequestBuilder; +import org.opensearch.sql.legacy.utils.Util; /** * Created by Eliran on 21/8/2016. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/Expression.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/Expression.java similarity index 82% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/Expression.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/core/Expression.java index ca41bc512c..b7f330b6da 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/Expression.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/Expression.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.core; +package org.opensearch.sql.legacy.expression.core; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain.BindingTuple; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue; +import org.opensearch.sql.legacy.expression.domain.BindingTuple; +import org.opensearch.sql.legacy.expression.model.ExprValue; /** * The definition of the Expression. @@ -40,4 +40,4 @@ public interface Expression { * @return ExprValue */ ExprValue valueOf(BindingTuple tuple); -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/ExpressionFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/ExpressionFactory.java similarity index 59% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/ExpressionFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/core/ExpressionFactory.java index de5df87247..6b20c445c5 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/ExpressionFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/ExpressionFactory.java @@ -24,40 +24,39 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.core; +package org.opensearch.sql.legacy.expression.core; + + +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.ABS; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.ACOS; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.ADD; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.ASIN; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.ATAN; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.ATAN2; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.CBRT; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.CEIL; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.COS; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.COSH; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.DIVIDE; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.EXP; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.FLOOR; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.LN; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.LOG; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.LOG10; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.LOG2; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.MODULES; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.MULTIPLY; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.SUBTRACT; +import static org.opensearch.sql.legacy.expression.core.operator.ScalarOperation.TAN; - -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.builder.ExpressionBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.builder.ArithmeticFunctionFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain.BindingTuple; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue; import com.google.common.collect.ImmutableMap; - import java.util.List; import java.util.Map; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.ABS; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.ACOS; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.ADD; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.ASIN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.ATAN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.ATAN2; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.CBRT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.CEIL; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.COS; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.COSH; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.DIVIDE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.EXP; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.FLOOR; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.LN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.LOG; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.LOG10; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.LOG2; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.MODULES; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.MULTIPLY; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.SUBTRACT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation.TAN; +import org.opensearch.sql.legacy.expression.core.builder.ArithmeticFunctionFactory; +import org.opensearch.sql.legacy.expression.core.builder.ExpressionBuilder; +import org.opensearch.sql.legacy.expression.core.operator.ScalarOperation; +import org.opensearch.sql.legacy.expression.domain.BindingTuple; +import org.opensearch.sql.legacy.expression.model.ExprValue; /** diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/builder/ArithmeticFunctionFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/builder/ArithmeticFunctionFactory.java similarity index 92% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/builder/ArithmeticFunctionFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/core/builder/ArithmeticFunctionFactory.java index c878f032a4..e984cbc498 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/builder/ArithmeticFunctionFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/builder/ArithmeticFunctionFactory.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.builder; +package org.opensearch.sql.legacy.expression.core.builder; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.BinaryScalarOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.DoubleBinaryScalarOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.DoubleUnaryScalarOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.UnaryScalarOperator; +import org.opensearch.sql.legacy.expression.core.operator.BinaryScalarOperator; +import org.opensearch.sql.legacy.expression.core.operator.DoubleBinaryScalarOperator; +import org.opensearch.sql.legacy.expression.core.operator.DoubleUnaryScalarOperator; +import org.opensearch.sql.legacy.expression.core.operator.ScalarOperation; +import org.opensearch.sql.legacy.expression.core.operator.UnaryScalarOperator; /** * The definition of arithmetic function builder factory. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/builder/BinaryExpressionBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/builder/BinaryExpressionBuilder.java similarity index 81% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/builder/BinaryExpressionBuilder.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/core/builder/BinaryExpressionBuilder.java index 0772eee4e9..babc8b99e5 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/builder/BinaryExpressionBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/builder/BinaryExpressionBuilder.java @@ -24,16 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.builder; - -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.Expression; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain.BindingTuple; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue; -import lombok.RequiredArgsConstructor; +package org.opensearch.sql.legacy.expression.core.builder; import java.util.Arrays; import java.util.List; +import lombok.RequiredArgsConstructor; +import org.opensearch.sql.legacy.expression.core.Expression; +import org.opensearch.sql.legacy.expression.core.operator.ScalarOperator; +import org.opensearch.sql.legacy.expression.domain.BindingTuple; +import org.opensearch.sql.legacy.expression.model.ExprValue; /** * The definition of the Expression Builder which has two arguments. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/builder/ExpressionBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/builder/ExpressionBuilder.java similarity index 86% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/builder/ExpressionBuilder.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/core/builder/ExpressionBuilder.java index 16446be2e8..effac47913 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/builder/ExpressionBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/builder/ExpressionBuilder.java @@ -24,11 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.builder; - -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.Expression; +package org.opensearch.sql.legacy.expression.core.builder; import java.util.List; +import org.opensearch.sql.legacy.expression.core.Expression; /** * The definition of the {@link Expression} builder. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/builder/UnaryExpressionBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/builder/UnaryExpressionBuilder.java similarity index 81% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/builder/UnaryExpressionBuilder.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/core/builder/UnaryExpressionBuilder.java index 5c6dab2058..40c9ab96a8 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/builder/UnaryExpressionBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/builder/UnaryExpressionBuilder.java @@ -24,16 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.builder; - -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.Expression; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain.BindingTuple; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue; -import lombok.RequiredArgsConstructor; +package org.opensearch.sql.legacy.expression.core.builder; import java.util.Arrays; import java.util.List; +import lombok.RequiredArgsConstructor; +import org.opensearch.sql.legacy.expression.core.Expression; +import org.opensearch.sql.legacy.expression.core.operator.ScalarOperator; +import org.opensearch.sql.legacy.expression.domain.BindingTuple; +import org.opensearch.sql.legacy.expression.model.ExprValue; /** * The definition of the Expression Builder which has one argument. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/BinaryScalarOperator.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/BinaryScalarOperator.java similarity index 74% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/BinaryScalarOperator.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/BinaryScalarOperator.java index 183ddf2c8c..11a5f095c3 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/BinaryScalarOperator.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/BinaryScalarOperator.java @@ -24,25 +24,24 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator; +package org.opensearch.sql.legacy.expression.core.operator; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueFactory; -import com.google.common.collect.ImmutableMap; -import lombok.RequiredArgsConstructor; +import static org.opensearch.sql.legacy.expression.model.ExprValue.ExprValueKind.DOUBLE_VALUE; +import static org.opensearch.sql.legacy.expression.model.ExprValue.ExprValueKind.FLOAT_VALUE; +import static org.opensearch.sql.legacy.expression.model.ExprValue.ExprValueKind.INTEGER_VALUE; +import static org.opensearch.sql.legacy.expression.model.ExprValue.ExprValueKind.LONG_VALUE; +import static org.opensearch.sql.legacy.expression.model.ExprValueUtils.getDoubleValue; +import static org.opensearch.sql.legacy.expression.model.ExprValueUtils.getFloatValue; +import static org.opensearch.sql.legacy.expression.model.ExprValueUtils.getIntegerValue; +import static org.opensearch.sql.legacy.expression.model.ExprValueUtils.getLongValue; +import com.google.common.collect.ImmutableMap; import java.util.List; import java.util.Map; import java.util.function.BiFunction; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue.ExprValueKind.DOUBLE_VALUE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue.ExprValueKind.FLOAT_VALUE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue.ExprValueKind.INTEGER_VALUE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue.ExprValueKind.LONG_VALUE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueUtils.getDoubleValue; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueUtils.getFloatValue; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueUtils.getIntegerValue; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueUtils.getLongValue; +import lombok.RequiredArgsConstructor; +import org.opensearch.sql.legacy.expression.model.ExprValue; +import org.opensearch.sql.legacy.expression.model.ExprValueFactory; /** * Binary Scalar Operator take two {@link ExprValue} as arguments ans return one {@link ExprValue} as result. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/DoubleBinaryScalarOperator.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/DoubleBinaryScalarOperator.java similarity index 84% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/DoubleBinaryScalarOperator.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/DoubleBinaryScalarOperator.java index 736e08a539..151ce78683 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/DoubleBinaryScalarOperator.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/DoubleBinaryScalarOperator.java @@ -24,17 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator; +package org.opensearch.sql.legacy.expression.core.operator; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprDoubleValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueFactory; -import lombok.RequiredArgsConstructor; +import static org.opensearch.sql.legacy.expression.model.ExprValueUtils.getDoubleValue; import java.util.List; import java.util.function.BiFunction; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueUtils.getDoubleValue; +import lombok.RequiredArgsConstructor; +import org.opensearch.sql.legacy.expression.model.ExprDoubleValue; +import org.opensearch.sql.legacy.expression.model.ExprValue; +import org.opensearch.sql.legacy.expression.model.ExprValueFactory; /** * Double Binary Scalar Operator take two {@link ExprValue} which have double value as arguments ans return one @@ -70,4 +69,4 @@ public ExprValue apply(List exprValues) { public String name() { return op.name(); } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/DoubleUnaryScalarOperator.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/DoubleUnaryScalarOperator.java similarity index 81% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/DoubleUnaryScalarOperator.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/DoubleUnaryScalarOperator.java index 69124df1dc..e5d9256ce1 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/DoubleUnaryScalarOperator.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/DoubleUnaryScalarOperator.java @@ -24,17 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator; +package org.opensearch.sql.legacy.expression.core.operator; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprDoubleValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueFactory; -import lombok.RequiredArgsConstructor; +import static org.opensearch.sql.legacy.expression.model.ExprValueUtils.getDoubleValue; import java.util.List; import java.util.function.Function; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueUtils.getDoubleValue; +import lombok.RequiredArgsConstructor; +import org.opensearch.sql.legacy.expression.model.ExprDoubleValue; +import org.opensearch.sql.legacy.expression.model.ExprValue; +import org.opensearch.sql.legacy.expression.model.ExprValueFactory; /** * Unary Binary Scalar Operator take one {@link ExprValue} which have double value as arguments ans return one diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/ScalarOperation.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/ScalarOperation.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/ScalarOperation.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/ScalarOperation.java index 06227f6cfb..2521298a55 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/ScalarOperation.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/ScalarOperation.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator; +package org.opensearch.sql.legacy.expression.core.operator; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/ScalarOperator.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/ScalarOperator.java similarity index 88% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/ScalarOperator.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/ScalarOperator.java index 74bbfa06b8..88749199f3 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/ScalarOperator.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/ScalarOperator.java @@ -24,11 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator; - -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue; +package org.opensearch.sql.legacy.expression.core.operator; import java.util.List; +import org.opensearch.sql.legacy.expression.model.ExprValue; /** * Scalar Operator is a function has one or more arguments and return a single value. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/UnaryScalarOperator.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/UnaryScalarOperator.java similarity index 77% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/UnaryScalarOperator.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/UnaryScalarOperator.java index 77409bb26d..131d9dfec0 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/core/operator/UnaryScalarOperator.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/core/operator/UnaryScalarOperator.java @@ -24,19 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator; +package org.opensearch.sql.legacy.expression.core.operator; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueFactory; -import lombok.RequiredArgsConstructor; +import static org.opensearch.sql.legacy.expression.model.ExprValueUtils.getDoubleValue; +import static org.opensearch.sql.legacy.expression.model.ExprValueUtils.getFloatValue; +import static org.opensearch.sql.legacy.expression.model.ExprValueUtils.getIntegerValue; +import static org.opensearch.sql.legacy.expression.model.ExprValueUtils.getLongValue; import java.util.List; import java.util.function.Function; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueUtils.getDoubleValue; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueUtils.getFloatValue; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueUtils.getIntegerValue; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueUtils.getLongValue; +import lombok.RequiredArgsConstructor; +import org.opensearch.sql.legacy.expression.model.ExprValue; +import org.opensearch.sql.legacy.expression.model.ExprValueFactory; /** * Unary Scalar Operator take one {@link ExprValue} as arguments ans return one {@link ExprValue} as result. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/domain/BindingTuple.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/domain/BindingTuple.java similarity index 87% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/domain/BindingTuple.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/domain/BindingTuple.java index cc1d3a9438..019bcadc12 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/domain/BindingTuple.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/domain/BindingTuple.java @@ -24,20 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain; +package org.opensearch.sql.legacy.expression.domain; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprMissingValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueFactory; +import java.util.Map; +import java.util.stream.Collectors; import lombok.Builder; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Singular; import org.json.JSONObject; - -import java.util.Map; -import java.util.stream.Collectors; +import org.opensearch.sql.legacy.expression.model.ExprMissingValue; +import org.opensearch.sql.legacy.expression.model.ExprValue; +import org.opensearch.sql.legacy.expression.model.ExprValueFactory; /** * BindingTuple represents the a relationship between bindingName and ExprValue. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprBooleanValue.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprBooleanValue.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprBooleanValue.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprBooleanValue.java index 8037b533f5..5394403d83 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprBooleanValue.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprBooleanValue.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.model; +package org.opensearch.sql.legacy.expression.model; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprCollectionValue.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprCollectionValue.java similarity index 88% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprCollectionValue.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprCollectionValue.java index 6439046825..fe57ced312 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprCollectionValue.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprCollectionValue.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.model; +package org.opensearch.sql.legacy.expression.model; -import lombok.EqualsAndHashCode; -import lombok.RequiredArgsConstructor; +import static org.opensearch.sql.legacy.expression.model.ExprValue.ExprValueKind.COLLECTION_VALUE; import java.util.List; import java.util.stream.Collectors; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue.ExprValueKind.COLLECTION_VALUE; +import lombok.EqualsAndHashCode; +import lombok.RequiredArgsConstructor; @EqualsAndHashCode @RequiredArgsConstructor diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprDoubleValue.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprDoubleValue.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprDoubleValue.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprDoubleValue.java index 6b8cde9615..ae269ce10f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprDoubleValue.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprDoubleValue.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.model; +package org.opensearch.sql.legacy.expression.model; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprFloatValue.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprFloatValue.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprFloatValue.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprFloatValue.java index 18f7ba2465..d453c06184 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprFloatValue.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprFloatValue.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.model; +package org.opensearch.sql.legacy.expression.model; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprIntegerValue.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprIntegerValue.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprIntegerValue.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprIntegerValue.java index 07a264edab..5405a68999 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprIntegerValue.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprIntegerValue.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.model; +package org.opensearch.sql.legacy.expression.model; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprLongValue.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprLongValue.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprLongValue.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprLongValue.java index 74cc757e7a..098199bc38 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprLongValue.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprLongValue.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.model; +package org.opensearch.sql.legacy.expression.model; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprMissingValue.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprMissingValue.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprMissingValue.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprMissingValue.java index a21b332250..49870200e0 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprMissingValue.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprMissingValue.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.model; +package org.opensearch.sql.legacy.expression.model; /** * The definition of the missing value. @@ -34,4 +34,4 @@ public class ExprMissingValue implements ExprValue { public ExprValueKind kind() { return ExprValueKind.MISSING_VALUE; } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprStringValue.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprStringValue.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprStringValue.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprStringValue.java index 170efc3b08..553a2a178c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprStringValue.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprStringValue.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.model; +package org.opensearch.sql.legacy.expression.model; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprTupleValue.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprTupleValue.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprTupleValue.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprTupleValue.java index 1bcd16a5ce..1c4dd1ef6c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprTupleValue.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprTupleValue.java @@ -24,13 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.model; - -import lombok.EqualsAndHashCode; -import lombok.RequiredArgsConstructor; +package org.opensearch.sql.legacy.expression.model; import java.util.Map; import java.util.stream.Collectors; +import lombok.EqualsAndHashCode; +import lombok.RequiredArgsConstructor; @EqualsAndHashCode @RequiredArgsConstructor diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprValue.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprValue.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprValue.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprValue.java index e89350cce4..10d088d763 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprValue.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprValue.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.model; +package org.opensearch.sql.legacy.expression.model; /** * The definition of the Expression Value. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprValueFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprValueFactory.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprValueFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprValueFactory.java index 76faef8d51..54b23f788c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprValueFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprValueFactory.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.model; +package org.opensearch.sql.legacy.expression.model; import java.util.ArrayList; import java.util.HashMap; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprValueUtils.java b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprValueUtils.java similarity index 84% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprValueUtils.java rename to legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprValueUtils.java index 67276b84d3..80b0942166 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/expression/model/ExprValueUtils.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/expression/model/ExprValueUtils.java @@ -24,18 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.expression.model; +package org.opensearch.sql.legacy.expression.model; -import com.google.common.annotations.VisibleForTesting; +import static org.opensearch.sql.legacy.expression.model.ExprValue.ExprValueKind.BOOLEAN_VALUE; +import static org.opensearch.sql.legacy.expression.model.ExprValue.ExprValueKind.COLLECTION_VALUE; +import static org.opensearch.sql.legacy.expression.model.ExprValue.ExprValueKind.STRING_VALUE; +import static org.opensearch.sql.legacy.expression.model.ExprValue.ExprValueKind.TUPLE_VALUE; +import com.google.common.annotations.VisibleForTesting; import java.util.List; import java.util.Map; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue.ExprValueKind.BOOLEAN_VALUE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue.ExprValueKind.COLLECTION_VALUE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue.ExprValueKind.STRING_VALUE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValue.ExprValueKind.TUPLE_VALUE; - /** * The definition of ExprValue Utils. */ diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/BasicCounter.java b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/BasicCounter.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/BasicCounter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/metrics/BasicCounter.java index f635d6f979..bede521dc9 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/BasicCounter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/BasicCounter.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.metrics; +package org.opensearch.sql.legacy.metrics; import java.util.concurrent.atomic.LongAdder; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/Counter.java b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/Counter.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/Counter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/metrics/Counter.java index 2e3eebf814..02bcd2f3e4 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/Counter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/Counter.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.metrics; +package org.opensearch.sql.legacy.metrics; public interface Counter { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/GaugeMetric.java b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/GaugeMetric.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/GaugeMetric.java rename to legacy/src/main/java/org/opensearch/sql/legacy/metrics/GaugeMetric.java index f4641ec2cb..615f4c8914 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/GaugeMetric.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/GaugeMetric.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.metrics; +package org.opensearch.sql.legacy.metrics; import java.util.function.Supplier; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/Metric.java b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/Metric.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/Metric.java rename to legacy/src/main/java/org/opensearch/sql/legacy/metrics/Metric.java index ad19b163e6..961e775b72 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/Metric.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/Metric.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.metrics; +package org.opensearch.sql.legacy.metrics; public abstract class Metric implements java.io.Serializable { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/MetricFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/MetricFactory.java similarity index 92% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/MetricFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/metrics/MetricFactory.java index 9ab323d899..2438152a39 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/MetricFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/MetricFactory.java @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.metrics; +package org.opensearch.sql.legacy.metrics; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.BackOffRetryStrategy; +import org.opensearch.sql.legacy.query.join.BackOffRetryStrategy; public class MetricFactory { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/MetricName.java b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/MetricName.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/MetricName.java rename to legacy/src/main/java/org/opensearch/sql/legacy/metrics/MetricName.java index 873f708387..bf88375e40 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/MetricName.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/MetricName.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.metrics; +package org.opensearch.sql.legacy.metrics; import com.google.common.collect.ImmutableSet; import java.util.Arrays; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/Metrics.java b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/Metrics.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/Metrics.java rename to legacy/src/main/java/org/opensearch/sql/legacy/metrics/Metrics.java index 4f28619b1d..e516b48efb 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/Metrics.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/Metrics.java @@ -24,13 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.metrics; - -import org.json.JSONObject; +package org.opensearch.sql.legacy.metrics; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ConcurrentHashMap; +import org.json.JSONObject; public class Metrics { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/NumericMetric.java b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/NumericMetric.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/NumericMetric.java rename to legacy/src/main/java/org/opensearch/sql/legacy/metrics/NumericMetric.java index 3daf7d7405..d44279460b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/NumericMetric.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/NumericMetric.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.metrics; +package org.opensearch.sql.legacy.metrics; public class NumericMetric extends Metric { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/RollingCounter.java b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/RollingCounter.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/RollingCounter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/metrics/RollingCounter.java index e94c4496a0..aa0c0dc90a 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/metrics/RollingCounter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/metrics/RollingCounter.java @@ -24,14 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.metrics; - -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings; +package org.opensearch.sql.legacy.metrics; import java.time.Clock; import java.util.concurrent.ConcurrentSkipListMap; import java.util.concurrent.atomic.LongAdder; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.plugin.SqlSettings; /** * Rolling counter. The count is refreshed every interval. In every interval the count is cumulative. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/CaseWhenParser.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/CaseWhenParser.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/CaseWhenParser.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/CaseWhenParser.java index 68d7ec190e..f650285616 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/CaseWhenParser.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/CaseWhenParser.java @@ -24,21 +24,20 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOperator; import com.alibaba.druid.sql.ast.expr.SQLCaseExpr; import com.alibaba.druid.sql.ast.expr.SQLNullExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Condition; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; import com.google.common.base.Joiner; - import java.util.ArrayList; import java.util.List; +import org.opensearch.sql.legacy.domain.Condition; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.utils.Util; /** * Created by allwefantasy on 9/3/16. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ChildrenType.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/ChildrenType.java similarity index 90% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ChildrenType.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/ChildrenType.java index a923cc8d95..6f48945c02 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ChildrenType.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/ChildrenType.java @@ -24,18 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr; import com.alibaba.druid.sql.ast.expr.SQLPropertyExpr; import com.alibaba.druid.sql.ast.expr.SQLTextLiteralExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; - import java.util.List; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.utils.Util; /** * Created by Razma Tazz on 14/04/2016. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ElasticLexer.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/ElasticLexer.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ElasticLexer.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/ElasticLexer.java index 39406660e5..cfb54ff5c5 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ElasticLexer.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/ElasticLexer.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; - -import com.alibaba.druid.sql.dialect.mysql.parser.MySqlLexer; -import com.alibaba.druid.sql.parser.ParserException; -import com.alibaba.druid.sql.parser.Token; +package org.opensearch.sql.legacy.parser; import static com.alibaba.druid.sql.parser.CharTypes.isFirstIdentifierChar; import static com.alibaba.druid.sql.parser.CharTypes.isIdentifierChar; import static com.alibaba.druid.sql.parser.LayoutCharacters.EOI; +import com.alibaba.druid.sql.dialect.mysql.parser.MySqlLexer; +import com.alibaba.druid.sql.parser.ParserException; +import com.alibaba.druid.sql.parser.Token; + /** * Created by Eliran on 18/8/2015. */ diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ElasticSqlExprParser.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/ElasticSqlExprParser.java similarity index 99% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ElasticSqlExprParser.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/ElasticSqlExprParser.java index 88e92d8d97..bb6d583da7 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ElasticSqlExprParser.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/ElasticSqlExprParser.java @@ -24,7 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; + +import static org.opensearch.sql.legacy.utils.StringUtils.isQuoted; import com.alibaba.druid.sql.ast.SQLCommentHint; import com.alibaba.druid.sql.ast.SQLDataType; @@ -69,11 +71,8 @@ import com.alibaba.druid.sql.parser.SQLSelectParser; import com.alibaba.druid.sql.parser.Token; import com.alibaba.druid.util.JdbcConstants; - import java.util.List; -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils.isQuoted; - /** * Created by Eliran on 18/8/2015. */ diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ElasticSqlSelectParser.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/ElasticSqlSelectParser.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ElasticSqlSelectParser.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/ElasticSqlSelectParser.java index 7b08642351..bf07c99321 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ElasticSqlSelectParser.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/ElasticSqlSelectParser.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.SQLSetQuantifier; @@ -47,7 +47,7 @@ import com.alibaba.druid.sql.parser.SQLExprParser; import com.alibaba.druid.sql.parser.SQLSelectParser; import com.alibaba.druid.sql.parser.Token; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlFeatureNotImplementedException; +import org.opensearch.sql.legacy.exception.SqlFeatureNotImplementedException; /** * Created by allwefantasy on 8/19/16. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/FieldMaker.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/FieldMaker.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/FieldMaker.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/FieldMaker.java index 8bc1cc0afd..09ea4e6730 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/FieldMaker.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/FieldMaker.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.SQLObject; @@ -45,21 +45,20 @@ import com.alibaba.druid.sql.ast.statement.SQLSelectGroupByClause; import com.alibaba.druid.sql.ast.statement.SQLSelectItem; import com.alibaba.druid.sql.ast.statement.SQLSelectQueryBlock; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.KVValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.MethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.ScriptMethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlFeatureNotImplementedException; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.SQLFunctions; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; import com.google.common.base.Strings; -import org.opensearch.common.collect.Tuple; - import java.util.ArrayList; import java.util.LinkedList; import java.util.List; +import org.opensearch.common.collect.Tuple; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.KVValue; +import org.opensearch.sql.legacy.domain.MethodField; +import org.opensearch.sql.legacy.domain.ScriptMethodField; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.exception.SqlFeatureNotImplementedException; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.utils.SQLFunctions; +import org.opensearch.sql.legacy.utils.Util; /** * 一些具有参数的一般在 select 函数.或者group by 函数 diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/HavingParser.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/HavingParser.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/HavingParser.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/HavingParser.java index 834d8fef45..b3bb7a6eda 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/HavingParser.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/HavingParser.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.SQLObject; @@ -35,12 +35,11 @@ import com.alibaba.druid.sql.ast.expr.SQLInListExpr; import com.alibaba.druid.sql.ast.expr.SQLNotExpr; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitorAdapter; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; - import java.util.ArrayList; import java.util.List; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.exception.SqlParseException; /** * Parse expression in the Having clause. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/NestedType.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/NestedType.java similarity index 91% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/NestedType.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/NestedType.java index 16937ec573..bea61eddff 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/NestedType.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/NestedType.java @@ -24,20 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr; import com.alibaba.druid.sql.ast.expr.SQLPropertyExpr; import com.alibaba.druid.sql.ast.expr.SQLTextLiteralExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.bucketpath.BucketPath; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.bucketpath.Path; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; - import java.util.List; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.domain.bucketpath.BucketPath; +import org.opensearch.sql.legacy.domain.bucketpath.Path; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.utils.Util; /** * Created by Eliran on 12/11/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SQLOdbcExpr.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/SQLOdbcExpr.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SQLOdbcExpr.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/SQLOdbcExpr.java index c575e23cb1..e2e81464cc 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SQLOdbcExpr.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/SQLOdbcExpr.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; import com.alibaba.druid.sql.ast.expr.SQLCharExpr; import com.alibaba.druid.sql.visitor.SQLASTVisitor; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SQLParensIdentifierExpr.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/SQLParensIdentifierExpr.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SQLParensIdentifierExpr.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/SQLParensIdentifierExpr.java index 9ebb9a80a7..5c4cf12083 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SQLParensIdentifierExpr.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/SQLParensIdentifierExpr.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ScriptFilter.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/ScriptFilter.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ScriptFilter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/ScriptFilter.java index 818258f132..e03e498dee 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/ScriptFilter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/ScriptFilter.java @@ -24,18 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; -import org.opensearch.script.ScriptType; - import java.util.HashMap; import java.util.List; import java.util.Map; +import org.opensearch.script.ScriptType; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.utils.Util; /** * Created by Eliran on 11/12/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SelectParser.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/SelectParser.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SelectParser.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/SelectParser.java index f5e47887a3..33bf266954 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SelectParser.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/SelectParser.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; /** * Created by allwefantasy on 9/2/16. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SqlParser.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/SqlParser.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SqlParser.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/SqlParser.java index c97d7f587e..bd61858484 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SqlParser.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/SqlParser.java @@ -24,7 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; + +import static org.opensearch.sql.legacy.utils.Util.NESTED_JOIN_TYPE; import com.alibaba.druid.sql.ast.SQLCommentHint; import com.alibaba.druid.sql.ast.SQLExpr; @@ -48,28 +50,25 @@ import com.alibaba.druid.sql.ast.statement.SQLUnionQuery; import com.alibaba.druid.sql.dialect.mysql.ast.expr.MySqlSelectGroupByExpr; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Condition; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Delete; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.From; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Having; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.JoinSelect; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.MethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.TableOnJoinSelect; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.Hint; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.HintFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.multi.MultiQuerySelect; - import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util.NESTED_JOIN_TYPE; +import org.opensearch.sql.legacy.domain.Condition; +import org.opensearch.sql.legacy.domain.Delete; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.From; +import org.opensearch.sql.legacy.domain.Having; +import org.opensearch.sql.legacy.domain.JoinSelect; +import org.opensearch.sql.legacy.domain.MethodField; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.TableOnJoinSelect; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.domain.hints.Hint; +import org.opensearch.sql.legacy.domain.hints.HintFactory; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.multi.MultiQuerySelect; /** diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SubQueryExpression.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/SubQueryExpression.java similarity index 92% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SubQueryExpression.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/SubQueryExpression.java index b1f84ee5dd..4ce66ea573 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SubQueryExpression.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/SubQueryExpression.java @@ -24,9 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.Select; /** * Created by Eliran on 3/10/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SubQueryParser.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/SubQueryParser.java similarity index 90% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SubQueryParser.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/SubQueryParser.java index 5bb22fcedc..7e45e1d11e 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/SubQueryParser.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/SubQueryParser.java @@ -24,25 +24,24 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.statement.SQLSelectItem; import com.alibaba.druid.sql.ast.statement.SQLSubqueryTableSource; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Condition; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Order; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; import com.google.common.base.Strings; - import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.function.Function; +import org.opensearch.sql.legacy.domain.Condition; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.Order; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.exception.SqlParseException; /** * Definition of SubQuery Parser diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/WhereParser.java b/legacy/src/main/java/org/opensearch/sql/legacy/parser/WhereParser.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/WhereParser.java rename to legacy/src/main/java/org/opensearch/sql/legacy/parser/WhereParser.java index ca33c5b034..5f88e65e96 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/parser/WhereParser.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/parser/WhereParser.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.parser; +package org.opensearch.sql.legacy.parser; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLBetweenExpr; @@ -46,23 +46,22 @@ import com.alibaba.druid.sql.ast.expr.SQLVariantRefExpr; import com.alibaba.druid.sql.ast.statement.SQLDeleteStatement; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Condition; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.KVValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.MethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.maker.Maker; -import com.amazon.opendistroforelasticsearch.sql.legacy.spatial.SpatialParamsFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.SQLFunctions; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; import com.google.common.collect.Lists; import com.google.common.collect.Sets; - import java.math.BigDecimal; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; +import org.opensearch.sql.legacy.domain.Condition; +import org.opensearch.sql.legacy.domain.KVValue; +import org.opensearch.sql.legacy.domain.MethodField; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.maker.Maker; +import org.opensearch.sql.legacy.spatial.SpatialParamsFactory; +import org.opensearch.sql.legacy.utils.SQLFunctions; +import org.opensearch.sql.legacy.utils.Util; /** * Created by allwefantasy on 9/2/16. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/OpenSearchSQLPluginConfig.java b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/OpenSearchSQLPluginConfig.java similarity index 63% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/OpenSearchSQLPluginConfig.java rename to legacy/src/main/java/org/opensearch/sql/legacy/plugin/OpenSearchSQLPluginConfig.java index ebc94b30f3..c8b736a635 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/OpenSearchSQLPluginConfig.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/OpenSearchSQLPluginConfig.java @@ -26,22 +26,22 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy.plugin; +package org.opensearch.sql.legacy.plugin; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.monitor.ResourceMonitor; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchNodeClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.executor.OpenSearchExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector.ExecutionProtector; -import com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector.OpenSearchExecutionProtector; -import com.amazon.opendistroforelasticsearch.sql.opensearch.monitor.OpenSearchMemoryHealthy; -import com.amazon.opendistroforelasticsearch.sql.opensearch.monitor.OpenSearchResourceMonitor; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.OpenSearchStorageEngine; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; import org.opensearch.client.node.NodeClient; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.monitor.ResourceMonitor; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.client.OpenSearchNodeClient; +import org.opensearch.sql.opensearch.executor.OpenSearchExecutionEngine; +import org.opensearch.sql.opensearch.executor.protector.ExecutionProtector; +import org.opensearch.sql.opensearch.executor.protector.OpenSearchExecutionProtector; +import org.opensearch.sql.opensearch.monitor.OpenSearchMemoryHealthy; +import org.opensearch.sql.opensearch.monitor.OpenSearchResourceMonitor; +import org.opensearch.sql.opensearch.storage.OpenSearchStorageEngine; +import org.opensearch.sql.storage.StorageEngine; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSQLQueryAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/RestSQLQueryAction.java similarity index 79% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSQLQueryAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/plugin/RestSQLQueryAction.java index 6ac48897ae..7ec3f50f40 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSQLQueryAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/RestSQLQueryAction.java @@ -25,31 +25,13 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy.plugin; +package org.opensearch.sql.legacy.plugin; -import static com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.QueryResponse; -import static com.amazon.opendistroforelasticsearch.sql.protocol.response.format.JsonResponseFormatter.Style.PRETTY; import static org.opensearch.rest.RestStatus.INTERNAL_SERVER_ERROR; import static org.opensearch.rest.RestStatus.OK; +import static org.opensearch.sql.executor.ExecutionEngine.QueryResponse; +import static org.opensearch.sql.protocol.response.format.JsonResponseFormatter.Style.PRETTY; -import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxCheckException; -import com.amazon.opendistroforelasticsearch.sql.common.response.ResponseListener; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.ExplainResponse; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import com.amazon.opendistroforelasticsearch.sql.opensearch.security.SecurityAccess; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.QueryResult; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.CsvResponseFormatter; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.Format; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.JdbcResponseFormatter; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.JsonResponseFormatter; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.RawResponseFormatter; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.ResponseFormatter; -import com.amazon.opendistroforelasticsearch.sql.sql.SQLService; -import com.amazon.opendistroforelasticsearch.sql.sql.config.SQLServiceConfig; -import com.amazon.opendistroforelasticsearch.sql.sql.domain.SQLQueryRequest; import java.io.IOException; import java.security.PrivilegedExceptionAction; import java.util.List; @@ -62,6 +44,24 @@ import org.opensearch.rest.RestChannel; import org.opensearch.rest.RestRequest; import org.opensearch.rest.RestStatus; +import org.opensearch.sql.common.antlr.SyntaxCheckException; +import org.opensearch.sql.common.response.ResponseListener; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.executor.ExecutionEngine.ExplainResponse; +import org.opensearch.sql.legacy.metrics.MetricName; +import org.opensearch.sql.legacy.metrics.Metrics; +import org.opensearch.sql.opensearch.security.SecurityAccess; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.protocol.response.QueryResult; +import org.opensearch.sql.protocol.response.format.CsvResponseFormatter; +import org.opensearch.sql.protocol.response.format.Format; +import org.opensearch.sql.protocol.response.format.JdbcResponseFormatter; +import org.opensearch.sql.protocol.response.format.JsonResponseFormatter; +import org.opensearch.sql.protocol.response.format.RawResponseFormatter; +import org.opensearch.sql.protocol.response.format.ResponseFormatter; +import org.opensearch.sql.sql.SQLService; +import org.opensearch.sql.sql.config.SQLServiceConfig; +import org.opensearch.sql.sql.domain.SQLQueryRequest; import org.springframework.context.annotation.AnnotationConfigApplicationContext; /** diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSqlAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/RestSqlAction.java similarity index 79% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSqlAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/plugin/RestSqlAction.java index 10bb07a967..f75bbb3899 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSqlAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/RestSqlAction.java @@ -24,47 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.plugin; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.CURSOR_ENABLED; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_ENABLED; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_SEMANTIC_SUGGESTION; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_SEMANTIC_THRESHOLD; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.SQL_ENABLED; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.SQL_NEW_ENGINE_ENABLED; +package org.opensearch.sql.legacy.plugin; + import static org.opensearch.rest.RestStatus.BAD_REQUEST; import static org.opensearch.rest.RestStatus.OK; import static org.opensearch.rest.RestStatus.SERVICE_UNAVAILABLE; +import static org.opensearch.sql.legacy.plugin.SqlSettings.CURSOR_ENABLED; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_ENABLED; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_SEMANTIC_SUGGESTION; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_ANALYSIS_SEMANTIC_THRESHOLD; +import static org.opensearch.sql.legacy.plugin.SqlSettings.SQL_ENABLED; +import static org.opensearch.sql.legacy.plugin.SqlSettings.SQL_NEW_ENGINE_ENABLED; import com.alibaba.druid.sql.parser.ParserException; -import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxCheckException; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.OpenSearchLegacySqlAnalyzer; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.SqlAnalysisConfig; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.SqlAnalysisException; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.ColumnTypeProvider; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.QueryActionRequest; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SQLFeatureDisabledException; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.ActionRequestRestExecutorFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.Format; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.RestExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.cursor.CursorActionRequestRestExecutorFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.cursor.CursorAsyncRestExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.ErrorMessageFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.request.SqlRequest; -import com.amazon.opendistroforelasticsearch.sql.legacy.request.SqlRequestFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.request.SqlRequestParam; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm.VerificationException; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.JsonPrettyFormatter; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.LogUtils; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.QueryDataAnonymizer; -import com.amazon.opendistroforelasticsearch.sql.sql.domain.SQLQueryRequest; import com.google.common.collect.ImmutableList; import java.sql.SQLFeatureNotSupportedException; import java.util.Arrays; @@ -88,6 +60,34 @@ import org.opensearch.rest.RestChannel; import org.opensearch.rest.RestRequest; import org.opensearch.rest.RestStatus; +import org.opensearch.sql.common.antlr.SyntaxCheckException; +import org.opensearch.sql.exception.SemanticCheckException; +import org.opensearch.sql.legacy.antlr.OpenSearchLegacySqlAnalyzer; +import org.opensearch.sql.legacy.antlr.SqlAnalysisConfig; +import org.opensearch.sql.legacy.antlr.SqlAnalysisException; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.domain.ColumnTypeProvider; +import org.opensearch.sql.legacy.domain.QueryActionRequest; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.exception.SQLFeatureDisabledException; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.executor.ActionRequestRestExecutorFactory; +import org.opensearch.sql.legacy.executor.Format; +import org.opensearch.sql.legacy.executor.RestExecutor; +import org.opensearch.sql.legacy.executor.cursor.CursorActionRequestRestExecutorFactory; +import org.opensearch.sql.legacy.executor.cursor.CursorAsyncRestExecutor; +import org.opensearch.sql.legacy.executor.format.ErrorMessageFactory; +import org.opensearch.sql.legacy.metrics.MetricName; +import org.opensearch.sql.legacy.metrics.Metrics; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.request.SqlRequest; +import org.opensearch.sql.legacy.request.SqlRequestFactory; +import org.opensearch.sql.legacy.request.SqlRequestParam; +import org.opensearch.sql.legacy.rewriter.matchtoterm.VerificationException; +import org.opensearch.sql.legacy.utils.JsonPrettyFormatter; +import org.opensearch.sql.legacy.utils.LogUtils; +import org.opensearch.sql.legacy.utils.QueryDataAnonymizer; +import org.opensearch.sql.sql.domain.SQLQueryRequest; public class RestSqlAction extends BaseRestHandler { @@ -113,7 +113,7 @@ public class RestSqlAction extends BaseRestHandler { private final RestSQLQueryAction newSqlQueryHandler; public RestSqlAction(Settings settings, ClusterService clusterService, - com.amazon.opendistroforelasticsearch.sql.common.setting.Settings pluginSettings) { + org.opensearch.sql.common.setting.Settings pluginSettings) { super(); this.allowExplicitIndex = MULTI_ALLOW_EXPLICIT_INDEX.get(settings); this.newSqlQueryHandler = new RestSQLQueryAction(clusterService, pluginSettings); diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSqlSettingsAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/RestSqlSettingsAction.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSqlSettingsAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/plugin/RestSqlSettingsAction.java index 485791bb7f..52690e7493 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSqlSettingsAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/RestSqlSettingsAction.java @@ -24,11 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.plugin; +package org.opensearch.sql.legacy.plugin; + +import static org.opensearch.rest.RestStatus.INTERNAL_SERVER_ERROR; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.ErrorMessageFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.LogUtils; import com.google.common.collect.ImmutableList; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.OpenSearchGenerationException; @@ -46,15 +52,8 @@ import org.opensearch.rest.RestController; import org.opensearch.rest.RestRequest; import org.opensearch.rest.action.RestToXContentListener; - -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import static org.opensearch.rest.RestStatus.INTERNAL_SERVER_ERROR; +import org.opensearch.sql.legacy.executor.format.ErrorMessageFactory; +import org.opensearch.sql.legacy.utils.LogUtils; /** * Interface to manage opensearch.sql.* cluster settings diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSqlStatsAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/RestSqlStatsAction.java similarity index 92% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSqlStatsAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/plugin/RestSqlStatsAction.java index 2f06b85f5d..609960e619 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSqlStatsAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/RestSqlStatsAction.java @@ -24,12 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.plugin; +package org.opensearch.sql.legacy.plugin; + +import static org.opensearch.rest.RestStatus.SERVICE_UNAVAILABLE; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.ErrorMessageFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.LogUtils; import com.google.common.collect.ImmutableList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.client.node.NodeClient; @@ -39,13 +42,9 @@ import org.opensearch.rest.RestController; import org.opensearch.rest.RestRequest; import org.opensearch.rest.RestStatus; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import static org.opensearch.rest.RestStatus.SERVICE_UNAVAILABLE; +import org.opensearch.sql.legacy.executor.format.ErrorMessageFactory; +import org.opensearch.sql.legacy.metrics.Metrics; +import org.opensearch.sql.legacy.utils.LogUtils; /** * Currently this interface is for node level. @@ -102,4 +101,4 @@ protected Set responseParams() { return responseParams; } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/SearchDao.java b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/SearchDao.java similarity index 83% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/SearchDao.java rename to legacy/src/main/java/org/opensearch/sql/legacy/plugin/SearchDao.java index 6dd76f04c8..7bc7829447 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/SearchDao.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/SearchDao.java @@ -24,17 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.plugin; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.QueryActionRequest; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.OpenSearchActionFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import org.opensearch.client.Client; +package org.opensearch.sql.legacy.plugin; import java.sql.SQLFeatureNotSupportedException; import java.util.HashSet; import java.util.Set; +import org.opensearch.client.Client; +import org.opensearch.sql.legacy.domain.QueryActionRequest; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.OpenSearchActionFactory; +import org.opensearch.sql.legacy.query.QueryAction; public class SearchDao { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/SqlSettings.java b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/SqlSettings.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/SqlSettings.java rename to legacy/src/main/java/org/opensearch/sql/legacy/plugin/SqlSettings.java index f272dea995..fdf2f9962c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/SqlSettings.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/plugin/SqlSettings.java @@ -24,20 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.plugin; +package org.opensearch.sql.legacy.plugin; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.Format; -import org.opensearch.common.settings.Setting; +import static java.util.Collections.unmodifiableMap; +import static org.opensearch.common.settings.Setting.Property.Dynamic; +import static org.opensearch.common.settings.Setting.Property.NodeScope; +import static org.opensearch.common.unit.TimeValue.timeValueMinutes; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - -import static java.util.Collections.unmodifiableMap; -import static org.opensearch.common.settings.Setting.Property.Dynamic; -import static org.opensearch.common.settings.Setting.Property.NodeScope; -import static org.opensearch.common.unit.TimeValue.timeValueMinutes; +import org.opensearch.common.settings.Setting; +import org.opensearch.sql.legacy.executor.Format; /** * SQL plugin settings diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/AggregationQueryAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/AggregationQueryAction.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/AggregationQueryAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/AggregationQueryAction.java index 1bf80daab1..ca8ac2fa67 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/AggregationQueryAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/AggregationQueryAction.java @@ -24,23 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query; +package org.opensearch.sql.legacy.query; import com.alibaba.druid.sql.ast.SQLExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Having; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.KVValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.MethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Order; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.ScriptMethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.Hint; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.HintType; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.maker.AggMaker; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.maker.QueryMaker; import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; import org.opensearch.action.search.SearchAction; import org.opensearch.action.search.SearchRequestBuilder; import org.opensearch.action.search.SearchType; @@ -54,10 +44,19 @@ import org.opensearch.search.aggregations.bucket.nested.ReverseNestedAggregationBuilder; import org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder; import org.opensearch.search.sort.SortOrder; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.Having; +import org.opensearch.sql.legacy.domain.KVValue; +import org.opensearch.sql.legacy.domain.MethodField; +import org.opensearch.sql.legacy.domain.Order; +import org.opensearch.sql.legacy.domain.ScriptMethodField; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.domain.hints.Hint; +import org.opensearch.sql.legacy.domain.hints.HintType; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.maker.AggMaker; +import org.opensearch.sql.legacy.query.maker.QueryMaker; /** * Transform SQL query to OpenSearch aggregations query diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/DefaultQueryAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/DefaultQueryAction.java similarity index 89% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/DefaultQueryAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/DefaultQueryAction.java index 5f93231d4a..a9e3d7db9c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/DefaultQueryAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/DefaultQueryAction.java @@ -24,29 +24,24 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query; +package org.opensearch.sql.legacy.query; + +import static org.opensearch.sql.legacy.plugin.SqlSettings.CURSOR_ENABLED; +import static org.opensearch.sql.legacy.plugin.SqlSettings.CURSOR_KEEPALIVE; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOperator; import com.alibaba.druid.sql.ast.expr.SQLCastExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.KVValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.MethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Order; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.Format; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.Schema; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.maker.QueryMaker; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.nestedfield.NestedFieldProjection; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.SQLFunctions; - import com.google.common.annotations.VisibleForTesting; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; import org.opensearch.action.search.SearchAction; import org.opensearch.action.search.SearchRequestBuilder; import org.opensearch.action.search.SearchType; @@ -61,18 +56,21 @@ import org.opensearch.search.sort.ScriptSortBuilder.ScriptSortType; import org.opensearch.search.sort.SortBuilders; import org.opensearch.search.sort.SortOrder; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.CURSOR_ENABLED; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.CURSOR_KEEPALIVE; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.KVValue; +import org.opensearch.sql.legacy.domain.MethodField; +import org.opensearch.sql.legacy.domain.Order; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.executor.Format; +import org.opensearch.sql.legacy.executor.format.Schema; +import org.opensearch.sql.legacy.metrics.MetricName; +import org.opensearch.sql.legacy.metrics.Metrics; +import org.opensearch.sql.legacy.query.maker.QueryMaker; +import org.opensearch.sql.legacy.rewriter.nestedfield.NestedFieldProjection; +import org.opensearch.sql.legacy.utils.SQLFunctions; /** * Transform SQL query to standard OpenSearch search query diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/DeleteQueryAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/DeleteQueryAction.java similarity index 88% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/DeleteQueryAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/DeleteQueryAction.java index 2ccffbff52..6f2892e8b9 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/DeleteQueryAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/DeleteQueryAction.java @@ -24,19 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query; +package org.opensearch.sql.legacy.query; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Delete; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.maker.QueryMaker; import org.opensearch.client.Client; import org.opensearch.index.query.QueryBuilder; import org.opensearch.index.query.QueryBuilders; import org.opensearch.index.reindex.DeleteByQueryAction; import org.opensearch.index.reindex.DeleteByQueryRequest; import org.opensearch.index.reindex.DeleteByQueryRequestBuilder; +import org.opensearch.sql.legacy.domain.Delete; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.maker.QueryMaker; public class DeleteQueryAction extends QueryAction { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/DescribeQueryAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/DescribeQueryAction.java similarity index 84% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/DescribeQueryAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/DescribeQueryAction.java index 9fa960007c..e28831f985 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/DescribeQueryAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/DescribeQueryAction.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query; +package org.opensearch.sql.legacy.query; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.IndexStatement; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.QueryStatement; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; import org.opensearch.action.admin.indices.get.GetIndexRequestBuilder; import org.opensearch.client.Client; +import org.opensearch.sql.legacy.domain.IndexStatement; +import org.opensearch.sql.legacy.domain.QueryStatement; +import org.opensearch.sql.legacy.utils.Util; public class DescribeQueryAction extends QueryAction { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/OpenSearchActionFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/OpenSearchActionFactory.java similarity index 77% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/OpenSearchActionFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/OpenSearchActionFactory.java index a727f973f5..ec7cb986d8 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/OpenSearchActionFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/OpenSearchActionFactory.java @@ -24,7 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query; +package org.opensearch.sql.legacy.query; + +import static org.opensearch.sql.legacy.domain.IndexStatement.StatementType; +import static org.opensearch.sql.legacy.utils.Util.toSqlExpr; import com.alibaba.druid.sql.ast.expr.SQLAggregateExpr; import com.alibaba.druid.sql.ast.expr.SQLAllColumnExpr; @@ -39,47 +42,43 @@ import com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitorAdapter; import com.alibaba.druid.sql.parser.SQLStatementParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.ColumnTypeProvider; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Delete; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.IndexStatement; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.JoinSelect; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.QueryActionRequest; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.ElasticResultHandler; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.Format; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.QueryActionElasticExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.adapter.QueryPlanQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.adapter.QueryPlanRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.ElasticLexer; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.SqlParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.SubQueryExpression; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.OpenSearchJoinQueryActionFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.multi.MultiQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.multi.MultiQuerySelect; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.BindingTupleQueryPlanner; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.RewriteRuleExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.alias.TableAliasPrefixRemoveRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.identifier.UnquoteIdentifierRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.join.JoinRewriteRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm.TermFieldRewriter; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm.TermFieldRewriter.TermRewriterFilter; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.nestedfield.NestedFieldRewriter; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.ordinal.OrdinalRewriterRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.parent.SQLExprParentSetterRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.SubQueryRewriteRule; import com.google.common.annotations.VisibleForTesting; -import org.opensearch.client.Client; -import org.opensearch.search.SearchHit; -import org.opensearch.search.SearchHits; - import java.sql.SQLFeatureNotSupportedException; import java.util.ArrayList; import java.util.List; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.domain.IndexStatement.StatementType; -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util.toSqlExpr; +import org.opensearch.client.Client; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; +import org.opensearch.sql.legacy.domain.ColumnTypeProvider; +import org.opensearch.sql.legacy.domain.Delete; +import org.opensearch.sql.legacy.domain.IndexStatement; +import org.opensearch.sql.legacy.domain.JoinSelect; +import org.opensearch.sql.legacy.domain.QueryActionRequest; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.executor.ElasticResultHandler; +import org.opensearch.sql.legacy.executor.Format; +import org.opensearch.sql.legacy.executor.QueryActionElasticExecutor; +import org.opensearch.sql.legacy.executor.adapter.QueryPlanQueryAction; +import org.opensearch.sql.legacy.executor.adapter.QueryPlanRequestBuilder; +import org.opensearch.sql.legacy.parser.ElasticLexer; +import org.opensearch.sql.legacy.parser.SqlParser; +import org.opensearch.sql.legacy.parser.SubQueryExpression; +import org.opensearch.sql.legacy.query.join.OpenSearchJoinQueryActionFactory; +import org.opensearch.sql.legacy.query.multi.MultiQueryAction; +import org.opensearch.sql.legacy.query.multi.MultiQuerySelect; +import org.opensearch.sql.legacy.query.planner.core.BindingTupleQueryPlanner; +import org.opensearch.sql.legacy.rewriter.RewriteRuleExecutor; +import org.opensearch.sql.legacy.rewriter.alias.TableAliasPrefixRemoveRule; +import org.opensearch.sql.legacy.rewriter.identifier.UnquoteIdentifierRule; +import org.opensearch.sql.legacy.rewriter.join.JoinRewriteRule; +import org.opensearch.sql.legacy.rewriter.matchtoterm.TermFieldRewriter; +import org.opensearch.sql.legacy.rewriter.matchtoterm.TermFieldRewriter.TermRewriterFilter; +import org.opensearch.sql.legacy.rewriter.nestedfield.NestedFieldRewriter; +import org.opensearch.sql.legacy.rewriter.ordinal.OrdinalRewriterRule; +import org.opensearch.sql.legacy.rewriter.parent.SQLExprParentSetterRule; +import org.opensearch.sql.legacy.rewriter.subquery.SubQueryRewriteRule; public class OpenSearchActionFactory { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/QueryAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/QueryAction.java similarity index 92% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/QueryAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/QueryAction.java index e48cc13719..a026b5bd68 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/QueryAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/QueryAction.java @@ -24,18 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.ColumnTypeProvider; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Query; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.QueryStatement; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.Hint; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.HintType; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.Format; -import com.amazon.opendistroforelasticsearch.sql.legacy.request.SqlRequest; +package org.opensearch.sql.legacy.query; + import com.fasterxml.jackson.core.JsonFactory; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Optional; import org.opensearch.action.search.SearchRequestBuilder; import org.opensearch.action.support.IndicesOptions; import org.opensearch.client.Client; @@ -45,12 +41,15 @@ import org.opensearch.index.query.QueryBuilders; import org.opensearch.search.collapse.CollapseBuilder; import org.opensearch.search.fetch.subphase.highlight.HighlightBuilder; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Optional; +import org.opensearch.sql.legacy.domain.ColumnTypeProvider; +import org.opensearch.sql.legacy.domain.Query; +import org.opensearch.sql.legacy.domain.QueryStatement; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.hints.Hint; +import org.opensearch.sql.legacy.domain.hints.HintType; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.executor.Format; +import org.opensearch.sql.legacy.request.SqlRequest; /** * Abstract class. used to transform Select object (Represents SQL query) to diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/ShowQueryAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/ShowQueryAction.java similarity index 83% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/ShowQueryAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/ShowQueryAction.java index 7ce18d417f..81580cfc26 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/ShowQueryAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/ShowQueryAction.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query; +package org.opensearch.sql.legacy.query; + +import static org.opensearch.sql.legacy.utils.Util.prepareIndexRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.IndexStatement; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.QueryStatement; import org.opensearch.action.admin.indices.get.GetIndexRequestBuilder; import org.opensearch.client.Client; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util.prepareIndexRequestBuilder; +import org.opensearch.sql.legacy.domain.IndexStatement; +import org.opensearch.sql.legacy.domain.QueryStatement; public class ShowQueryAction extends QueryAction { @@ -53,4 +53,4 @@ public SqlOpenSearchRequestBuilder explain() { return new SqlOpenSearchRequestBuilder(indexRequestBuilder); } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java index 5d45d39e2b..9feca57d5f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query; +package org.opensearch.sql.legacy.query; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/SqlElasticRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticRequestBuilder.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/SqlElasticRequestBuilder.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticRequestBuilder.java index 76a9e6b505..1dbf938167 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/SqlElasticRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticRequestBuilder.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query; +package org.opensearch.sql.legacy.query; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java index 763b3c07eb..27d3cfbb16 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query; +package org.opensearch.sql.legacy.query; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/BackOffRetryStrategy.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/BackOffRetryStrategy.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/BackOffRetryStrategy.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/join/BackOffRetryStrategy.java index ea420cd33b..fbea52de69 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/BackOffRetryStrategy.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/BackOffRetryStrategy.java @@ -24,13 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.join; - -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.opensearch.common.collect.Tuple; +package org.opensearch.sql.legacy.query.join; import java.util.ArrayList; import java.util.Arrays; @@ -40,6 +34,11 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.function.Predicate; import java.util.function.Supplier; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.common.collect.Tuple; +import org.opensearch.sql.legacy.metrics.MetricName; +import org.opensearch.sql.legacy.metrics.Metrics; public class BackOffRetryStrategy { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/HashJoinElasticRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/HashJoinElasticRequestBuilder.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/HashJoinElasticRequestBuilder.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/join/HashJoinElasticRequestBuilder.java index 117cf62a60..3a64bbbaa7 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/HashJoinElasticRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/HashJoinElasticRequestBuilder.java @@ -24,12 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.join; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; +package org.opensearch.sql.legacy.query.join; import java.util.List; import java.util.Map; +import org.opensearch.sql.legacy.domain.Field; /** * Created by Eliran on 22/8/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/JoinRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/JoinRequestBuilder.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/JoinRequestBuilder.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/join/JoinRequestBuilder.java index d6f9f9c293..b72812ce38 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/JoinRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/JoinRequestBuilder.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.join; +package org.opensearch.sql.legacy.query.join; import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.SqlElasticRequestBuilder; +import java.io.IOException; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; import org.opensearch.action.ActionResponse; @@ -37,8 +37,7 @@ import org.opensearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.common.xcontent.XContentType; - -import java.io.IOException; +import org.opensearch.sql.legacy.query.SqlElasticRequestBuilder; /** * Created by Eliran on 15/9/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/NestedLoopsElasticRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/NestedLoopsElasticRequestBuilder.java similarity index 91% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/NestedLoopsElasticRequestBuilder.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/join/NestedLoopsElasticRequestBuilder.java index 284c4efcc1..e9f4430096 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/NestedLoopsElasticRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/NestedLoopsElasticRequestBuilder.java @@ -24,22 +24,21 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.join; +package org.opensearch.sql.legacy.query.join; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Condition; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.maker.QueryMaker; +import java.io.IOException; +import org.json.JSONObject; +import org.json.JSONStringer; import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.xcontent.ToXContent; import org.opensearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.common.xcontent.XContentType; -import org.json.JSONObject; -import org.json.JSONStringer; - -import java.io.IOException; +import org.opensearch.sql.legacy.domain.Condition; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.maker.QueryMaker; /** * Created by Eliran on 15/9/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/OpenSearchHashJoinQueryAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/OpenSearchHashJoinQueryAction.java similarity index 89% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/OpenSearchHashJoinQueryAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/join/OpenSearchHashJoinQueryAction.java index b10dd437bd..0e49aba929 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/OpenSearchHashJoinQueryAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/OpenSearchHashJoinQueryAction.java @@ -24,22 +24,21 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.join; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Condition; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.JoinSelect; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.Hint; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.HintType; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.HashJoinQueryPlanRequestBuilder; -import org.opensearch.client.Client; +package org.opensearch.sql.legacy.query.join; import java.util.AbstractMap; import java.util.ArrayList; import java.util.List; import java.util.Map; +import org.opensearch.client.Client; +import org.opensearch.sql.legacy.domain.Condition; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.JoinSelect; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.domain.hints.Hint; +import org.opensearch.sql.legacy.domain.hints.HintType; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.planner.HashJoinQueryPlanRequestBuilder; /** * Created by Eliran on 22/8/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/OpenSearchJoinQueryAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/OpenSearchJoinQueryAction.java similarity index 85% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/OpenSearchJoinQueryAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/join/OpenSearchJoinQueryAction.java index c4121fb09e..4c4e69cf3e 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/OpenSearchJoinQueryAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/OpenSearchJoinQueryAction.java @@ -24,22 +24,21 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.join; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.JoinSelect; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.TableOnJoinSelect; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.Hint; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.DefaultQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.SqlElasticRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.HashJoinQueryPlanRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.Config; -import org.opensearch.client.Client; +package org.opensearch.sql.legacy.query.join; import java.util.List; +import org.opensearch.client.Client; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.JoinSelect; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.TableOnJoinSelect; +import org.opensearch.sql.legacy.domain.hints.Hint; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.DefaultQueryAction; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.query.SqlElasticRequestBuilder; +import org.opensearch.sql.legacy.query.planner.HashJoinQueryPlanRequestBuilder; +import org.opensearch.sql.legacy.query.planner.core.Config; /** * Created by Eliran on 15/9/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/OpenSearchJoinQueryActionFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/OpenSearchJoinQueryActionFactory.java similarity index 82% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/OpenSearchJoinQueryActionFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/join/OpenSearchJoinQueryActionFactory.java index 37e85cbc4c..fe817235e2 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/OpenSearchJoinQueryActionFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/OpenSearchJoinQueryActionFactory.java @@ -24,16 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.join; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Condition; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.JoinSelect; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.Hint; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.HintType; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import org.opensearch.client.Client; +package org.opensearch.sql.legacy.query.join; import java.util.List; +import org.opensearch.client.Client; +import org.opensearch.sql.legacy.domain.Condition; +import org.opensearch.sql.legacy.domain.JoinSelect; +import org.opensearch.sql.legacy.domain.hints.Hint; +import org.opensearch.sql.legacy.domain.hints.HintType; +import org.opensearch.sql.legacy.query.QueryAction; /** * Created by Eliran on 15/9/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/OpenSearchNestedLoopsQueryAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/OpenSearchNestedLoopsQueryAction.java similarity index 84% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/OpenSearchNestedLoopsQueryAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/join/OpenSearchNestedLoopsQueryAction.java index 8195ec2605..f80646e9d3 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/OpenSearchNestedLoopsQueryAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/OpenSearchNestedLoopsQueryAction.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.join; +package org.opensearch.sql.legacy.query.join; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.JoinSelect; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.Hint; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.hints.HintType; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; import org.opensearch.client.Client; +import org.opensearch.sql.legacy.domain.JoinSelect; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.domain.hints.Hint; +import org.opensearch.sql.legacy.domain.hints.HintType; +import org.opensearch.sql.legacy.exception.SqlParseException; /** * Created by Eliran on 15/9/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/TableInJoinRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/TableInJoinRequestBuilder.java similarity index 91% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/TableInJoinRequestBuilder.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/join/TableInJoinRequestBuilder.java index dcc882ec9e..32ee179951 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/join/TableInJoinRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/TableInJoinRequestBuilder.java @@ -24,13 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.join; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import org.opensearch.action.search.SearchRequestBuilder; +package org.opensearch.sql.legacy.query.join; import java.util.List; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.Select; /** * Created by Eliran on 28/8/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/maker/AggMaker.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/maker/AggMaker.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/maker/AggMaker.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/maker/AggMaker.java index 4e5f9591aa..dc65a467e2 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/maker/AggMaker.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/maker/AggMaker.java @@ -24,21 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.maker; +package org.opensearch.sql.legacy.query.maker; import com.alibaba.druid.sql.ast.expr.SQLAggregateOption; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Condition; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.KVValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.MethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where.CONN; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.bucketpath.Path; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.ChildrenType; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.NestedType; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; import com.fasterxml.jackson.core.JsonFactory; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.ZoneOffset; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; import org.opensearch.common.ParsingException; import org.opensearch.common.Strings; @@ -72,16 +70,17 @@ import org.opensearch.search.aggregations.metrics.TopHitsAggregationBuilder; import org.opensearch.search.aggregations.support.ValuesSourceAggregationBuilder; import org.opensearch.search.sort.SortOrder; - -import java.io.IOException; -import java.math.BigDecimal; -import java.time.ZoneOffset; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; +import org.opensearch.sql.legacy.domain.Condition; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.KVValue; +import org.opensearch.sql.legacy.domain.MethodField; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.domain.Where.CONN; +import org.opensearch.sql.legacy.domain.bucketpath.Path; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.parser.ChildrenType; +import org.opensearch.sql.legacy.parser.NestedType; +import org.opensearch.sql.legacy.utils.Util; public class AggMaker { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/maker/Maker.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/maker/Maker.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/maker/Maker.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/maker/Maker.java index 2e80993185..8e61ae1a1c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/maker/Maker.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/maker/Maker.java @@ -24,7 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.maker; +package org.opensearch.sql.legacy.query.maker; + +import static org.opensearch.sql.legacy.parser.WhereParser.getConditionForMethod; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; @@ -33,20 +35,17 @@ import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr; import com.alibaba.druid.sql.ast.expr.SQLNumericLiteralExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Condition; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Paramer; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.ScriptFilter; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.SubQueryExpression; -import com.amazon.opendistroforelasticsearch.sql.legacy.spatial.BoundingBoxFilterParams; -import com.amazon.opendistroforelasticsearch.sql.legacy.spatial.DistanceFilterParams; -import com.amazon.opendistroforelasticsearch.sql.legacy.spatial.Point; -import com.amazon.opendistroforelasticsearch.sql.legacy.spatial.PolygonFilterParams; -import com.amazon.opendistroforelasticsearch.sql.legacy.spatial.WktToGeoJsonConverter; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; +import java.io.IOException; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.ZoneId; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.apache.lucene.search.join.ScoreMode; import org.opensearch.common.geo.GeoPoint; import org.opensearch.common.geo.builders.ShapeBuilder; @@ -72,18 +71,18 @@ import org.opensearch.index.query.WildcardQueryBuilder; import org.opensearch.join.query.JoinQueryBuilders; import org.opensearch.script.Script; - -import java.io.IOException; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.ZoneId; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.parser.WhereParser.getConditionForMethod; +import org.opensearch.sql.legacy.domain.Condition; +import org.opensearch.sql.legacy.domain.Paramer; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.parser.ScriptFilter; +import org.opensearch.sql.legacy.parser.SubQueryExpression; +import org.opensearch.sql.legacy.spatial.BoundingBoxFilterParams; +import org.opensearch.sql.legacy.spatial.DistanceFilterParams; +import org.opensearch.sql.legacy.spatial.Point; +import org.opensearch.sql.legacy.spatial.PolygonFilterParams; +import org.opensearch.sql.legacy.spatial.WktToGeoJsonConverter; +import org.opensearch.sql.legacy.utils.StringUtils; public abstract class Maker { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/maker/QueryMaker.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/maker/QueryMaker.java similarity index 92% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/maker/QueryMaker.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/maker/QueryMaker.java index 5e0fe1b4b8..919ea3a215 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/maker/QueryMaker.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/maker/QueryMaker.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.maker; +package org.opensearch.sql.legacy.query.maker; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Condition; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; import org.apache.lucene.search.join.ScoreMode; import org.opensearch.index.query.BoolQueryBuilder; import org.opensearch.index.query.QueryBuilder; import org.opensearch.index.query.QueryBuilders; import org.opensearch.join.query.JoinQueryBuilders; +import org.opensearch.sql.legacy.domain.Condition; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.exception.SqlParseException; public class QueryMaker extends Maker { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/multi/MultiQueryAction.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryAction.java similarity index 87% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/multi/MultiQueryAction.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryAction.java index 63b50769c1..708ea20cfc 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/multi/MultiQueryAction.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryAction.java @@ -24,20 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.multi; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.DefaultQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.SqlElasticRequestBuilder; -import org.opensearch.action.search.SearchRequestBuilder; -import org.opensearch.client.Client; +package org.opensearch.sql.legacy.query.multi; import java.util.HashSet; import java.util.List; import java.util.Set; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.client.Client; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.DefaultQueryAction; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.query.SqlElasticRequestBuilder; /** * Created by Eliran on 19/8/2016. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java index 9349e26fe8..9f9a5a5d3c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java @@ -24,12 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.multi; +package org.opensearch.sql.legacy.query.multi; import com.alibaba.druid.sql.ast.statement.SQLUnionOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.SqlElasticRequestBuilder; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; import org.opensearch.action.ActionResponse; @@ -39,11 +40,9 @@ import org.opensearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.common.xcontent.XContentType; - -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.query.SqlElasticRequestBuilder; /** * Created by Eliran on 19/8/2016. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/multi/MultiQuerySelect.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQuerySelect.java similarity index 91% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/multi/MultiQuerySelect.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQuerySelect.java index 3f3c6f7614..f3b4e8e9fd 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/multi/MultiQuerySelect.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQuerySelect.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.multi; +package org.opensearch.sql.legacy.query.multi; import com.alibaba.druid.sql.ast.statement.SQLUnionOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.Select; /** * Created by Eliran on 19/8/2016. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/multi/OpenSearchMultiQueryActionFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/OpenSearchMultiQueryActionFactory.java similarity index 86% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/multi/OpenSearchMultiQueryActionFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/multi/OpenSearchMultiQueryActionFactory.java index 346d20090f..1228f6d43b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/multi/OpenSearchMultiQueryActionFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/OpenSearchMultiQueryActionFactory.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.multi; +package org.opensearch.sql.legacy.query.multi; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; import org.opensearch.client.Client; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.QueryAction; /** * Created by Eliran on 19/8/2016. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/HashJoinQueryPlanRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/HashJoinQueryPlanRequestBuilder.java similarity index 83% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/HashJoinQueryPlanRequestBuilder.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/HashJoinQueryPlanRequestBuilder.java index fd820bb452..b3fbd3a9cc 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/HashJoinQueryPlanRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/HashJoinQueryPlanRequestBuilder.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner; +package org.opensearch.sql.legacy.query.planner; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.HashJoinElasticRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.Config; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.QueryParams; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.QueryPlanner; -import com.amazon.opendistroforelasticsearch.sql.legacy.request.SqlRequest; import org.opensearch.client.Client; +import org.opensearch.sql.legacy.query.join.HashJoinElasticRequestBuilder; +import org.opensearch.sql.legacy.query.planner.core.Config; +import org.opensearch.sql.legacy.query.planner.core.QueryParams; +import org.opensearch.sql.legacy.query.planner.core.QueryPlanner; +import org.opensearch.sql.legacy.request.SqlRequest; /** * QueryPlanner builder for Hash Join query. In future, different queries could have its own builders to generate diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/converter/SQLAggregationParser.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/converter/SQLAggregationParser.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/converter/SQLAggregationParser.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/converter/SQLAggregationParser.java index 7f021233e5..3d84975f79 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/converter/SQLAggregationParser.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/converter/SQLAggregationParser.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.converter; +package org.opensearch.sql.legacy.query.planner.converter; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLAggregateExpr; @@ -36,20 +36,19 @@ import com.alibaba.druid.sql.dialect.mysql.ast.expr.MySqlSelectGroupByExpr; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitorAdapter; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.ColumnTypeProvider; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.Expression; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.ExpressionFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.ColumnNode; import com.google.common.base.Strings; -import lombok.Getter; -import lombok.RequiredArgsConstructor; - import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import org.opensearch.sql.legacy.domain.ColumnTypeProvider; +import org.opensearch.sql.legacy.expression.core.Expression; +import org.opensearch.sql.legacy.expression.core.ExpressionFactory; +import org.opensearch.sql.legacy.query.planner.core.ColumnNode; /** * The definition of SQL Aggregation Converter which will parse the query to project column node list and diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/converter/SQLExprToExpressionConverter.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/converter/SQLExprToExpressionConverter.java similarity index 90% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/converter/SQLExprToExpressionConverter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/converter/SQLExprToExpressionConverter.java index 51506e7eb1..6430a2d4f4 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/converter/SQLExprToExpressionConverter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/converter/SQLExprToExpressionConverter.java @@ -24,7 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.converter; +package org.opensearch.sql.legacy.query.planner.converter; + +import static org.opensearch.sql.legacy.expression.core.ExpressionFactory.cast; +import static org.opensearch.sql.legacy.expression.core.ExpressionFactory.literal; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; @@ -32,21 +35,17 @@ import com.alibaba.druid.sql.ast.expr.SQLCastExpr; import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr; import com.alibaba.druid.sql.ast.expr.SQLValuableExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.Expression; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.ExpressionFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.operator.ScalarOperation; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.model.ExprValueFactory; import com.google.common.collect.ImmutableMap; -import lombok.RequiredArgsConstructor; - import java.util.Arrays; import java.util.Map; import java.util.Optional; import java.util.function.Function; import java.util.stream.Collectors; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.ExpressionFactory.cast; -import static com.amazon.opendistroforelasticsearch.sql.legacy.expression.core.ExpressionFactory.literal; +import lombok.RequiredArgsConstructor; +import org.opensearch.sql.legacy.expression.core.Expression; +import org.opensearch.sql.legacy.expression.core.ExpressionFactory; +import org.opensearch.sql.legacy.expression.core.operator.ScalarOperation; +import org.opensearch.sql.legacy.expression.model.ExprValueFactory; /** * The definition of {@link SQLExpr} to {@link Expression} converter. @@ -130,4 +129,4 @@ private Expression methodToExpression(SQLMethodInvokeExpr expr, Function { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/estimation/Estimation.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/estimation/Estimation.java similarity index 79% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/estimation/Estimation.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/estimation/Estimation.java index dd9d0ff49c..cd6802216a 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/estimation/Estimation.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/estimation/Estimation.java @@ -24,19 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.estimation; +package org.opensearch.sql.legacy.query.planner.physical.estimation; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.PlanNode; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.logical.LogicalOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.logical.LogicalPlanVisitor; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.logical.node.Group; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.PhysicalOperator; +import static java.util.Comparator.comparing; import java.util.Arrays; import java.util.IdentityHashMap; import java.util.Map; - -import static java.util.Comparator.comparing; +import org.opensearch.sql.legacy.query.planner.core.PlanNode; +import org.opensearch.sql.legacy.query.planner.logical.LogicalOperator; +import org.opensearch.sql.legacy.query.planner.logical.LogicalPlanVisitor; +import org.opensearch.sql.legacy.query.planner.logical.node.Group; +import org.opensearch.sql.legacy.query.planner.physical.PhysicalOperator; /** * Convert and estimate the cost of each operator and generate one optimal plan. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/BatchPhysicalOperator.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/BatchPhysicalOperator.java similarity index 85% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/BatchPhysicalOperator.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/BatchPhysicalOperator.java index a86baa04da..25f4a507ff 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/BatchPhysicalOperator.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/BatchPhysicalOperator.java @@ -24,20 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node; +package org.opensearch.sql.legacy.query.planner.physical.node; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.ExecuteParams; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.PhysicalOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource.ResourceManager; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import static org.opensearch.sql.legacy.query.planner.core.ExecuteParams.ExecuteParamType.RESOURCE_MANAGER; import java.util.Collection; import java.util.Iterator; import java.util.Objects; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.ExecuteParams.ExecuteParamType.RESOURCE_MANAGER; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.sql.legacy.query.planner.core.ExecuteParams; +import org.opensearch.sql.legacy.query.planner.physical.PhysicalOperator; +import org.opensearch.sql.legacy.query.planner.physical.Row; +import org.opensearch.sql.legacy.query.planner.resource.ResourceManager; /** * Abstraction for physical operators that load large volume of data and generally prefetch for efficiency. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/BlockHashJoin.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/BlockHashJoin.java similarity index 86% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/BlockHashJoin.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/BlockHashJoin.java index 18059a82ca..0fdb98fa48 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/BlockHashJoin.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/BlockHashJoin.java @@ -24,26 +24,25 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.join; +package org.opensearch.sql.legacy.query.planner.physical.node.join; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.ExecuteParams; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.PhysicalOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.estimation.Cost; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource.blocksize.BlockSize; -import org.opensearch.common.Strings; -import org.opensearch.index.query.BoolQueryBuilder; +import static com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.termsQuery; +import static org.opensearch.sql.legacy.query.planner.logical.node.Join.JoinCondition; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Objects; - -import static com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType; -import static com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.logical.node.Join.JoinCondition; -import static org.opensearch.index.query.QueryBuilders.boolQuery; -import static org.opensearch.index.query.QueryBuilders.termsQuery; +import org.opensearch.common.Strings; +import org.opensearch.index.query.BoolQueryBuilder; +import org.opensearch.sql.legacy.query.planner.core.ExecuteParams; +import org.opensearch.sql.legacy.query.planner.physical.PhysicalOperator; +import org.opensearch.sql.legacy.query.planner.physical.Row; +import org.opensearch.sql.legacy.query.planner.physical.estimation.Cost; +import org.opensearch.sql.legacy.query.planner.resource.blocksize.BlockSize; /** * Block-based Hash Join implementation diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/CombinedRow.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/CombinedRow.java similarity index 91% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/CombinedRow.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/CombinedRow.java index 371c811a50..5ed9eb074f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/CombinedRow.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/CombinedRow.java @@ -24,14 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.join; - -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; +package org.opensearch.sql.legacy.query.planner.physical.node.join; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; +import org.opensearch.sql.legacy.query.planner.physical.Row; /** * Combined row to store matched relation from single right row to N left rows. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/DefaultHashTable.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/DefaultHashTable.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/DefaultHashTable.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/DefaultHashTable.java index 2eeafbdfc9..ea24769abd 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/DefaultHashTable.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/DefaultHashTable.java @@ -24,23 +24,22 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.join; +package org.opensearch.sql.legacy.query.planner.physical.node.join; + +import static java.util.Collections.emptyList; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row.RowKey; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; - -import static java.util.Collections.emptyList; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.sql.legacy.query.planner.physical.Row; +import org.opensearch.sql.legacy.query.planner.physical.Row.RowKey; /** * Hash table implementation. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/HashTable.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/HashTable.java similarity index 91% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/HashTable.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/HashTable.java index 491f71822e..a6cbfe2be3 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/HashTable.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/HashTable.java @@ -24,12 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.join; - -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; +package org.opensearch.sql.legacy.query.planner.physical.node.join; import java.util.Collection; import java.util.Map; +import org.opensearch.sql.legacy.query.planner.physical.Row; /** * Hash table interface diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/HashTableGroup.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/HashTableGroup.java similarity index 91% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/HashTableGroup.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/HashTableGroup.java index ad5a10737a..dffe292528 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/HashTableGroup.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/HashTableGroup.java @@ -24,17 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.join; +package org.opensearch.sql.legacy.query.planner.physical.node.join; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; -import com.google.common.collect.Sets; +import static org.opensearch.sql.legacy.query.planner.logical.node.Join.JoinCondition; +import com.google.common.collect.Sets; import java.util.Arrays; import java.util.Collection; import java.util.Map; import java.util.Set; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.logical.node.Join.JoinCondition; +import org.opensearch.sql.legacy.query.planner.physical.Row; /** * Hash table group with each hash table per AND join condition. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/JoinAlgorithm.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/JoinAlgorithm.java similarity index 91% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/JoinAlgorithm.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/JoinAlgorithm.java index 71d20c2dcd..19668e6fcc 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/JoinAlgorithm.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/JoinAlgorithm.java @@ -24,26 +24,25 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.join; +package org.opensearch.sql.legacy.query.planner.physical.node.join; + +import static java.util.Collections.emptyList; import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.ExecuteParams; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.PlanNode; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.logical.node.Join.JoinCondition; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.PhysicalOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.BatchPhysicalOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource.blocksize.BlockSize; import com.google.common.collect.Sets; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Set; - -import static java.util.Collections.emptyList; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.sql.legacy.query.planner.core.ExecuteParams; +import org.opensearch.sql.legacy.query.planner.core.PlanNode; +import org.opensearch.sql.legacy.query.planner.logical.node.Join.JoinCondition; +import org.opensearch.sql.legacy.query.planner.physical.PhysicalOperator; +import org.opensearch.sql.legacy.query.planner.physical.Row; +import org.opensearch.sql.legacy.query.planner.physical.node.BatchPhysicalOperator; +import org.opensearch.sql.legacy.query.planner.resource.blocksize.BlockSize; /** * Join algorithm base class diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/ListHashTable.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/ListHashTable.java similarity index 91% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/ListHashTable.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/ListHashTable.java index 116dfd57a9..1fe104f50d 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/join/ListHashTable.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/join/ListHashTable.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.join; - -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; +package org.opensearch.sql.legacy.query.planner.physical.node.join; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; +import org.opensearch.sql.legacy.query.planner.physical.Row; /** * List implementation to avoid normal hash table degrading into linked list. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/project/PhysicalProject.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/project/PhysicalProject.java similarity index 71% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/project/PhysicalProject.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/project/PhysicalProject.java index 68b94b17c2..0415eea86e 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/project/PhysicalProject.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/project/PhysicalProject.java @@ -24,18 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.project; - -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain.BindingTuple; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.ColumnNode; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.PlanNode; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.PhysicalOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.estimation.Cost; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.scroll.BindingTupleRow; -import lombok.RequiredArgsConstructor; +package org.opensearch.sql.legacy.query.planner.physical.node.project; import java.util.List; +import lombok.RequiredArgsConstructor; +import org.opensearch.sql.legacy.expression.domain.BindingTuple; +import org.opensearch.sql.legacy.query.planner.core.ColumnNode; +import org.opensearch.sql.legacy.query.planner.core.PlanNode; +import org.opensearch.sql.legacy.query.planner.physical.PhysicalOperator; +import org.opensearch.sql.legacy.query.planner.physical.Row; +import org.opensearch.sql.legacy.query.planner.physical.estimation.Cost; +import org.opensearch.sql.legacy.query.planner.physical.node.scroll.BindingTupleRow; /** * The definition of Project Operator. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/BindingTupleRow.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/BindingTupleRow.java similarity index 85% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/BindingTupleRow.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/BindingTupleRow.java index 13038986c9..aaaa288bbe 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/BindingTupleRow.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/BindingTupleRow.java @@ -24,13 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.scroll; - -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain.BindingTuple; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; -import lombok.RequiredArgsConstructor; +package org.opensearch.sql.legacy.query.planner.physical.node.scroll; import java.util.Map; +import lombok.RequiredArgsConstructor; +import org.opensearch.sql.legacy.expression.domain.BindingTuple; +import org.opensearch.sql.legacy.query.planner.physical.Row; @RequiredArgsConstructor public class BindingTupleRow implements Row { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java similarity index 73% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java index 74b699fb4b..fd312719a4 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java @@ -24,23 +24,22 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.scroll; +package org.opensearch.sql.legacy.query.planner.physical.node.scroll; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain.BindingTuple; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.AggregationQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.ExecuteParams; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.PlanNode; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.PhysicalOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.estimation.Cost; +import java.util.Iterator; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; import org.opensearch.action.ActionResponse; import org.opensearch.action.search.SearchResponse; - -import java.util.Iterator; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.expression.domain.BindingTuple; +import org.opensearch.sql.legacy.query.AggregationQueryAction; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.query.planner.core.ExecuteParams; +import org.opensearch.sql.legacy.query.planner.core.PlanNode; +import org.opensearch.sql.legacy.query.planner.physical.PhysicalOperator; +import org.opensearch.sql.legacy.query.planner.physical.Row; +import org.opensearch.sql.legacy.query.planner.physical.estimation.Cost; /** * The definition of Scroll Operator. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/Scroll.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/Scroll.java similarity index 87% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/Scroll.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/Scroll.java index 4183113603..5901894ea7 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/Scroll.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/Scroll.java @@ -24,18 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.scroll; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.TableInJoinRequestBuilder; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.maker.QueryMaker; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.ExecuteParams; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.PlanNode; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.estimation.Cost; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.BatchPhysicalOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource.ResourceManager; +package org.opensearch.sql.legacy.query.planner.physical.node.scroll; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Objects; import org.opensearch.action.search.ClearScrollResponse; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; @@ -46,10 +39,16 @@ import org.opensearch.search.SearchHit; import org.opensearch.search.sort.FieldSortBuilder; import org.opensearch.search.sort.SortOrder; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Objects; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.join.TableInJoinRequestBuilder; +import org.opensearch.sql.legacy.query.maker.QueryMaker; +import org.opensearch.sql.legacy.query.planner.core.ExecuteParams; +import org.opensearch.sql.legacy.query.planner.core.PlanNode; +import org.opensearch.sql.legacy.query.planner.physical.Row; +import org.opensearch.sql.legacy.query.planner.physical.estimation.Cost; +import org.opensearch.sql.legacy.query.planner.physical.node.BatchPhysicalOperator; +import org.opensearch.sql.legacy.query.planner.resource.ResourceManager; /** * OpenSearch Scroll API as physical implementation of TableScan diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/SearchAggregationResponseHelper.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/SearchAggregationResponseHelper.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/SearchAggregationResponseHelper.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/SearchAggregationResponseHelper.java index 384bf478c7..8930533d38 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/SearchAggregationResponseHelper.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/SearchAggregationResponseHelper.java @@ -24,10 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.scroll; +package org.opensearch.sql.legacy.query.planner.physical.node.scroll; -import com.amazon.opendistroforelasticsearch.sql.legacy.expression.domain.BindingTuple; import com.google.common.annotations.VisibleForTesting; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; import org.opensearch.search.aggregations.Aggregation; import org.opensearch.search.aggregations.Aggregations; import org.opensearch.search.aggregations.bucket.histogram.Histogram; @@ -35,13 +40,7 @@ import org.opensearch.search.aggregations.metrics.NumericMetricsAggregation; import org.opensearch.search.aggregations.metrics.Percentile; import org.opensearch.search.aggregations.metrics.Percentiles; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import java.util.stream.StreamSupport; +import org.opensearch.sql.legacy.expression.domain.BindingTuple; /** * The definition of Search {@link Aggregations} parser helper class. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/SearchHitRow.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/SearchHitRow.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/SearchHitRow.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/SearchHitRow.java index 1e6f0973cb..ef39db8972 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/scroll/SearchHitRow.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/SearchHitRow.java @@ -24,17 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.scroll; +package org.opensearch.sql.legacy.query.planner.physical.node.scroll; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; import com.google.common.base.Strings; +import java.util.HashMap; +import java.util.Map; import org.opensearch.common.document.DocumentField; import org.opensearch.common.text.Text; import org.opensearch.index.mapper.MapperService; import org.opensearch.search.SearchHit; - -import java.util.HashMap; -import java.util.Map; +import org.opensearch.sql.legacy.query.planner.physical.Row; /** * Search hit row that implements basic accessor for SearchHit. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/sort/QuickSort.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/sort/QuickSort.java similarity index 83% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/sort/QuickSort.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/sort/QuickSort.java index df12f99ee1..8630055fe4 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/physical/node/sort/QuickSort.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/sort/QuickSort.java @@ -24,24 +24,23 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.sort; - -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.ExecuteParams; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.PlanNode; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.PhysicalOperator; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.Row; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.estimation.Cost; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.physical.node.BatchPhysicalOperator; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +package org.opensearch.sql.legacy.query.planner.physical.node.sort; + +import static java.util.Collections.emptyList; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Comparator; import java.util.List; - -import static java.util.Collections.emptyList; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.sql.legacy.query.planner.core.ExecuteParams; +import org.opensearch.sql.legacy.query.planner.core.PlanNode; +import org.opensearch.sql.legacy.query.planner.physical.PhysicalOperator; +import org.opensearch.sql.legacy.query.planner.physical.Row; +import org.opensearch.sql.legacy.query.planner.physical.estimation.Cost; +import org.opensearch.sql.legacy.query.planner.physical.node.BatchPhysicalOperator; /** * Physical operator to sort by quick sort implementation in JDK. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/ResourceManager.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/ResourceManager.java similarity index 80% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/ResourceManager.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/ResourceManager.java index 81fd925023..57bef4d29b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/ResourceManager.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/ResourceManager.java @@ -24,20 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource; - -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.join.MetaSearchResult; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.join.BackOffRetryStrategy; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.Config; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource.monitor.Monitor; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource.monitor.TotalMemoryMonitor; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +package org.opensearch.sql.legacy.query.planner.resource; import java.time.Duration; import java.time.Instant; import java.util.ArrayList; import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.opensearch.sql.legacy.executor.join.MetaSearchResult; +import org.opensearch.sql.legacy.query.join.BackOffRetryStrategy; +import org.opensearch.sql.legacy.query.planner.core.Config; +import org.opensearch.sql.legacy.query.planner.resource.monitor.Monitor; +import org.opensearch.sql.legacy.query.planner.resource.monitor.TotalMemoryMonitor; /** * Aggregated resource monitor diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/Stats.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/Stats.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/Stats.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/Stats.java index 34b3b7e05a..6af66cf708 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/Stats.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/Stats.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource; +package org.opensearch.sql.legacy.query.planner.resource; import org.opensearch.client.Client; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/blocksize/AdaptiveBlockSize.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/blocksize/AdaptiveBlockSize.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/blocksize/AdaptiveBlockSize.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/blocksize/AdaptiveBlockSize.java index 2f174b21d5..e270d7ea83 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/blocksize/AdaptiveBlockSize.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/blocksize/AdaptiveBlockSize.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource.blocksize; +package org.opensearch.sql.legacy.query.planner.resource.blocksize; /** * Adaptive block size calculator based on resource usage dynamically. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/blocksize/BlockSize.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/blocksize/BlockSize.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/blocksize/BlockSize.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/blocksize/BlockSize.java index 4b8a4efbf1..7df0ac2174 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/blocksize/BlockSize.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/blocksize/BlockSize.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource.blocksize; +package org.opensearch.sql.legacy.query.planner.resource.blocksize; /** * Block size calculating logic. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/monitor/Monitor.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/monitor/Monitor.java similarity index 92% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/monitor/Monitor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/monitor/Monitor.java index 43aeeae88c..8f6863f6c9 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/monitor/Monitor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/monitor/Monitor.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource.monitor; +package org.opensearch.sql.legacy.query.planner.resource.monitor; /** * Interface for different monitor component diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/monitor/TotalMemoryMonitor.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/monitor/TotalMemoryMonitor.java similarity index 85% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/monitor/TotalMemoryMonitor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/monitor/TotalMemoryMonitor.java index 39c0eb378b..a726fda80d 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/query/planner/resource/monitor/TotalMemoryMonitor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/resource/monitor/TotalMemoryMonitor.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource.monitor; +package org.opensearch.sql.legacy.query.planner.resource.monitor; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.core.Config; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource.Stats; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.planner.resource.Stats.MemStats; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.opensearch.sql.legacy.query.planner.core.Config; +import org.opensearch.sql.legacy.query.planner.resource.Stats; +import org.opensearch.sql.legacy.query.planner.resource.Stats.MemStats; /** * Circuit breaker for total memory usage in JVM on current OpenSearch node. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/request/PreparedStatementRequest.java b/legacy/src/main/java/org/opensearch/sql/legacy/request/PreparedStatementRequest.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/request/PreparedStatementRequest.java rename to legacy/src/main/java/org/opensearch/sql/legacy/request/PreparedStatementRequest.java index dc2291aaad..482b62cac7 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/request/PreparedStatementRequest.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/request/PreparedStatementRequest.java @@ -24,11 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.request; - -import org.json.JSONObject; +package org.opensearch.sql.legacy.request; import java.util.List; +import org.json.JSONObject; public class PreparedStatementRequest extends SqlRequest { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/request/SqlRequest.java b/legacy/src/main/java/org/opensearch/sql/legacy/request/SqlRequest.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/request/SqlRequest.java rename to legacy/src/main/java/org/opensearch/sql/legacy/request/SqlRequest.java index 1cf29d6916..e6a5b25e54 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/request/SqlRequest.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/request/SqlRequest.java @@ -24,9 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.request; +package org.opensearch.sql.legacy.request; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; +import java.io.IOException; +import java.util.Collections; +import org.json.JSONException; +import org.json.JSONObject; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.LoggingDeprecationHandler; import org.opensearch.common.xcontent.NamedXContentRegistry; @@ -35,11 +38,7 @@ import org.opensearch.common.xcontent.XContentType; import org.opensearch.index.query.BoolQueryBuilder; import org.opensearch.search.SearchModule; -import org.json.JSONException; -import org.json.JSONObject; - -import java.io.IOException; -import java.util.Collections; +import org.opensearch.sql.legacy.exception.SqlParseException; public class SqlRequest { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/request/SqlRequestFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/request/SqlRequestFactory.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/request/SqlRequestFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/request/SqlRequestFactory.java index 549d968a7b..8c52ce65b2 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/request/SqlRequestFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/request/SqlRequestFactory.java @@ -24,19 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.request; +package org.opensearch.sql.legacy.request; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import org.opensearch.rest.RestRequest; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; +import static org.opensearch.sql.legacy.plugin.SqlSettings.CURSOR_FETCH_SIZE; import java.util.ArrayList; import java.util.List; import java.util.Optional; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.CURSOR_FETCH_SIZE; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import org.opensearch.rest.RestRequest; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; public class SqlRequestFactory { diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/request/SqlRequestParam.java b/legacy/src/main/java/org/opensearch/sql/legacy/request/SqlRequestParam.java similarity index 90% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/request/SqlRequestParam.java rename to legacy/src/main/java/org/opensearch/sql/legacy/request/SqlRequestParam.java index 729d41112e..378aa37b96 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/request/SqlRequestParam.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/request/SqlRequestParam.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.request; +package org.opensearch.sql.legacy.request; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.Format; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_RESPONSE_FORMAT; import java.util.Map; import java.util.Optional; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_RESPONSE_FORMAT; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.executor.Format; /** * Utils class for parse the request params. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/RewriteRule.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/RewriteRule.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/RewriteRule.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/RewriteRule.java index dad93c4845..f160f05398 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/RewriteRule.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/RewriteRule.java @@ -24,10 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter; +package org.opensearch.sql.legacy.rewriter; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; - import java.sql.SQLFeatureNotSupportedException; /** diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/RewriteRuleExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/RewriteRuleExecutor.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/RewriteRuleExecutor.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/RewriteRuleExecutor.java index 9db2d1ed26..3f6b5ec33b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/RewriteRuleExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/RewriteRuleExecutor.java @@ -24,10 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter; +package org.opensearch.sql.legacy.rewriter; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; - import java.sql.SQLFeatureNotSupportedException; import java.util.ArrayList; import java.util.List; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/Identifier.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/alias/Identifier.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/Identifier.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/alias/Identifier.java index c8fef0b02d..3c50038803 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/Identifier.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/alias/Identifier.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.alias; +package org.opensearch.sql.legacy.rewriter.alias; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/Table.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/alias/Table.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/Table.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/alias/Table.java index 8e0eeba63d..e6f627a63e 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/Table.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/alias/Table.java @@ -24,7 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.alias; +package org.opensearch.sql.legacy.rewriter.alias; + +import static com.alibaba.druid.sql.ast.expr.SQLBinaryOperator.Divide; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; @@ -32,8 +34,6 @@ import com.alibaba.druid.sql.ast.statement.SQLExprTableSource; import com.google.common.base.Strings; -import static com.alibaba.druid.sql.ast.expr.SQLBinaryOperator.Divide; - /** * Util class for table expression parsing */ diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRule.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRule.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRule.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRule.java index 8116867832..048806f6d2 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRule.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRule.java @@ -24,19 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.alias; +package org.opensearch.sql.legacy.rewriter.alias; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; import com.alibaba.druid.sql.ast.statement.SQLExprTableSource; import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitorAdapter; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.RewriteRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.utils.FindSubQuery; - import java.util.HashSet; import java.util.Set; import java.util.function.Consumer; +import org.opensearch.sql.legacy.rewriter.RewriteRule; +import org.opensearch.sql.legacy.rewriter.subquery.utils.FindSubQuery; /** * Rewrite rule for removing table alias or table name prefix in field name. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/identifier/AnonymizeSensitiveDataRule.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/identifier/AnonymizeSensitiveDataRule.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/identifier/AnonymizeSensitiveDataRule.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/identifier/AnonymizeSensitiveDataRule.java index 8ff4ba32c3..f9f13362ec 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/identifier/AnonymizeSensitiveDataRule.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/identifier/AnonymizeSensitiveDataRule.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.identifier; +package org.opensearch.sql.legacy.rewriter.identifier; import com.alibaba.druid.sql.ast.expr.SQLBooleanExpr; import com.alibaba.druid.sql.ast.expr.SQLCharExpr; @@ -34,7 +34,7 @@ import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; import com.alibaba.druid.sql.ast.statement.SQLExprTableSource; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitorAdapter; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.RewriteRule; +import org.opensearch.sql.legacy.rewriter.RewriteRule; /** * Rewrite rule to anonymize sensitive data in logging queries. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/identifier/UnquoteIdentifierRule.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/identifier/UnquoteIdentifierRule.java similarity index 89% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/identifier/UnquoteIdentifierRule.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/identifier/UnquoteIdentifierRule.java index f57bb37ef6..05749fb81c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/identifier/UnquoteIdentifierRule.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/identifier/UnquoteIdentifierRule.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.identifier; +package org.opensearch.sql.legacy.rewriter.identifier; + +import static org.opensearch.sql.legacy.utils.StringUtils.unquoteFullColumn; +import static org.opensearch.sql.legacy.utils.StringUtils.unquoteSingleField; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; import com.alibaba.druid.sql.ast.statement.SQLExprTableSource; import com.alibaba.druid.sql.ast.statement.SQLSelectItem; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitorAdapter; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.RewriteRule; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils.unquoteFullColumn; -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils.unquoteSingleField; +import org.opensearch.sql.legacy.rewriter.RewriteRule; /** * Quoted Identifiers Rewriter Rule diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/join/JoinRewriteRule.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/join/JoinRewriteRule.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/join/JoinRewriteRule.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/join/JoinRewriteRule.java index 07ed2a8196..d0ebc9642f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/join/JoinRewriteRule.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/join/JoinRewriteRule.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.join; +package org.opensearch.sql.legacy.rewriter.join; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; @@ -33,20 +33,19 @@ import com.alibaba.druid.sql.ast.statement.SQLSelectQuery; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitorAdapter; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping.FieldMappings; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.RewriteRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm.VerificationException; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; - import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.function.Consumer; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.esdomain.mapping.FieldMappings; +import org.opensearch.sql.legacy.rewriter.RewriteRule; +import org.opensearch.sql.legacy.rewriter.matchtoterm.VerificationException; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Rewrite rule to add table alias to columnNames for JOIN queries without table alias. @@ -235,4 +234,4 @@ public String toString() { return this.name + "-->" + this.alias; } } -} \ No newline at end of file +} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/matchtoterm/TermFieldRewriter.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/matchtoterm/TermFieldRewriter.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/matchtoterm/TermFieldRewriter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/matchtoterm/TermFieldRewriter.java index 754606b171..a34b0825d7 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/matchtoterm/TermFieldRewriter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/matchtoterm/TermFieldRewriter.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm; +package org.opensearch.sql.legacy.rewriter.matchtoterm; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.SQLObject; @@ -43,16 +43,15 @@ import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitorAdapter; import com.alibaba.druid.sql.parser.ParserException; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping.FieldMappings; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping.IndexMappings; - import java.util.ArrayDeque; import java.util.Deque; import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util.stream.Stream; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.esdomain.mapping.FieldMappings; +import org.opensearch.sql.legacy.esdomain.mapping.IndexMappings; /** * Visitor to rewrite AST (abstract syntax tree) for supporting term_query in WHERE and IN condition diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/matchtoterm/TermFieldScope.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/matchtoterm/TermFieldScope.java similarity index 92% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/matchtoterm/TermFieldScope.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/matchtoterm/TermFieldScope.java index 67cf036017..70f6bf9de8 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/matchtoterm/TermFieldScope.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/matchtoterm/TermFieldScope.java @@ -24,11 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm; - -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping.FieldMappings; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping.IndexMappings; -import org.json.JSONObject; +package org.opensearch.sql.legacy.rewriter.matchtoterm; import java.util.HashMap; import java.util.Locale; @@ -36,6 +32,9 @@ import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; +import org.json.JSONObject; +import org.opensearch.sql.legacy.esdomain.mapping.FieldMappings; +import org.opensearch.sql.legacy.esdomain.mapping.IndexMappings; /** * Index Mapping information in current query being visited. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/matchtoterm/VerificationException.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/matchtoterm/VerificationException.java similarity index 93% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/matchtoterm/VerificationException.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/matchtoterm/VerificationException.java index 5cc73eb8e1..715c95b4d2 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/matchtoterm/VerificationException.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/matchtoterm/VerificationException.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm; +package org.opensearch.sql.legacy.rewriter.matchtoterm; import org.opensearch.OpenSearchException; import org.opensearch.rest.RestStatus; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/From.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/From.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/From.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/From.java index 85924cd43f..6249f2b8c6 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/From.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/From.java @@ -24,7 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.nestedfield; +package org.opensearch.sql.legacy.rewriter.nestedfield; + +import static com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType.COMMA; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.ast.statement.SQLExprTableSource; @@ -32,8 +34,6 @@ import com.alibaba.druid.sql.ast.statement.SQLTableSource; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; -import static com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType.COMMA; - /** * Table (OpenSearch Index) expression in FROM statement. */ diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/Identifier.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/Identifier.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/Identifier.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/Identifier.java index 01ec704fb8..88e716d81b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/Identifier.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/Identifier.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.nestedfield; +package org.opensearch.sql.legacy.rewriter.nestedfield; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/NestedFieldProjection.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/NestedFieldProjection.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/NestedFieldProjection.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/NestedFieldProjection.java index b9f16fd5a6..5439209bac 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/NestedFieldProjection.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/NestedFieldProjection.java @@ -24,18 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.nestedfield; +package org.opensearch.sql.legacy.rewriter.nestedfield; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm.VerificationException; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; -import org.apache.lucene.search.join.ScoreMode; -import org.opensearch.action.search.SearchRequestBuilder; -import org.opensearch.index.query.BoolQueryBuilder; -import org.opensearch.index.query.InnerHitBuilder; -import org.opensearch.index.query.NestedQueryBuilder; -import org.opensearch.index.query.QueryBuilder; -import org.opensearch.search.fetch.subphase.FetchSourceContext; +import static com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType; +import static java.util.stream.Collectors.groupingBy; +import static java.util.stream.Collectors.mapping; +import static java.util.stream.Collectors.toList; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.existsQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.nestedQuery; import java.util.ArrayList; import java.util.Collection; @@ -44,15 +42,16 @@ import java.util.function.Predicate; import java.util.function.Supplier; import java.util.stream.Stream; - -import static java.util.stream.Collectors.groupingBy; -import static java.util.stream.Collectors.mapping; -import static java.util.stream.Collectors.toList; -import static org.opensearch.index.query.QueryBuilders.boolQuery; -import static org.opensearch.index.query.QueryBuilders.matchAllQuery; -import static org.opensearch.index.query.QueryBuilders.nestedQuery; -import static org.opensearch.index.query.QueryBuilders.existsQuery; -import static com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType; +import org.apache.lucene.search.join.ScoreMode; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.index.query.BoolQueryBuilder; +import org.opensearch.index.query.InnerHitBuilder; +import org.opensearch.index.query.NestedQueryBuilder; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.search.fetch.subphase.FetchSourceContext; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.rewriter.matchtoterm.VerificationException; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Nested field projection class to make OpenSearch return matched rows in nested field. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/NestedFieldRewriter.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/NestedFieldRewriter.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/NestedFieldRewriter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/NestedFieldRewriter.java index bd846f6f83..7bfe974b63 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/NestedFieldRewriter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/NestedFieldRewriter.java @@ -24,18 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.nestedfield; +package org.opensearch.sql.legacy.rewriter.nestedfield; + +import static org.opensearch.sql.legacy.utils.Util.NESTED_JOIN_TYPE; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitorAdapter; - import java.util.ArrayDeque; import java.util.Deque; -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util.NESTED_JOIN_TYPE; - /** * Visitor to rewrite AST (abstract syntax tree) for nested type fields to support implicit nested() function call. * Intuitively, the approach is to implement SQLIdentifier.visit() and wrap nested() function for nested field. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/SQLClause.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/SQLClause.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/SQLClause.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/SQLClause.java index dae0cfb3c5..38a35b4be6 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/SQLClause.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/SQLClause.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.nestedfield; +package org.opensearch.sql.legacy.rewriter.nestedfield; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.SQLObject; @@ -38,9 +38,8 @@ import com.alibaba.druid.sql.ast.statement.SQLSelectOrderByItem; import com.alibaba.druid.sql.dialect.mysql.ast.expr.MySqlSelectGroupByExpr; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; - import java.util.List; +import org.opensearch.sql.legacy.utils.Util; /** * Abstract class for SQL clause domain class. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/Scope.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/Scope.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/Scope.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/Scope.java index 01f2ae7834..b3e1ffacdc 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/Scope.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/Scope.java @@ -24,17 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.nestedfield; +package org.opensearch.sql.legacy.rewriter.nestedfield; -import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; +import static com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType; +import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; import java.util.HashMap; import java.util.IdentityHashMap; import java.util.Map; import java.util.Set; -import static com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType; - /** * Nested field information in current query being visited. */ diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/Select.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/Select.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/Select.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/Select.java index ba137d0692..91686622d2 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/Select.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/Select.java @@ -24,12 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.nestedfield; +package org.opensearch.sql.legacy.rewriter.nestedfield; import com.alibaba.druid.sql.ast.expr.SQLAllColumnExpr; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.ast.statement.SQLSelectItem; - import java.util.List; /** diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/Where.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/Where.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/Where.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/Where.java index 0e7642f2fb..caded93328 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/nestedfield/Where.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/nestedfield/Where.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.nestedfield; +package org.opensearch.sql.legacy.rewriter.nestedfield; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; import com.alibaba.druid.sql.ast.expr.SQLCharExpr; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/ordinal/OrdinalRewriterRule.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/ordinal/OrdinalRewriterRule.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/ordinal/OrdinalRewriterRule.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/ordinal/OrdinalRewriterRule.java index c817818158..2dce11bde8 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/ordinal/OrdinalRewriterRule.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/ordinal/OrdinalRewriterRule.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.ordinal; +package org.opensearch.sql.legacy.rewriter.ordinal; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; @@ -37,11 +37,10 @@ import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitorAdapter; import com.alibaba.druid.sql.parser.SQLExprParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.ElasticSqlExprParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.RewriteRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm.VerificationException; - import java.util.List; +import org.opensearch.sql.legacy.parser.ElasticSqlExprParser; +import org.opensearch.sql.legacy.rewriter.RewriteRule; +import org.opensearch.sql.legacy.rewriter.matchtoterm.VerificationException; /** * Rewrite rule for changing ordinal alias in order by and group by to actual select field. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/parent/SQLExprParentSetter.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/parent/SQLExprParentSetter.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/parent/SQLExprParentSetter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/parent/SQLExprParentSetter.java index 2d6b9d380b..4f76615f0f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/parent/SQLExprParentSetter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/parent/SQLExprParentSetter.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.parent; +package org.opensearch.sql.legacy.rewriter.parent; import com.alibaba.druid.sql.ast.expr.SQLInListExpr; import com.alibaba.druid.sql.ast.expr.SQLInSubQueryExpr; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/parent/SQLExprParentSetterRule.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/parent/SQLExprParentSetterRule.java similarity index 89% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/parent/SQLExprParentSetterRule.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/parent/SQLExprParentSetterRule.java index f32fa69170..d42af1eb4c 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/parent/SQLExprParentSetterRule.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/parent/SQLExprParentSetterRule.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.parent; +package org.opensearch.sql.legacy.rewriter.parent; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.RewriteRule; +import org.opensearch.sql.legacy.rewriter.RewriteRule; /** * The {@link RewriteRule} which will apply {@link SQLExprParentSetter} for {@link SQLQueryExpr} diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/NestedQueryContext.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/NestedQueryContext.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/NestedQueryContext.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/NestedQueryContext.java index e8734a5b14..acefbb396b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/NestedQueryContext.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/NestedQueryContext.java @@ -24,13 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery; +package org.opensearch.sql.legacy.rewriter.subquery; import com.alibaba.druid.sql.ast.statement.SQLExprTableSource; import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource; import com.alibaba.druid.sql.ast.statement.SQLTableSource; import com.google.common.base.Strings; - import java.util.HashMap; import java.util.Map; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/RewriterContext.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/RewriterContext.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/RewriterContext.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/RewriterContext.java index 350a177ee6..2c4cd26003 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/RewriterContext.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/RewriterContext.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery; +package org.opensearch.sql.legacy.rewriter.subquery; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; @@ -34,7 +34,6 @@ import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource; import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType; import com.alibaba.druid.sql.ast.statement.SQLTableSource; - import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Deque; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/SubQueryRewriteRule.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/SubQueryRewriteRule.java similarity index 87% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/SubQueryRewriteRule.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/SubQueryRewriteRule.java index 7158e464e2..fc5b4f17b3 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/SubQueryRewriteRule.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/SubQueryRewriteRule.java @@ -24,14 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery; +package org.opensearch.sql.legacy.rewriter.subquery; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.RewriteRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.rewriter.SubqueryAliasRewriter; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.utils.FindSubQuery; - import java.sql.SQLFeatureNotSupportedException; +import org.opensearch.sql.legacy.rewriter.RewriteRule; +import org.opensearch.sql.legacy.rewriter.subquery.rewriter.SubqueryAliasRewriter; +import org.opensearch.sql.legacy.rewriter.subquery.utils.FindSubQuery; /** * Subquery Rewriter Rule. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/SubQueryRewriter.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/SubQueryRewriter.java similarity index 91% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/SubQueryRewriter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/SubQueryRewriter.java index fc88bac00f..f686afa35e 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/SubQueryRewriter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/SubQueryRewriter.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery; +package org.opensearch.sql.legacy.rewriter.subquery; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; @@ -34,9 +34,9 @@ import com.alibaba.druid.sql.ast.statement.SQLSelectQuery; import com.alibaba.druid.sql.ast.statement.SQLTableSource; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.rewriter.Rewriter; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.rewriter.RewriterFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.utils.FindSubQuery; +import org.opensearch.sql.legacy.rewriter.subquery.rewriter.Rewriter; +import org.opensearch.sql.legacy.rewriter.subquery.rewriter.RewriterFactory; +import org.opensearch.sql.legacy.rewriter.subquery.utils.FindSubQuery; public class SubQueryRewriter { private final RewriterContext ctx = new RewriterContext(); diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/InRewriter.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/InRewriter.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/InRewriter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/InRewriter.java index 3b35cf41ed..39dee94169 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/InRewriter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/InRewriter.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.rewriter; +package org.opensearch.sql.legacy.rewriter.subquery.rewriter; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; @@ -34,7 +34,7 @@ import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType; import com.alibaba.druid.sql.ast.statement.SQLTableSource; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.RewriterContext; +import org.opensearch.sql.legacy.rewriter.subquery.RewriterContext; /** * IN Subquery Rewriter. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/NestedExistsRewriter.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/NestedExistsRewriter.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/NestedExistsRewriter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/NestedExistsRewriter.java index fe5f5a198a..c434f73582 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/NestedExistsRewriter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/NestedExistsRewriter.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.rewriter; +package org.opensearch.sql.legacy.rewriter.subquery.rewriter; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; @@ -35,7 +35,7 @@ import com.alibaba.druid.sql.ast.statement.SQLExprTableSource; import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.RewriterContext; +import org.opensearch.sql.legacy.rewriter.subquery.RewriterContext; /** * Nested EXISTS SQL Rewriter. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/Rewriter.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/Rewriter.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/Rewriter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/Rewriter.java index 29ee57857a..468c7a6d87 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/Rewriter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/Rewriter.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.rewriter; +package org.opensearch.sql.legacy.rewriter.subquery.rewriter; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOperator; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/RewriterFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/RewriterFactory.java similarity index 92% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/RewriterFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/RewriterFactory.java index 5c8954ce9d..5cecc7a107 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/RewriterFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/RewriterFactory.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.rewriter; +package org.opensearch.sql.legacy.rewriter.subquery.rewriter; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLExistsExpr; import com.alibaba.druid.sql.ast.expr.SQLInSubQueryExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.RewriterContext; import com.google.common.collect.ImmutableList; - import java.util.List; +import org.opensearch.sql.legacy.rewriter.subquery.RewriterContext; /** * Factory for generating the {@link Rewriter}. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/SubqueryAliasRewriter.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/SubqueryAliasRewriter.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/SubqueryAliasRewriter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/SubqueryAliasRewriter.java index 00c6e33eb9..8198e34c25 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/rewriter/SubqueryAliasRewriter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/rewriter/SubqueryAliasRewriter.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.rewriter; +package org.opensearch.sql.legacy.rewriter.subquery.rewriter; import com.alibaba.druid.sql.ast.expr.SQLAllColumnExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; @@ -36,7 +36,6 @@ import com.alibaba.druid.sql.ast.statement.SQLTableSource; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitorAdapter; - import java.util.ArrayDeque; import java.util.Deque; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/utils/FindSubQuery.java b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/utils/FindSubQuery.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/utils/FindSubQuery.java rename to legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/utils/FindSubQuery.java index 193fed70aa..b0c0843462 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/subquery/utils/FindSubQuery.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/rewriter/subquery/utils/FindSubQuery.java @@ -24,12 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.utils; +package org.opensearch.sql.legacy.rewriter.subquery.utils; import com.alibaba.druid.sql.ast.expr.SQLExistsExpr; import com.alibaba.druid.sql.ast.expr.SQLInSubQueryExpr; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitorAdapter; - import java.util.ArrayList; import java.util.List; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/BoundingBoxFilterParams.java b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/BoundingBoxFilterParams.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/BoundingBoxFilterParams.java rename to legacy/src/main/java/org/opensearch/sql/legacy/spatial/BoundingBoxFilterParams.java index be1a8c5e9f..8d235bf0c7 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/BoundingBoxFilterParams.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/BoundingBoxFilterParams.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.spatial; +package org.opensearch.sql.legacy.spatial; /** * Created by Eliran on 1/8/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/CellFilterParams.java b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/CellFilterParams.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/CellFilterParams.java rename to legacy/src/main/java/org/opensearch/sql/legacy/spatial/CellFilterParams.java index 0cab0c68e1..a71e566c60 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/CellFilterParams.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/CellFilterParams.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.spatial; +package org.opensearch.sql.legacy.spatial; /** * Created by Eliran on 15/8/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/DistanceFilterParams.java b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/DistanceFilterParams.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/DistanceFilterParams.java rename to legacy/src/main/java/org/opensearch/sql/legacy/spatial/DistanceFilterParams.java index 6c18ce9a4d..36142cfaab 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/DistanceFilterParams.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/DistanceFilterParams.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.spatial; +package org.opensearch.sql.legacy.spatial; /** * Created by Eliran on 1/8/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/Point.java b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/Point.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/Point.java rename to legacy/src/main/java/org/opensearch/sql/legacy/spatial/Point.java index 67e9c08cb9..f9f0d0f399 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/Point.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/Point.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.spatial; +package org.opensearch.sql.legacy.spatial; /** * Created by Eliran on 1/8/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/PolygonFilterParams.java b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/PolygonFilterParams.java similarity index 94% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/PolygonFilterParams.java rename to legacy/src/main/java/org/opensearch/sql/legacy/spatial/PolygonFilterParams.java index 7f5d13faba..962205a443 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/PolygonFilterParams.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/PolygonFilterParams.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.spatial; +package org.opensearch.sql.legacy.spatial; import java.util.List; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/RangeDistanceFilterParams.java b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/RangeDistanceFilterParams.java similarity index 95% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/RangeDistanceFilterParams.java rename to legacy/src/main/java/org/opensearch/sql/legacy/spatial/RangeDistanceFilterParams.java index b376be9191..791163c13b 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/RangeDistanceFilterParams.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/RangeDistanceFilterParams.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.spatial; +package org.opensearch.sql.legacy.spatial; /** * Created by Eliran on 15/8/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/SpatialParamsFactory.java b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/SpatialParamsFactory.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/SpatialParamsFactory.java rename to legacy/src/main/java/org/opensearch/sql/legacy/spatial/SpatialParamsFactory.java index c00ce70776..316a5873c3 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/SpatialParamsFactory.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/SpatialParamsFactory.java @@ -24,11 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.spatial; +package org.opensearch.sql.legacy.spatial; import com.alibaba.druid.sql.ast.SQLExpr; - import java.util.HashSet; import java.util.LinkedList; import java.util.List; diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/WktToGeoJsonConverter.java b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/WktToGeoJsonConverter.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/WktToGeoJsonConverter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/spatial/WktToGeoJsonConverter.java index 81ee7c5bcc..cf9ee821ab 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/spatial/WktToGeoJsonConverter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/spatial/WktToGeoJsonConverter.java @@ -24,13 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.spatial; +package org.opensearch.sql.legacy.spatial; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; import com.google.common.base.Joiner; - import java.util.ArrayList; import java.util.List; +import org.opensearch.sql.legacy.utils.StringUtils; /** * Created by Eliran on 4/8/2015. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/JsonPrettyFormatter.java b/legacy/src/main/java/org/opensearch/sql/legacy/utils/JsonPrettyFormatter.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/JsonPrettyFormatter.java rename to legacy/src/main/java/org/opensearch/sql/legacy/utils/JsonPrettyFormatter.java index f242a6cd43..b96667d1ff 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/JsonPrettyFormatter.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/utils/JsonPrettyFormatter.java @@ -24,8 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.utils; +package org.opensearch.sql.legacy.utils; +import java.io.IOException; import org.opensearch.common.Strings; import org.opensearch.common.xcontent.LoggingDeprecationHandler; import org.opensearch.common.xcontent.NamedXContentRegistry; @@ -34,8 +35,6 @@ import org.opensearch.common.xcontent.XContentParser; import org.opensearch.common.xcontent.XContentType; -import java.io.IOException; - /** * Utility Class for formatting Json string pretty. */ diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/LogUtils.java b/legacy/src/main/java/org/opensearch/sql/legacy/utils/LogUtils.java similarity index 97% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/LogUtils.java rename to legacy/src/main/java/org/opensearch/sql/legacy/utils/LogUtils.java index 089586a9f4..fa9d2fc20f 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/LogUtils.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/utils/LogUtils.java @@ -24,12 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.utils; - -import org.apache.logging.log4j.ThreadContext; +package org.opensearch.sql.legacy.utils; import java.util.Map; import java.util.UUID; +import org.apache.logging.log4j.ThreadContext; /** * Utility class for generating/accessing the request id from logging context. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/QueryDataAnonymizer.java b/legacy/src/main/java/org/opensearch/sql/legacy/utils/QueryDataAnonymizer.java similarity index 90% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/QueryDataAnonymizer.java rename to legacy/src/main/java/org/opensearch/sql/legacy/utils/QueryDataAnonymizer.java index fe3e1db6fc..4530d3cd82 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/QueryDataAnonymizer.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/utils/QueryDataAnonymizer.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.utils; +package org.opensearch.sql.legacy.utils; + +import static org.opensearch.sql.legacy.utils.Util.toSqlExpr; import com.alibaba.druid.sql.SQLUtils; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.identifier.AnonymizeSensitiveDataRule; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util.toSqlExpr; +import org.opensearch.sql.legacy.rewriter.identifier.AnonymizeSensitiveDataRule; /** * Utility class to mask sensitive information in incoming SQL queries diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/SQLFunctions.java b/legacy/src/main/java/org/opensearch/sql/legacy/utils/SQLFunctions.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/SQLFunctions.java rename to legacy/src/main/java/org/opensearch/sql/legacy/utils/SQLFunctions.java index 637900047d..899441efc3 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/SQLFunctions.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/utils/SQLFunctions.java @@ -24,7 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.utils; +package org.opensearch.sql.legacy.utils; + +import static org.opensearch.sql.legacy.utils.StringUtils.format; +import static org.opensearch.sql.legacy.utils.StringUtils.isQuoted; import com.alibaba.druid.sql.SQLUtils; import com.alibaba.druid.sql.ast.SQLExpr; @@ -37,18 +40,10 @@ import com.alibaba.druid.sql.ast.expr.SQLPropertyExpr; import com.alibaba.druid.sql.ast.expr.SQLTextLiteralExpr; import com.alibaba.druid.sql.ast.expr.SQLVariantRefExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.KVValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.MethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.ScriptMethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.Schema; import com.google.common.base.Joiner; import com.google.common.base.Strings; import com.google.common.collect.Lists; import com.google.common.collect.Sets; -import org.opensearch.common.collect.Tuple; - import java.util.HashMap; import java.util.List; import java.util.Locale; @@ -56,9 +51,13 @@ import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils.format; -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils.isQuoted; +import org.opensearch.common.collect.Tuple; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.KVValue; +import org.opensearch.sql.legacy.domain.MethodField; +import org.opensearch.sql.legacy.domain.ScriptMethodField; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.executor.format.Schema; /** * Created by allwefantasy on 8/19/16. diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/StringUtils.java b/legacy/src/main/java/org/opensearch/sql/legacy/utils/StringUtils.java similarity index 98% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/StringUtils.java rename to legacy/src/main/java/org/opensearch/sql/legacy/utils/StringUtils.java index 5754f3d5db..0f17bb7ecd 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/StringUtils.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/utils/StringUtils.java @@ -24,11 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.utils; +package org.opensearch.sql.legacy.utils; import com.google.common.base.Strings; import com.google.common.primitives.Doubles; - import java.util.Locale; /** diff --git a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/Util.java b/legacy/src/main/java/org/opensearch/sql/legacy/utils/Util.java similarity index 96% rename from legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/Util.java rename to legacy/src/main/java/org/opensearch/sql/legacy/utils/Util.java index c6e199abb2..5411332dc7 100644 --- a/legacy/src/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/utils/Util.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/utils/Util.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.utils; +package org.opensearch.sql.legacy.utils; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.SQLObject; @@ -45,19 +45,18 @@ import com.alibaba.druid.sql.parser.ParserException; import com.alibaba.druid.sql.parser.SQLExprParser; import com.alibaba.druid.sql.parser.Token; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.IndexStatement; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.KVValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.ElasticSqlExprParser; -import org.opensearch.action.admin.indices.get.GetIndexRequest; -import org.opensearch.action.admin.indices.get.GetIndexRequestBuilder; -import org.opensearch.client.Client; - import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; +import org.opensearch.action.admin.indices.get.GetIndexRequest; +import org.opensearch.action.admin.indices.get.GetIndexRequestBuilder; +import org.opensearch.client.Client; +import org.opensearch.sql.legacy.domain.IndexStatement; +import org.opensearch.sql.legacy.domain.KVValue; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.parser.ElasticSqlExprParser; public class Util { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SymbolSimilarityTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/SymbolSimilarityTest.java similarity index 97% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SymbolSimilarityTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/SymbolSimilarityTest.java index 3807b7ba44..259543f600 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SymbolSimilarityTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/SymbolSimilarityTest.java @@ -24,16 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr; +package org.opensearch.sql.legacy.antlr; -import org.junit.Assert; -import org.junit.Test; +import static java.util.Collections.emptyList; +import static java.util.Collections.singletonList; import java.util.Arrays; import java.util.List; - -import static java.util.Collections.emptyList; -import static java.util.Collections.singletonList; +import org.junit.Assert; +import org.junit.Test; /** * Test cases for symbol similarity diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SyntaxAnalysisTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/SyntaxAnalysisTest.java similarity index 97% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SyntaxAnalysisTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/SyntaxAnalysisTest.java index fed8dee13d..65968d3477 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/SyntaxAnalysisTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/SyntaxAnalysisTest.java @@ -24,18 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr; +package org.opensearch.sql.legacy.antlr; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.syntax.SyntaxAnalysisException; +import static java.util.stream.Collectors.toList; +import static org.hamcrest.Matchers.allOf; + +import java.util.Arrays; import org.hamcrest.Matchers; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; - -import java.util.Arrays; - -import static java.util.stream.Collectors.toList; -import static org.hamcrest.Matchers.allOf; +import org.opensearch.sql.legacy.antlr.syntax.SyntaxAnalysisException; /** * Test cases focused on illegal syntax testing (blacklist) along with a few normal cases not covered previously. diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerAggregateFunctionTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerAggregateFunctionTest.java similarity index 98% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerAggregateFunctionTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerAggregateFunctionTest.java index 3365c10662..d2850ad0bf 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerAggregateFunctionTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerAggregateFunctionTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; import org.junit.Ignore; import org.junit.Test; diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerBasicTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerBasicTest.java similarity index 93% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerBasicTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerBasicTest.java index 5a30f65ec9..58adec6bf3 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerBasicTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerBasicTest.java @@ -24,38 +24,37 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope.Namespace; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope.SemanticContext; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope.Symbol; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.visitor.OpenSearchMappingLoader; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -import java.util.Map; -import java.util.Optional; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.GEO_POINT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.KEYWORD; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.OBJECT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TEXT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.INDEX; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.NESTED_FIELD; import static org.hamcrest.Matchers.aMapWithSize; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.hasEntry; import static org.junit.Assert.assertThat; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DOUBLE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.GEO_POINT; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.KEYWORD; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.LONG; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.OBJECT; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TEXT; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.INDEX; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.NESTED_FIELD; + +import java.util.Map; +import java.util.Optional; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.opensearch.sql.legacy.antlr.semantic.scope.Namespace; +import org.opensearch.sql.legacy.antlr.semantic.scope.SemanticContext; +import org.opensearch.sql.legacy.antlr.semantic.scope.Symbol; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex; +import org.opensearch.sql.legacy.antlr.semantic.visitor.OpenSearchMappingLoader; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; /** * Semantic analysis test cases focused on basic scope building logic which is the cornerstone of analysis followed. diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerConfigTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerConfigTest.java similarity index 90% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerConfigTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerConfigTest.java index b31a833c6a..382bc5ef30 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerConfigTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerConfigTest.java @@ -24,19 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; - -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.OpenSearchLegacySqlAnalyzer; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.SqlAnalysisConfig; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; +package org.opensearch.sql.legacy.antlr.semantic; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.opensearch.sql.legacy.antlr.OpenSearchLegacySqlAnalyzer; +import org.opensearch.sql.legacy.antlr.SqlAnalysisConfig; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; + /** * Test cases for semantic analysis configuration */ diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerConstantTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerConstantTest.java similarity index 94% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerConstantTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerConstantTest.java index 8beb4fb906..64ae0fe11a 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerConstantTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerConstantTest.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; import org.junit.Test; diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerESScalarFunctionTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerESScalarFunctionTest.java similarity index 97% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerESScalarFunctionTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerESScalarFunctionTest.java index 20eba9ade3..6cee913fba 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerESScalarFunctionTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerESScalarFunctionTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; import org.junit.Test; diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerFieldTypeTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerFieldTypeTest.java similarity index 95% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerFieldTypeTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerFieldTypeTest.java index 671c66958a..cf5be11d99 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerFieldTypeTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerFieldTypeTest.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; + +import static org.opensearch.sql.legacy.util.MultipleIndexClusterUtils.mockMultipleIndexEnv; import org.junit.Before; import org.junit.Test; -import static com.amazon.opendistroforelasticsearch.sql.legacy.util.MultipleIndexClusterUtils.mockMultipleIndexEnv; - public class SemanticAnalyzerFieldTypeTest extends SemanticAnalyzerTestBase { @Before public void setup() { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerFromClauseTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerFromClauseTest.java similarity index 99% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerFromClauseTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerFromClauseTest.java index c60c089b27..a6de45386f 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerFromClauseTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerFromClauseTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; import org.junit.Ignore; import org.junit.Test; diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerIdentifierTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerIdentifierTest.java similarity index 98% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerIdentifierTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerIdentifierTest.java index e49436f958..e25b4b5e0c 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerIdentifierTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerIdentifierTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; import org.junit.Ignore; import org.junit.Test; diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerMultiQueryTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerMultiQueryTest.java similarity index 98% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerMultiQueryTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerMultiQueryTest.java index 7c917591f1..e393be6f00 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerMultiQueryTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerMultiQueryTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; import org.junit.Ignore; import org.junit.Test; diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerOperatorTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerOperatorTest.java similarity index 97% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerOperatorTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerOperatorTest.java index e982820477..5aab97a488 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerOperatorTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerOperatorTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; import org.junit.Test; diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerScalarFunctionTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerScalarFunctionTest.java similarity index 98% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerScalarFunctionTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerScalarFunctionTest.java index 3ed6cc3472..a867d81683 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerScalarFunctionTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerScalarFunctionTest.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; import org.junit.Ignore; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; import org.junit.Test; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; /** * Semantic analysis tests for scalar function. diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerSubqueryTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerSubqueryTest.java similarity index 96% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerSubqueryTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerSubqueryTest.java index 1e44a96917..c42fb24ae0 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerSubqueryTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerSubqueryTest.java @@ -24,10 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor.EarlyExitAnalysisException; import org.junit.Test; +import org.opensearch.sql.legacy.antlr.visitor.EarlyExitAnalysisException; /** * Semantic analysis test for subquery diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerTestBase.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerTestBase.java similarity index 85% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerTestBase.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerTestBase.java index a1d14dd3c1..9548656f17 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerTestBase.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerTestBase.java @@ -24,30 +24,29 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; + +import static java.util.stream.Collectors.toList; +import static org.hamcrest.Matchers.allOf; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.opensearch.sql.legacy.util.CheckScriptContents.mockLocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.OpenSearchLegacySqlAnalyzer; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.SqlAnalysisConfig; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; import com.google.common.base.Charsets; import com.google.common.io.Resources; +import java.io.IOException; +import java.net.URL; +import java.util.Arrays; +import java.util.Optional; import org.hamcrest.Matchers; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Rule; import org.junit.rules.ExpectedException; - -import java.io.IOException; -import java.net.URL; -import java.util.Arrays; -import java.util.Optional; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.util.CheckScriptContents.mockLocalClusterState; -import static java.util.stream.Collectors.toList; -import static org.hamcrest.Matchers.allOf; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.opensearch.sql.legacy.antlr.OpenSearchLegacySqlAnalyzer; +import org.opensearch.sql.legacy.antlr.SqlAnalysisConfig; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; /** * Test cases for semantic analysis focused on semantic check which was missing in the past. diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerTests.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerTests.java similarity index 95% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerTests.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerTests.java index 7003764c1d..cece801029 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/SemanticAnalyzerTests.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/SemanticAnalyzerTests.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic; +package org.opensearch.sql.legacy.antlr.semantic; import org.junit.runner.RunWith; import org.junit.runners.Suite; diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/EnvironmentTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/scope/EnvironmentTest.java similarity index 87% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/EnvironmentTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/scope/EnvironmentTest.java index 650718be52..3ba472387c 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/EnvironmentTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/scope/EnvironmentTest.java @@ -24,25 +24,24 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope; +package org.opensearch.sql.legacy.antlr.semantic.scope; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex; -import org.junit.Assert; -import org.junit.Test; - -import java.util.Map; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.KEYWORD; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.OBJECT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TEXT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.NESTED_FIELD; import static org.hamcrest.Matchers.aMapWithSize; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.hasEntry; import static org.junit.Assert.assertThat; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.KEYWORD; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.OBJECT; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TEXT; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.NESTED_FIELD; + +import java.util.Map; +import org.junit.Assert; +import org.junit.Test; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex; /** * Test cases for environment diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/SemanticContextTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/scope/SemanticContextTest.java similarity index 95% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/SemanticContextTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/scope/SemanticContextTest.java index c0d859a66a..42165826c8 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/SemanticContextTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/scope/SemanticContextTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope; +package org.opensearch.sql.legacy.antlr.semantic.scope; import org.junit.Assert; import org.junit.Test; diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/SymbolTableTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/scope/SymbolTableTest.java similarity index 77% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/SymbolTableTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/scope/SymbolTableTest.java index 475469473c..df0a3e6948 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/SymbolTableTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/scope/SymbolTableTest.java @@ -24,27 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope; +package org.opensearch.sql.legacy.antlr.semantic.scope; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.TypeExpression; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex; -import org.junit.Assert; -import org.junit.Test; - -import java.util.Map; -import java.util.Optional; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.KEYWORD; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TEXT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.NESTED_FIELD; import static org.hamcrest.Matchers.aMapWithSize; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.hasEntry; import static org.junit.Assert.assertThat; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.KEYWORD; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TEXT; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.NESTED_FIELD; + +import java.util.Map; +import java.util.Optional; +import org.junit.Assert; +import org.junit.Test; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.antlr.semantic.types.TypeExpression; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex; /** * Test cases for symbol table diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/TypeSupplierTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/scope/TypeSupplierTest.java similarity index 87% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/TypeSupplierTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/scope/TypeSupplierTest.java index 08ce3db630..ab3350840e 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/scope/TypeSupplierTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/scope/TypeSupplierTest.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope; +package org.opensearch.sql.legacy.antlr.semantic.scope; + +import static org.junit.Assert.assertEquals; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.SemanticAnalysisException; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; - -import static org.junit.Assert.assertEquals; +import org.opensearch.sql.legacy.antlr.semantic.SemanticAnalysisException; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; public class TypeSupplierTest { @Rule @@ -62,4 +62,4 @@ public void haveTwoTypesShouldThrowException() { exception.expectMessage("Field [age] have conflict type"); age.get(); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/BaseTypeTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/types/BaseTypeTest.java similarity index 63% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/BaseTypeTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/types/BaseTypeTest.java index 5fe462f92e..aa80ddebb8 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/BaseTypeTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/types/BaseTypeTest.java @@ -24,31 +24,31 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types; +package org.opensearch.sql.legacy.antlr.semantic.types; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex; -import org.junit.Ignore; -import org.junit.Test; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.OPENSEARCH_TYPE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.KEYWORD; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NESTED; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.SHORT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TEXT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.NESTED_FIELD; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DOUBLE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.FLOAT; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.KEYWORD; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.LONG; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NESTED; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.OPENSEARCH_TYPE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.SHORT; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.STRING; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TEXT; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex.IndexType.NESTED_FIELD; + +import org.junit.Ignore; +import org.junit.Test; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchIndex; /** * Test base type compatibility diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/GenericTypeTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/types/GenericTypeTest.java similarity index 64% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/GenericTypeTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/types/GenericTypeTest.java index 7d1d6ef029..d350c40cdf 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/GenericTypeTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/types/GenericTypeTest.java @@ -24,20 +24,20 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types; +package org.opensearch.sql.legacy.antlr.semantic.types; -import org.junit.Test; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.KEYWORD; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TEXT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.function.ScalarFunction.LOG; import static java.util.Collections.singletonList; import static org.junit.Assert.assertEquals; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DOUBLE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.KEYWORD; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.LONG; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TEXT; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; +import static org.opensearch.sql.legacy.antlr.semantic.types.function.ScalarFunction.LOG; + +import org.junit.Test; /** * Generic type test diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/ProductTypeTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/types/ProductTypeTest.java similarity index 80% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/ProductTypeTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/types/ProductTypeTest.java index b937f38797..411b49b614 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/ProductTypeTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/types/ProductTypeTest.java @@ -24,20 +24,19 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types; +package org.opensearch.sql.legacy.antlr.semantic.types; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.special.Product; -import org.junit.Assert; -import org.junit.Test; +import static java.util.Collections.singletonList; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.KEYWORD; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.STRING; import java.util.Arrays; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.KEYWORD; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.STRING; -import static java.util.Collections.singletonList; +import org.junit.Assert; +import org.junit.Test; +import org.opensearch.sql.legacy.antlr.semantic.types.special.Product; /** * Test cases fro product type diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/TypeExpressionTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/types/TypeExpressionTest.java similarity index 69% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/TypeExpressionTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/types/TypeExpressionTest.java index ca383eacd6..15bd2042fd 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/semantic/types/TypeExpressionTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/semantic/types/TypeExpressionTest.java @@ -24,23 +24,22 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types; +package org.opensearch.sql.legacy.antlr.semantic.types; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DOUBLE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.GEO_POINT; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.STRING; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; +import static org.opensearch.sql.legacy.antlr.semantic.types.special.Generic.T; import java.util.Arrays; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.GEO_POINT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.NUMBER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.TYPE_ERROR; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.special.Generic.T; -import static org.junit.Assert.assertEquals; +import org.junit.Test; /** * Test cases for default implementation methods in interface TypeExpression diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitorTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitorTest.java similarity index 80% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitorTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitorTest.java index f4e5e2a2aa..e7f5ce6224 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitorTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitorTest.java @@ -24,27 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.antlr.visitor; - -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.OpenSearchLegacySqlAnalyzer; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.SqlAnalysisConfig; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.scope.SemanticContext; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.Type; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.special.Product; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.visitor.TypeChecker; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlFeatureNotImplementedException; +package org.opensearch.sql.legacy.antlr.visitor; + +import static java.util.Collections.emptyList; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; +import static org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; + +import java.util.Arrays; import org.antlr.v4.runtime.tree.ParseTree; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; - -import java.util.Arrays; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType.UNKNOWN; -import static java.util.Collections.emptyList; +import org.opensearch.sql.legacy.antlr.OpenSearchLegacySqlAnalyzer; +import org.opensearch.sql.legacy.antlr.SqlAnalysisConfig; +import org.opensearch.sql.legacy.antlr.semantic.scope.SemanticContext; +import org.opensearch.sql.legacy.antlr.semantic.types.Type; +import org.opensearch.sql.legacy.antlr.semantic.types.special.Product; +import org.opensearch.sql.legacy.antlr.semantic.visitor.TypeChecker; +import org.opensearch.sql.legacy.exception.SqlFeatureNotImplementedException; /** * Test cases for AntlrSqlParseTreeVisitor diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/FieldMappingTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMappingTest.java similarity index 95% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/FieldMappingTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMappingTest.java index 2da8b486f4..17cddd3931 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/FieldMappingTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMappingTest.java @@ -24,22 +24,22 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping; +package org.opensearch.sql.legacy.esdomain.mapping; import static java.util.Collections.emptyMap; -import static org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsResponse.FieldMappingMetadata; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; +import static org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsResponse.FieldMappingMetadata; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.util.MatcherUtils; import com.google.common.collect.ImmutableMap; import java.util.Arrays; import java.util.Map; import java.util.stream.Collectors; -import org.opensearch.common.bytes.BytesArray; import org.hamcrest.Matcher; import org.junit.Test; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.util.MatcherUtils; /** * Unit test for {@code FieldMapping} with trivial methods ignored such as isSpecified, isMetaField etc. @@ -147,4 +147,4 @@ private Map fieldsSpecifiedInQuery(String...fieldNames) { name -> new Field(name, ""))); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/FieldMappingsTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMappingsTest.java similarity index 91% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/FieldMappingsTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMappingsTest.java index 6f0fd24b75..392a152057 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/esdomain/mapping/FieldMappingsTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMappingsTest.java @@ -24,25 +24,24 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.mapping; +package org.opensearch.sql.legacy.esdomain.mapping; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.aMapWithSize; +import static org.hamcrest.Matchers.allOf; +import static org.hamcrest.Matchers.hasEntry; +import static org.opensearch.sql.legacy.util.CheckScriptContents.mockLocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; import com.google.common.base.Charsets; import com.google.common.io.Resources; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - import java.io.IOException; import java.net.URL; import java.util.HashMap; import java.util.Map; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.util.CheckScriptContents.mockLocalClusterState; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.aMapWithSize; -import static org.hamcrest.Matchers.allOf; -import static org.hamcrest.Matchers.hasEntry; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; /** * Test for FieldMappings class diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/AsyncRestExecutorTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/executor/AsyncRestExecutorTest.java similarity index 90% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/AsyncRestExecutorTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/executor/AsyncRestExecutorTest.java index 87b6de0bc0..e14d241226 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/AsyncRestExecutorTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/executor/AsyncRestExecutorTest.java @@ -24,27 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor; - -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.request.SqlRequest; -import org.opensearch.client.Client; -import org.opensearch.rest.RestChannel; -import org.opensearch.threadpool.ThreadPool; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; - -import java.util.Map; -import java.util.function.Predicate; +package org.opensearch.sql.legacy.executor; import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; -import static org.opensearch.transport.TcpTransport.TRANSPORT_WORKER_THREAD_NAME_PREFIX; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; @@ -52,6 +35,22 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import static org.opensearch.transport.TcpTransport.TRANSPORT_WORKER_THREAD_NAME_PREFIX; + +import java.util.Map; +import java.util.function.Predicate; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.opensearch.client.Client; +import org.opensearch.rest.RestChannel; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.plugin.SqlSettings; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.request.SqlRequest; +import org.opensearch.threadpool.ThreadPool; /** * Test AsyncRestExecutor behavior. diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CSVResultTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/executor/csv/CSVResultTest.java similarity index 98% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CSVResultTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/executor/csv/CSVResultTest.java index 5886801a89..b1d6d66cfc 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/csv/CSVResultTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/executor/csv/CSVResultTest.java @@ -24,15 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.csv; +package org.opensearch.sql.legacy.executor.csv; -import org.junit.Test; +import static org.junit.Assert.assertEquals; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; - -import static org.junit.Assert.assertEquals; +import org.junit.Test; /** * Unit tests for {@link CSVResult} @@ -148,4 +147,4 @@ private final List> lines(List... lines) { return Arrays.stream(lines).collect(Collectors.toList()); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DateFieldFormatterTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/executor/format/DateFieldFormatterTest.java similarity index 99% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DateFieldFormatterTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/executor/format/DateFieldFormatterTest.java index 32a6777d57..c0fb30c2be 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/DateFieldFormatterTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/executor/format/DateFieldFormatterTest.java @@ -24,18 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; +package org.opensearch.sql.legacy.executor.format; + +import static org.junit.Assert.assertEquals; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import org.junit.Test; - import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; - -import static org.junit.Assert.*; +import org.junit.Test; public class DateFieldFormatterTest { @@ -720,4 +719,4 @@ private Map> buildDateFieldFormatMap(String columnName, Str .put(columnName, Arrays.asList(dateFormatProperty.split("\\|\\|"))) .build(); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ResultSetTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/executor/format/ResultSetTest.java similarity index 97% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ResultSetTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/executor/format/ResultSetTest.java index fc7d822f70..be40ab35cb 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/executor/format/ResultSetTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/executor/format/ResultSetTest.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy.executor.format; +package org.opensearch.sql.legacy.executor.format; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -96,4 +96,4 @@ public void testIndexNameWithDot() { assertTrue(resultSet.matchesPatternIfRegex("test.2020.10", "test.2020.10")); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSQLQueryActionTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/plugin/RestSQLQueryActionTest.java similarity index 85% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSQLQueryActionTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/plugin/RestSQLQueryActionTest.java index c9113cd7d7..5190738a3f 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSQLQueryActionTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/plugin/RestSQLQueryActionTest.java @@ -25,27 +25,27 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.legacy.plugin; +package org.opensearch.sql.legacy.plugin; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSQLQueryAction.NOT_SUPPORTED_YET; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.EXPLAIN_API_ENDPOINT; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertSame; import static org.mockito.Mockito.when; +import static org.opensearch.sql.legacy.plugin.RestSQLQueryAction.NOT_SUPPORTED_YET; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.EXPLAIN_API_ENDPOINT; +import static org.opensearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.sql.domain.SQLQueryRequest; -import org.opensearch.client.node.NodeClient; -import org.opensearch.cluster.service.ClusterService; -import org.opensearch.common.util.concurrent.ThreadContext; -import org.opensearch.threadpool.ThreadPool; import org.json.JSONObject; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; +import org.opensearch.client.node.NodeClient; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.sql.domain.SQLQueryRequest; +import org.opensearch.threadpool.ThreadPool; @RunWith(MockitoJUnitRunner.class) public class RestSQLQueryActionTest { @@ -105,4 +105,4 @@ public void skipQueryThatNotSupport() { assertSame(NOT_SUPPORTED_YET, queryAction.prepareRequest(request, nodeClient)); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/IdentifierTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/rewriter/alias/IdentifierTest.java similarity index 96% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/IdentifierTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/rewriter/alias/IdentifierTest.java index a951b09fd2..6c131b6317 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/IdentifierTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/rewriter/alias/IdentifierTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.alias; +package org.opensearch.sql.legacy.rewriter.alias; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import org.junit.Assert; @@ -65,4 +65,4 @@ public void removePrefixShouldRemoveFirstWordAndDot() { private Identifier identifier(String name) { return new Identifier(new SQLIdentifierExpr(name)); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRuleTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRuleTest.java similarity index 97% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRuleTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRuleTest.java index 094261d2fa..bce5a34f3c 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRuleTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/rewriter/alias/TableAliasPrefixRemoveRuleTest.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.alias; +package org.opensearch.sql.legacy.rewriter.alias; import com.alibaba.druid.sql.SQLUtils; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.util.SqlParserUtils; import org.junit.Assert; import org.junit.Test; +import org.opensearch.sql.legacy.util.SqlParserUtils; /** * Test cases for field name prefix remove rule. diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/TableTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/rewriter/alias/TableTest.java similarity index 96% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/TableTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/rewriter/alias/TableTest.java index 0de7dcd3e1..d1743f1be2 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/rewriter/alias/TableTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/rewriter/alias/TableTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.alias; +package org.opensearch.sql.legacy.rewriter.alias; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; import com.alibaba.druid.sql.ast.expr.SQLBinaryOperator; @@ -56,4 +56,4 @@ public void identifierOfTableAndTypeNameShouldReturnTheTableNameOnly() { Assert.assertEquals("accounts", table.name()); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/AggregationOptionTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/AggregationOptionTest.java similarity index 86% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/AggregationOptionTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/AggregationOptionTest.java index 73fcb49224..18ffed9207 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/AggregationOptionTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/AggregationOptionTest.java @@ -24,19 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest; +package org.opensearch.sql.legacy.unittest; import com.alibaba.druid.sql.ast.expr.SQLAggregateOption; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.SqlParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.util.SqlParserUtils; +import java.util.List; import org.junit.Assert; import org.junit.Test; - -import java.util.List; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.parser.SqlParser; +import org.opensearch.sql.legacy.util.SqlParserUtils; /** * Unit test class for feature of aggregation options: DISTINCT, ALL, UNIQUE, DEDUPLICATION diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/DateFormatTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/DateFormatTest.java similarity index 92% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/DateFormatTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/DateFormatTest.java index fedd91fc3a..709483bb0a 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/DateFormatTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/DateFormatTest.java @@ -24,40 +24,39 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest; +package org.opensearch.sql.legacy.unittest; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasItem; +import static org.hamcrest.Matchers.hasProperty; +import static org.hamcrest.Matchers.is; +import static org.mockito.Mockito.mock; +import static org.opensearch.sql.legacy.util.HasFieldWithValue.hasFieldWithValue; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; import com.alibaba.druid.sql.parser.ParserException; import com.alibaba.druid.sql.parser.Token; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Order; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.ElasticSqlExprParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.SqlParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.AggregationQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.maker.QueryMaker; -import com.amazon.opendistroforelasticsearch.sql.legacy.util.MatcherUtils; +import java.util.List; +import org.hamcrest.Matcher; +import org.json.JSONObject; +import org.junit.Ignore; +import org.junit.Test; import org.opensearch.client.Client; import org.opensearch.common.lucene.BytesRefs; import org.opensearch.index.query.BoolQueryBuilder; import org.opensearch.index.query.QueryBuilder; import org.opensearch.index.query.RangeQueryBuilder; -import org.hamcrest.Matcher; -import org.json.JSONObject; -import org.junit.Ignore; -import org.junit.Test; - -import java.util.List; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.util.HasFieldWithValue.hasFieldWithValue; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.hasItem; -import static org.hamcrest.Matchers.hasProperty; -import static org.hamcrest.Matchers.is; -import static org.mockito.Mockito.mock; +import org.opensearch.sql.legacy.domain.Order; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.parser.ElasticSqlExprParser; +import org.opensearch.sql.legacy.parser.SqlParser; +import org.opensearch.sql.legacy.query.AggregationQueryAction; +import org.opensearch.sql.legacy.query.maker.QueryMaker; +import org.opensearch.sql.legacy.util.MatcherUtils; public class DateFormatTest { @@ -253,4 +252,4 @@ private Matcher> hasQueryWithValueGetter(Matcher bindingTupleRow(BindingTuple bindingTuple) { return featureValueOf("BindingTuple", equalTo(bindingTuple), BindingTupleRow::data); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/query/DefaultQueryActionTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/query/DefaultQueryActionTest.java similarity index 88% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/query/DefaultQueryActionTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/query/DefaultQueryActionTest.java index 309308836a..b77313d849 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/query/DefaultQueryActionTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/query/DefaultQueryActionTest.java @@ -24,38 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.query; - -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Field; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.KVValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.MethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.Format; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.DefaultQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.request.SqlRequest; -import org.opensearch.action.search.SearchRequestBuilder; -import org.opensearch.client.Client; -import org.opensearch.common.unit.TimeValue; -import org.opensearch.script.Script; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mockito; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Optional; +package org.opensearch.sql.legacy.unittest.query; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.CURSOR_ENABLED; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.CURSOR_FETCH_SIZE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.CURSOR_KEEPALIVE; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.METRICS_ROLLING_WINDOW; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.METRICS_ROLLING_INTERVAL; import static org.hamcrest.Matchers.equalTo; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; @@ -64,6 +34,35 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; +import static org.opensearch.sql.legacy.plugin.SqlSettings.CURSOR_ENABLED; +import static org.opensearch.sql.legacy.plugin.SqlSettings.CURSOR_FETCH_SIZE; +import static org.opensearch.sql.legacy.plugin.SqlSettings.CURSOR_KEEPALIVE; +import static org.opensearch.sql.legacy.plugin.SqlSettings.METRICS_ROLLING_INTERVAL; +import static org.opensearch.sql.legacy.plugin.SqlSettings.METRICS_ROLLING_WINDOW; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Optional; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.client.Client; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.script.Script; +import org.opensearch.sql.legacy.domain.Field; +import org.opensearch.sql.legacy.domain.KVValue; +import org.opensearch.sql.legacy.domain.MethodField; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.executor.Format; +import org.opensearch.sql.legacy.metrics.Metrics; +import org.opensearch.sql.legacy.query.DefaultQueryAction; +import org.opensearch.sql.legacy.request.SqlRequest; public class DefaultQueryActionTest { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/RewriteRuleExecutorTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/RewriteRuleExecutorTest.java similarity index 89% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/RewriteRuleExecutorTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/RewriteRuleExecutorTest.java index 1646c63ce3..f3a7939d10 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/RewriteRuleExecutorTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/RewriteRuleExecutorTest.java @@ -24,23 +24,22 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter; +package org.opensearch.sql.legacy.unittest.rewriter; + +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.RewriteRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.RewriteRuleExecutor; +import java.sql.SQLFeatureNotSupportedException; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; - -import java.sql.SQLFeatureNotSupportedException; - -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; +import org.opensearch.sql.legacy.rewriter.RewriteRule; +import org.opensearch.sql.legacy.rewriter.RewriteRuleExecutor; @RunWith(MockitoJUnitRunner.class) public class RewriteRuleExecutorTest { @@ -71,4 +70,4 @@ public void noOptimize() throws SQLFeatureNotSupportedException { ruleExecutor.executeOn(expr); verify(rewriter, never()).rewrite(expr); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/identifier/UnquoteIdentifierRuleTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/identifier/UnquoteIdentifierRuleTest.java similarity index 93% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/identifier/UnquoteIdentifierRuleTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/identifier/UnquoteIdentifierRuleTest.java index 7da6d2bb3e..49aceab9dc 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/identifier/UnquoteIdentifierRuleTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/identifier/UnquoteIdentifierRuleTest.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter.identifier; +package org.opensearch.sql.legacy.unittest.rewriter.identifier; import com.alibaba.druid.sql.SQLUtils; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.identifier.UnquoteIdentifierRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.util.SqlParserUtils; import org.junit.Assert; import org.junit.Test; +import org.opensearch.sql.legacy.rewriter.identifier.UnquoteIdentifierRule; +import org.opensearch.sql.legacy.util.SqlParserUtils; /** diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/inline/AliasInliningTests.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/inline/AliasInliningTests.java similarity index 88% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/inline/AliasInliningTests.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/inline/AliasInliningTests.java index 4cbef969df..80b2c56b29 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/inline/AliasInliningTests.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/inline/AliasInliningTests.java @@ -24,29 +24,28 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter.inline; +package org.opensearch.sql.legacy.unittest.rewriter.inline; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.notNullValue; +import static org.mockito.Mockito.mock; +import static org.opensearch.sql.legacy.util.CheckScriptContents.mockLocalClusterState; +import static org.opensearch.sql.legacy.util.SqlParserUtils.parse; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.SqlParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.AggregationQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.DefaultQueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.request.SqlRequest; import com.google.common.base.Charsets; import com.google.common.io.Resources; -import org.opensearch.client.Client; +import java.io.IOException; +import java.net.URL; import org.json.JSONObject; import org.junit.Before; import org.junit.Test; - -import java.io.IOException; -import java.net.URL; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.util.CheckScriptContents.mockLocalClusterState; -import static com.amazon.opendistroforelasticsearch.sql.legacy.util.SqlParserUtils.parse; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.notNullValue; -import static org.mockito.Mockito.mock; +import org.opensearch.client.Client; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.parser.SqlParser; +import org.opensearch.sql.legacy.query.AggregationQueryAction; +import org.opensearch.sql.legacy.query.DefaultQueryAction; +import org.opensearch.sql.legacy.request.SqlRequest; public class AliasInliningTests { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/ordinal/OrdinalRewriterRuleTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/ordinal/OrdinalRewriterRuleTest.java similarity index 94% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/ordinal/OrdinalRewriterRuleTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/ordinal/OrdinalRewriterRuleTest.java index da1698620a..1f924ab63a 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/ordinal/OrdinalRewriterRuleTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/ordinal/OrdinalRewriterRuleTest.java @@ -24,19 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter.ordinal; +package org.opensearch.sql.legacy.unittest.rewriter.ordinal; import com.alibaba.druid.sql.SQLUtils; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; - -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm.VerificationException; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.ordinal.OrdinalRewriterRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.util.SqlParserUtils; - import org.junit.Assert; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.opensearch.sql.legacy.rewriter.matchtoterm.VerificationException; +import org.opensearch.sql.legacy.rewriter.ordinal.OrdinalRewriterRule; +import org.opensearch.sql.legacy.util.SqlParserUtils; /** * Test cases for ordinal aliases in GROUP BY and ORDER BY diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterRuleTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterRuleTest.java similarity index 88% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterRuleTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterRuleTest.java index d586105bde..6a0851f84c 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterRuleTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterRuleTest.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter.parent; +package org.opensearch.sql.legacy.unittest.rewriter.parent; + +import static org.junit.Assert.assertTrue; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.parent.SQLExprParentSetterRule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; - -import static org.junit.Assert.assertTrue; +import org.opensearch.sql.legacy.rewriter.parent.SQLExprParentSetterRule; @RunWith(MockitoJUnitRunner.class) public class SQLExprParentSetterRuleTest { @@ -47,4 +47,4 @@ public class SQLExprParentSetterRuleTest { public void match() { assertTrue(rule.match(queryExpr)); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterTest.java similarity index 93% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterTest.java index 39b7f5e337..6744976859 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterTest.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter.parent; +package org.opensearch.sql.legacy.unittest.rewriter.parent; + +import static org.junit.Assert.assertNotNull; import com.alibaba.druid.sql.ast.expr.SQLInListExpr; import com.alibaba.druid.sql.ast.expr.SQLInSubQueryExpr; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitorAdapter; -import com.amazon.opendistroforelasticsearch.sql.legacy.util.SqlParserUtils; import org.junit.Test; - -import static org.junit.Assert.assertNotNull; +import org.opensearch.sql.legacy.util.SqlParserUtils; public class SQLExprParentSetterTest { @@ -69,4 +69,4 @@ public boolean visit(SQLInListExpr expr) { } } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/ExistsSubQueryRewriterTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/ExistsSubQueryRewriterTest.java similarity index 98% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/ExistsSubQueryRewriterTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/ExistsSubQueryRewriterTest.java index f75e31466c..1ecc7e7e84 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/ExistsSubQueryRewriterTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/ExistsSubQueryRewriterTest.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter.subquery; +package org.opensearch.sql.legacy.unittest.rewriter.subquery; + +import static org.junit.Assert.assertEquals; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import static org.junit.Assert.assertEquals; - public class ExistsSubQueryRewriterTest extends SubQueryRewriterTestBase { @Rule @@ -131,4 +131,4 @@ public void nonCorrelatedExistsAnd() { "WHERE EXISTS (SELECT * FROM e.projects as p) AND EXISTS (SELECT * FROM e.comments as c)")); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/InSubqueryRewriterTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/InSubqueryRewriterTest.java similarity index 97% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/InSubqueryRewriterTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/InSubqueryRewriterTest.java index 82cd0b2a71..6900309cbe 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/InSubqueryRewriterTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/InSubqueryRewriterTest.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter.subquery; +package org.opensearch.sql.legacy.unittest.rewriter.subquery; + +import static org.junit.Assert.assertEquals; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import static org.junit.Assert.assertEquals; - public class InSubqueryRewriterTest extends SubQueryRewriterTestBase { @Rule @@ -103,4 +103,4 @@ public void testMultipleSelectException() throws Exception { "FROM TbA " + "WHERE a in (SELECT b1, b2 FROM TbB) AND a > 10")); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/NestedQueryContextTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/NestedQueryContextTest.java similarity index 94% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/NestedQueryContextTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/NestedQueryContextTest.java index fc57d8055a..9e0825cb2e 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/NestedQueryContextTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/NestedQueryContextTest.java @@ -24,17 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter.subquery; +package org.opensearch.sql.legacy.unittest.rewriter.subquery; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.ast.statement.SQLExprTableSource; import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource; import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.NestedQueryContext; import org.junit.Test; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import org.opensearch.sql.legacy.rewriter.subquery.NestedQueryContext; public class NestedQueryContextTest { @@ -74,4 +74,4 @@ public void notNested() { assertFalse(nestedQueryDetector.isNested(new SQLExprTableSource(new SQLIdentifierExpr("e"), "e1"))); assertFalse(nestedQueryDetector.isNested(new SQLExprTableSource(new SQLIdentifierExpr("p")))); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/SubQueryRewriteRuleTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/SubQueryRewriteRuleTest.java similarity index 93% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/SubQueryRewriteRuleTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/SubQueryRewriteRuleTest.java index 0c56480c8e..e52bfe98a1 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/SubQueryRewriteRuleTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/SubQueryRewriteRuleTest.java @@ -24,18 +24,17 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter.subquery; +package org.opensearch.sql.legacy.unittest.rewriter.subquery; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.SubQueryRewriteRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.util.SqlParserUtils; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.sql.SQLFeatureNotSupportedException; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; - -import java.sql.SQLFeatureNotSupportedException; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import org.opensearch.sql.legacy.rewriter.subquery.SubQueryRewriteRule; +import org.opensearch.sql.legacy.util.SqlParserUtils; public class SubQueryRewriteRuleTest { @@ -102,4 +101,4 @@ public void moreThanOneExistsIsNotSupporeted() throws SQLFeatureNotSupportedExce exceptionRule.expectMessage("Unsupported subquery. Only one EXISTS or IN is supported"); rewriteRule.match(SqlParserUtils.parse(sql)); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/SubQueryRewriterTestBase.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/SubQueryRewriterTestBase.java similarity index 85% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/SubQueryRewriterTestBase.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/SubQueryRewriterTestBase.java index 0aeca306f4..a057147f88 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/SubQueryRewriterTestBase.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/SubQueryRewriterTestBase.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter.subquery; +package org.opensearch.sql.legacy.unittest.rewriter.subquery; import com.alibaba.druid.sql.SQLUtils; import com.alibaba.druid.sql.ast.SQLObject; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.SubQueryRewriteRule; -import com.amazon.opendistroforelasticsearch.sql.legacy.util.SqlParserUtils; +import org.opensearch.sql.legacy.rewriter.subquery.SubQueryRewriteRule; +import org.opensearch.sql.legacy.util.SqlParserUtils; public abstract class SubQueryRewriterTestBase { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/rewriter/SubqueryAliasRewriterTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/rewriter/SubqueryAliasRewriterTest.java similarity index 95% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/rewriter/SubqueryAliasRewriterTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/rewriter/SubqueryAliasRewriterTest.java index 6875ec91e9..743864e691 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/rewriter/SubqueryAliasRewriterTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/rewriter/SubqueryAliasRewriterTest.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter.subquery.rewriter; +package org.opensearch.sql.legacy.unittest.rewriter.subquery.rewriter; + +import static org.junit.Assert.assertEquals; +import static org.opensearch.sql.legacy.util.SqlParserUtils.parse; import com.alibaba.druid.sql.SQLUtils; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.rewriter.SubqueryAliasRewriter; import org.junit.Test; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.util.SqlParserUtils.parse; -import static org.junit.Assert.assertEquals; +import org.opensearch.sql.legacy.rewriter.subquery.rewriter.SubqueryAliasRewriter; public class SubqueryAliasRewriterTest { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/utils/FindSubQueryTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/utils/FindSubQueryTest.java similarity index 89% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/utils/FindSubQueryTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/utils/FindSubQueryTest.java index 57624116b9..579fd2f6be 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/subquery/utils/FindSubQueryTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/subquery/utils/FindSubQueryTest.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter.subquery.utils; +package org.opensearch.sql.legacy.unittest.rewriter.subquery.utils; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.subquery.utils.FindSubQuery; -import org.junit.Test; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.util.SqlParserUtils.parse; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.opensearch.sql.legacy.util.SqlParserUtils.parse; + +import org.junit.Test; +import org.opensearch.sql.legacy.rewriter.subquery.utils.FindSubQuery; public class FindSubQueryTest { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/term/TermFieldRewriterTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/term/TermFieldRewriterTest.java similarity index 88% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/term/TermFieldRewriterTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/term/TermFieldRewriterTest.java index 888114738a..1ee0ae99e4 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/rewriter/term/TermFieldRewriterTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/term/TermFieldRewriterTest.java @@ -24,22 +24,22 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.rewriter.term; +package org.opensearch.sql.legacy.unittest.rewriter.term; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.opensearch.sql.legacy.util.MultipleIndexClusterUtils.mockMultipleIndexEnv; + import com.alibaba.druid.sql.SQLUtils; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm.TermFieldRewriter; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.matchtoterm.VerificationException; -import com.amazon.opendistroforelasticsearch.sql.legacy.util.MatcherUtils; -import com.amazon.opendistroforelasticsearch.sql.legacy.util.SqlParserUtils; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.util.MultipleIndexClusterUtils.mockMultipleIndexEnv; -import static org.hamcrest.MatcherAssert.assertThat; +import org.opensearch.sql.legacy.rewriter.matchtoterm.TermFieldRewriter; +import org.opensearch.sql.legacy.rewriter.matchtoterm.VerificationException; +import org.opensearch.sql.legacy.util.MatcherUtils; +import org.opensearch.sql.legacy.util.SqlParserUtils; public class TermFieldRewriterTest { @Rule @@ -126,4 +126,4 @@ private String rewriteTerm(String sql) { .replaceAll("\\)$", " ") .trim(); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/spatial/WktToGeoJsonConverterTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/spatial/WktToGeoJsonConverterTest.java similarity index 98% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/spatial/WktToGeoJsonConverterTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/spatial/WktToGeoJsonConverterTest.java index bfa3bfe03f..8573dd98f0 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/spatial/WktToGeoJsonConverterTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/spatial/WktToGeoJsonConverterTest.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.spatial; +package org.opensearch.sql.legacy.unittest.spatial; -import com.amazon.opendistroforelasticsearch.sql.legacy.spatial.WktToGeoJsonConverter; -import org.junit.Test; import org.junit.Assert; +import org.junit.Test; +import org.opensearch.sql.legacy.spatial.WktToGeoJsonConverter; /** * Created by Eliran on 4/8/2015. diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/BackticksUnquoterTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/BackticksUnquoterTest.java similarity index 85% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/BackticksUnquoterTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/BackticksUnquoterTest.java index 787aabb10f..0ad6772156 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/BackticksUnquoterTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/BackticksUnquoterTest.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.utils; +package org.opensearch.sql.legacy.unittest.utils; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; -import org.junit.Test; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils.unquoteFullColumn; -import static com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils.unquoteSingleField; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.IsEqual.equalTo; +import static org.opensearch.sql.legacy.utils.StringUtils.unquoteFullColumn; +import static org.opensearch.sql.legacy.utils.StringUtils.unquoteSingleField; + +import org.junit.Test; +import org.opensearch.sql.legacy.utils.StringUtils; /** * To test the functionality of {@link StringUtils#unquoteSingleField} @@ -59,4 +59,4 @@ public void assertBackticksQuotedStringShouldBeUnquoted() { assertThat("identifier1.identifier2", equalTo(unquoteFullColumn("`identifier1`.`identifier2`"))); assertThat("identifier1.identifier2", equalTo(unquoteFullColumn("`identifier1`.identifier2"))); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/LogUtilsTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/LogUtilsTest.java similarity index 90% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/LogUtilsTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/LogUtilsTest.java index 0bc08bd527..ddd48506b2 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/LogUtilsTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/LogUtilsTest.java @@ -24,19 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.utils; +package org.opensearch.sql.legacy.unittest.utils; + +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.not; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.LogUtils; import org.apache.logging.log4j.ThreadContext; import org.junit.After; import org.junit.Assert; import org.junit.Test; - -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; -import static org.hamcrest.Matchers.notNullValue; -import static org.hamcrest.Matchers.nullValue; +import org.opensearch.sql.legacy.utils.LogUtils; public class LogUtilsTest { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/PrettyFormatterTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/PrettyFormatterTest.java similarity index 92% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/PrettyFormatterTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/PrettyFormatterTest.java index 3e1eb8db5b..0cdbbcc57f 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/PrettyFormatterTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/PrettyFormatterTest.java @@ -24,19 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.utils; +package org.opensearch.sql.legacy.unittest.utils; -import com.amazon.opendistroforelasticsearch.sql.legacy.util.TestUtils; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.JsonPrettyFormatter; -import com.google.common.io.Files; -import org.junit.Test; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; +import com.google.common.io.Files; import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.equalTo; +import org.junit.Test; +import org.opensearch.sql.legacy.util.TestUtils; +import org.opensearch.sql.legacy.utils.JsonPrettyFormatter; public class PrettyFormatterTest { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/QueryDataAnonymizerTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/QueryDataAnonymizerTest.java similarity index 96% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/QueryDataAnonymizerTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/QueryDataAnonymizerTest.java index ef4e9b13a3..98688c60ac 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/QueryDataAnonymizerTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/QueryDataAnonymizerTest.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.utils; +package org.opensearch.sql.legacy.unittest.utils; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.QueryDataAnonymizer; import org.junit.Assert; import org.junit.Test; +import org.opensearch.sql.legacy.utils.QueryDataAnonymizer; public class QueryDataAnonymizerTest { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/SQLFunctionsTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/SQLFunctionsTest.java similarity index 85% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/SQLFunctionsTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/SQLFunctionsTest.java index 1bfeb8aac0..c714f726b5 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/SQLFunctionsTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/SQLFunctionsTest.java @@ -24,7 +24,10 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.utils; +package org.opensearch.sql.legacy.unittest.utils; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import com.alibaba.druid.sql.ast.SQLDataType; import com.alibaba.druid.sql.ast.SQLDataTypeImpl; @@ -32,27 +35,23 @@ import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.ast.expr.SQLIntegerExpr; import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr; -import com.amazon.opendistroforelasticsearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.ColumnTypeProvider; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.KVValue; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.MethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.ScriptMethodField; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.Schema; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.SQLFunctions; import com.google.common.collect.ImmutableList; +import java.util.ArrayList; import java.util.Arrays; -import org.opensearch.common.collect.Tuple; +import java.util.List; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; - -import java.util.ArrayList; -import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.opensearch.common.collect.Tuple; +import org.opensearch.sql.legacy.antlr.semantic.types.base.OpenSearchDataType; +import org.opensearch.sql.legacy.domain.ColumnTypeProvider; +import org.opensearch.sql.legacy.domain.KVValue; +import org.opensearch.sql.legacy.domain.MethodField; +import org.opensearch.sql.legacy.domain.ScriptMethodField; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.executor.format.Schema; +import org.opensearch.sql.legacy.utils.SQLFunctions; public class SQLFunctionsTest { @@ -121,4 +120,4 @@ public void testCastIntStatementScript() throws SqlParseException { ); } -} \ No newline at end of file +} diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/StringUtilsTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/StringUtilsTest.java similarity index 95% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/StringUtilsTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/StringUtilsTest.java index f1922c2628..f3586e4bc4 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/StringUtilsTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/StringUtilsTest.java @@ -24,17 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.utils; +package org.opensearch.sql.legacy.unittest.utils; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.StringUtils; +import static org.hamcrest.Matchers.equalTo; + +import java.util.Locale; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; - -import java.util.Locale; - -import static org.hamcrest.Matchers.equalTo; +import org.opensearch.sql.legacy.utils.StringUtils; public class StringUtilsTest { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/UtilTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/UtilTest.java similarity index 95% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/UtilTest.java rename to legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/UtilTest.java index 403af81312..8aab707a35 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/unittest/utils/UtilTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/UtilTest.java @@ -24,14 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.unittest.utils; - -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.Util; -import org.junit.Assert; -import org.junit.Test; +package org.opensearch.sql.legacy.unittest.utils; import java.util.HashMap; import java.util.Map; +import org.junit.Assert; +import org.junit.Test; +import org.opensearch.sql.legacy.utils.Util; public class UtilTest { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/AggregationUtils.java b/legacy/src/test/java/org/opensearch/sql/legacy/util/AggregationUtils.java similarity index 98% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/AggregationUtils.java rename to legacy/src/test/java/org/opensearch/sql/legacy/util/AggregationUtils.java index 003e26a4ab..d141ddfcc6 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/AggregationUtils.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/util/AggregationUtils.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.util; +package org.opensearch.sql.legacy.util; import com.google.common.collect.ImmutableMap; import java.io.IOException; diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/CheckScriptContents.java b/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java similarity index 92% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/CheckScriptContents.java rename to legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java index 3edefeda16..232664fad0 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/CheckScriptContents.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java @@ -24,23 +24,27 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.util; +package org.opensearch.sql.legacy.util; + +import static java.util.Collections.emptyList; +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.when; +import static org.opensearch.search.builder.SearchSourceBuilder.ScriptField; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; import com.alibaba.druid.sql.parser.ParserException; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Condition; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Select; -import com.amazon.opendistroforelasticsearch.sql.legacy.domain.Where; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.ElasticSqlExprParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.ScriptFilter; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.SqlParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.OpenSearchActionFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.SqlElasticRequestBuilder; +import java.io.IOException; +import java.sql.SQLFeatureNotSupportedException; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.mockito.stubbing.Answer; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsRequest; import org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsResponse; @@ -59,23 +63,18 @@ import org.opensearch.common.xcontent.NamedXContentRegistry; import org.opensearch.common.xcontent.XContentParser; import org.opensearch.common.xcontent.XContentType; -import org.mockito.stubbing.Answer; - -import java.io.IOException; -import java.sql.SQLFeatureNotSupportedException; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import static java.util.Collections.emptyList; -import static org.opensearch.search.builder.SearchSourceBuilder.ScriptField; -import static org.junit.Assert.assertTrue; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.when; +import org.opensearch.sql.legacy.domain.Condition; +import org.opensearch.sql.legacy.domain.Select; +import org.opensearch.sql.legacy.domain.Where; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.parser.ElasticSqlExprParser; +import org.opensearch.sql.legacy.parser.ScriptFilter; +import org.opensearch.sql.legacy.parser.SqlParser; +import org.opensearch.sql.legacy.plugin.SqlSettings; +import org.opensearch.sql.legacy.query.OpenSearchActionFactory; +import org.opensearch.sql.legacy.query.QueryAction; +import org.opensearch.sql.legacy.query.SqlElasticRequestBuilder; public class CheckScriptContents { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/HasFieldWithValue.java b/legacy/src/test/java/org/opensearch/sql/legacy/util/HasFieldWithValue.java similarity index 97% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/HasFieldWithValue.java rename to legacy/src/test/java/org/opensearch/sql/legacy/util/HasFieldWithValue.java index 57bce614f3..22ce3b0443 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/HasFieldWithValue.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/util/HasFieldWithValue.java @@ -24,13 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.util; +package org.opensearch.sql.legacy.util; +import java.lang.reflect.Field; import org.hamcrest.FeatureMatcher; import org.hamcrest.Matcher; -import java.lang.reflect.Field; - /** * A matcher for private field value extraction along with matcher to assert its value. * diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/MatcherUtils.java b/legacy/src/test/java/org/opensearch/sql/legacy/util/MatcherUtils.java similarity index 99% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/MatcherUtils.java rename to legacy/src/test/java/org/opensearch/sql/legacy/util/MatcherUtils.java index 0d8c061fee..ab0665c8b3 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/MatcherUtils.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/util/MatcherUtils.java @@ -24,23 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.util; - -import com.google.common.base.Strings; -import org.opensearch.search.SearchHit; -import org.opensearch.search.SearchHits; -import org.hamcrest.Description; -import org.hamcrest.FeatureMatcher; -import org.hamcrest.Matcher; -import org.hamcrest.TypeSafeMatcher; -import org.json.JSONArray; -import org.json.JSONObject; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.function.Function; +package org.opensearch.sql.legacy.util; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.arrayContaining; @@ -55,6 +39,21 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; +import com.google.common.base.Strings; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import org.hamcrest.Description; +import org.hamcrest.FeatureMatcher; +import org.hamcrest.Matcher; +import org.hamcrest.TypeSafeMatcher; +import org.json.JSONArray; +import org.json.JSONObject; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; + public class MatcherUtils { /** diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/MultipleIndexClusterUtils.java b/legacy/src/test/java/org/opensearch/sql/legacy/util/MultipleIndexClusterUtils.java similarity index 95% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/MultipleIndexClusterUtils.java rename to legacy/src/test/java/org/opensearch/sql/legacy/util/MultipleIndexClusterUtils.java index 0c17c1a177..1b554776d3 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/MultipleIndexClusterUtils.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/util/MultipleIndexClusterUtils.java @@ -24,27 +24,26 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.util; +package org.opensearch.sql.legacy.util; + +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; +import static org.opensearch.sql.legacy.util.CheckScriptContents.createParser; +import static org.opensearch.sql.legacy.util.CheckScriptContents.mockIndexNameExpressionResolver; +import static org.opensearch.sql.legacy.util.CheckScriptContents.mockSqlSettings; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; import com.google.common.collect.ImmutableMap; +import java.io.IOException; +import java.util.Map; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.MappingMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.collect.ImmutableOpenMap; - -import java.io.IOException; -import java.util.Map; - -import static com.amazon.opendistroforelasticsearch.sql.legacy.util.CheckScriptContents.createParser; -import static com.amazon.opendistroforelasticsearch.sql.legacy.util.CheckScriptContents.mockIndexNameExpressionResolver; -import static com.amazon.opendistroforelasticsearch.sql.legacy.util.CheckScriptContents.mockSqlSettings; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; /** * Test Utility which provide the cluster have 2 indices. diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/SqlExplainUtils.java b/legacy/src/test/java/org/opensearch/sql/legacy/util/SqlExplainUtils.java similarity index 84% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/SqlExplainUtils.java rename to legacy/src/test/java/org/opensearch/sql/legacy/util/SqlExplainUtils.java index 46dfdc70f0..9edbabcc01 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/SqlExplainUtils.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/util/SqlExplainUtils.java @@ -24,16 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.util; +package org.opensearch.sql.legacy.util; import com.alibaba.druid.sql.parser.ParserException; -import com.amazon.opendistroforelasticsearch.sql.legacy.exception.SqlParseException; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.OpenSearchActionFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.query.QueryAction; -import org.opensearch.client.Client; -import org.mockito.Mockito; - import java.sql.SQLFeatureNotSupportedException; +import org.mockito.Mockito; +import org.opensearch.client.Client; +import org.opensearch.sql.legacy.exception.SqlParseException; +import org.opensearch.sql.legacy.query.OpenSearchActionFactory; +import org.opensearch.sql.legacy.query.QueryAction; /** * Test utils class that explains a query diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/SqlParserUtils.java b/legacy/src/test/java/org/opensearch/sql/legacy/util/SqlParserUtils.java similarity index 87% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/SqlParserUtils.java rename to legacy/src/test/java/org/opensearch/sql/legacy/util/SqlParserUtils.java index 4357c4ea3a..a79f4cc8cc 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/SqlParserUtils.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/util/SqlParserUtils.java @@ -24,14 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.util; +package org.opensearch.sql.legacy.util; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.expr.SQLQueryExpr; import com.alibaba.druid.sql.parser.ParserException; import com.alibaba.druid.sql.parser.Token; -import com.amazon.opendistroforelasticsearch.sql.legacy.parser.ElasticSqlExprParser; -import com.amazon.opendistroforelasticsearch.sql.legacy.rewriter.parent.SQLExprParentSetter; +import org.opensearch.sql.legacy.parser.ElasticSqlExprParser; +import org.opensearch.sql.legacy.rewriter.parent.SQLExprParentSetter; /** * Test utils class include all SQLExpr related method. diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/TestUtils.java b/legacy/src/test/java/org/opensearch/sql/legacy/util/TestUtils.java similarity index 99% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/TestUtils.java rename to legacy/src/test/java/org/opensearch/sql/legacy/util/TestUtils.java index a622a2275e..407c2314c1 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/TestUtils.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/util/TestUtils.java @@ -24,17 +24,9 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.util; +package org.opensearch.sql.legacy.util; -import org.opensearch.action.bulk.BulkRequest; -import org.opensearch.action.bulk.BulkResponse; -import org.opensearch.action.index.IndexRequest; -import org.opensearch.client.Client; -import org.opensearch.client.Request; -import org.opensearch.client.Response; -import org.opensearch.client.RestClient; -import org.opensearch.common.xcontent.XContentType; -import org.json.JSONObject; +import static com.google.common.base.Strings.isNullOrEmpty; import java.io.BufferedReader; import java.io.File; @@ -52,8 +44,15 @@ import java.util.List; import java.util.Locale; import java.util.stream.Collectors; - -import static com.google.common.base.Strings.isNullOrEmpty; +import org.json.JSONObject; +import org.opensearch.action.bulk.BulkRequest; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.client.Client; +import org.opensearch.client.Request; +import org.opensearch.client.Response; +import org.opensearch.client.RestClient; +import org.opensearch.common.xcontent.XContentType; public class TestUtils { diff --git a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/TestsConstants.java b/legacy/src/test/java/org/opensearch/sql/legacy/util/TestsConstants.java similarity index 98% rename from legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/TestsConstants.java rename to legacy/src/test/java/org/opensearch/sql/legacy/util/TestsConstants.java index d7dd93faee..3ae9b0fc89 100644 --- a/legacy/src/test/java/com/amazon/opendistroforelasticsearch/sql/legacy/util/TestsConstants.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/util/TestsConstants.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.legacy.util; +package org.opensearch.sql.legacy.util; /** * Created by omershelef on 18/12/14. diff --git a/opensearch/build.gradle b/opensearch/build.gradle index 8279be665f..f7782a30ab 100644 --- a/opensearch/build.gradle +++ b/opensearch/build.gradle @@ -80,7 +80,7 @@ jacocoTestCoverageVerification { rule { element = 'CLASS' excludes = [ - 'com.amazon.opendistroforelasticsearch.sql.opensearch.security.SecurityAccess' + 'org.opensearch.sql.opensearch.security.SecurityAccess' ] limit { counter = 'LINE' @@ -99,4 +99,4 @@ jacocoTestCoverageVerification { } } check.dependsOn jacocoTestCoverageVerification -jacocoTestCoverageVerification.dependsOn jacocoTestReport \ No newline at end of file +jacocoTestCoverageVerification.dependsOn jacocoTestReport diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchClient.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/client/OpenSearchClient.java similarity index 87% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchClient.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/client/OpenSearchClient.java index 928a32c1aa..95381d025f 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchClient.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/client/OpenSearchClient.java @@ -25,13 +25,13 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.client; +package org.opensearch.sql.opensearch.client; -import com.amazon.opendistroforelasticsearch.sql.opensearch.mapping.IndexMapping; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.OpenSearchRequest; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.OpenSearchResponse; import java.util.List; import java.util.Map; +import org.opensearch.sql.opensearch.mapping.IndexMapping; +import org.opensearch.sql.opensearch.request.OpenSearchRequest; +import org.opensearch.sql.opensearch.response.OpenSearchResponse; /** * OpenSearch client abstraction to wrap different OpenSearch client implementation. For diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchNodeClient.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/client/OpenSearchNodeClient.java similarity index 95% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchNodeClient.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/client/OpenSearchNodeClient.java index d5d7666795..ba541d7f42 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchNodeClient.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/client/OpenSearchNodeClient.java @@ -25,11 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.client; +package org.opensearch.sql.opensearch.client; -import com.amazon.opendistroforelasticsearch.sql.opensearch.mapping.IndexMapping; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.OpenSearchRequest; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.OpenSearchResponse; import com.carrotsearch.hppc.cursors.ObjectObjectCursor; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -54,6 +51,9 @@ import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.collect.ImmutableOpenMap; import org.opensearch.common.unit.TimeValue; +import org.opensearch.sql.opensearch.mapping.IndexMapping; +import org.opensearch.sql.opensearch.request.OpenSearchRequest; +import org.opensearch.sql.opensearch.response.OpenSearchResponse; import org.opensearch.threadpool.ThreadPool; /** OpenSearch connection by node client. */ diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchRestClient.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/client/OpenSearchRestClient.java similarity index 94% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchRestClient.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/client/OpenSearchRestClient.java index c64f1539c9..3629f500a5 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchRestClient.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/client/OpenSearchRestClient.java @@ -25,11 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.client; +package org.opensearch.sql.opensearch.client; -import com.amazon.opendistroforelasticsearch.sql.opensearch.mapping.IndexMapping; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.OpenSearchRequest; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.OpenSearchResponse; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.io.IOException; @@ -50,6 +47,9 @@ import org.opensearch.client.indices.GetMappingsResponse; import org.opensearch.cluster.metadata.AliasMetadata; import org.opensearch.common.settings.Settings; +import org.opensearch.sql.opensearch.mapping.IndexMapping; +import org.opensearch.sql.opensearch.request.OpenSearchRequest; +import org.opensearch.sql.opensearch.response.OpenSearchResponse; /** * OpenSearch REST client to support standalone mode that runs entire engine from remote. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/type/OpenSearchDataType.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/type/OpenSearchDataType.java similarity index 88% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/type/OpenSearchDataType.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/data/type/OpenSearchDataType.java index 11aed4a3ed..60d7f8c684 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/type/OpenSearchDataType.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/type/OpenSearchDataType.java @@ -26,18 +26,18 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.type; +package org.opensearch.sql.opensearch.data.type; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.UNKNOWN; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.UNKNOWN; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import com.google.common.collect.ImmutableMap; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.type.ExprType; /** * The extension of ExprType in Elasticsearch. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/utils/Content.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/utils/Content.java similarity index 97% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/utils/Content.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/data/utils/Content.java index bff64deb46..8facd45a5c 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/utils/Content.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/utils/Content.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.utils; +package org.opensearch.sql.opensearch.data.utils; import java.util.Iterator; import java.util.Map; diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/utils/ObjectContent.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/utils/ObjectContent.java similarity index 97% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/utils/ObjectContent.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/data/utils/ObjectContent.java index 2f2091b484..3e1ee558d1 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/utils/ObjectContent.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/utils/ObjectContent.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.utils; +package org.opensearch.sql.opensearch.data.utils; import java.util.AbstractMap; import java.util.Iterator; diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/utils/OpenSearchJsonContent.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/utils/OpenSearchJsonContent.java similarity index 98% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/utils/OpenSearchJsonContent.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/data/utils/OpenSearchJsonContent.java index d90d727242..dc69dc3c50 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/utils/OpenSearchJsonContent.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/utils/OpenSearchJsonContent.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.utils; +package org.opensearch.sql.opensearch.data.utils; import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.Iterators; diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchDateFormatters.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchDateFormatters.java similarity index 98% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchDateFormatters.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchDateFormatters.java index dbd6bf6bdc..b9f48eb193 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchDateFormatters.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchDateFormatters.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.value; +package org.opensearch.sql.opensearch.data.value; import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.HOUR_OF_DAY; diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprBinaryValue.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprBinaryValue.java similarity index 81% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprBinaryValue.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprBinaryValue.java index b7ffc69240..e12f0a58fe 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprBinaryValue.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprBinaryValue.java @@ -24,13 +24,13 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.value; +package org.opensearch.sql.opensearch.data.value; -import com.amazon.opendistroforelasticsearch.sql.data.model.AbstractExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType; import lombok.EqualsAndHashCode; +import org.opensearch.sql.data.model.AbstractExprValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.opensearch.data.type.OpenSearchDataType; /** * OpenSearch BinaryValue. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprGeoPointValue.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprGeoPointValue.java similarity index 82% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprGeoPointValue.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprGeoPointValue.java index 93684c87ce..4d0ae8987f 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprGeoPointValue.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprGeoPointValue.java @@ -26,15 +26,15 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.value; +package org.opensearch.sql.opensearch.data.value; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_GEO_POINT; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_GEO_POINT; -import com.amazon.opendistroforelasticsearch.sql.data.model.AbstractExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import java.util.Objects; import lombok.Data; +import org.opensearch.sql.data.model.AbstractExprValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; /** * OpenSearch GeoPointValue. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprIpValue.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprIpValue.java similarity index 80% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprIpValue.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprIpValue.java index b7ec487ac1..f16b116a99 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprIpValue.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprIpValue.java @@ -26,15 +26,15 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.value; +package org.opensearch.sql.opensearch.data.value; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_IP; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_IP; -import com.amazon.opendistroforelasticsearch.sql.data.model.AbstractExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import java.util.Objects; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.AbstractExprValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; /** * OpenSearch IP ExprValue. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprTextKeywordValue.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprTextKeywordValue.java similarity index 80% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprTextKeywordValue.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprTextKeywordValue.java index db650a1bb3..304d86ce3d 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprTextKeywordValue.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprTextKeywordValue.java @@ -25,12 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.value; +package org.opensearch.sql.opensearch.data.value; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.type.ExprType; /** * Expression Text Keyword Value, it is an extension of the ExprValue by Elasticsearch. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprTextValue.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprTextValue.java similarity index 78% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprTextValue.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprTextValue.java index 49062fa5e3..10a4e40eb7 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprTextValue.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprTextValue.java @@ -26,12 +26,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.value; +package org.opensearch.sql.opensearch.data.value; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.type.ExprType; /** * Expression Text Value, it is a extension of the ExprValue by Elasticsearch. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprValueFactory.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprValueFactory.java similarity index 66% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprValueFactory.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprValueFactory.java index a93cfaefb2..313347aec1 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprValueFactory.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprValueFactory.java @@ -26,51 +26,31 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.value; - -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.ARRAY; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BYTE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATETIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.SHORT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIMESTAMP; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_BINARY; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_GEO_POINT; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_IP; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchDateFormatters.SQL_LITERAL_DATE_TIME_FORMAT; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchDateFormatters.STRICT_DATE_OPTIONAL_TIME_FORMATTER; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchDateFormatters.STRICT_HOUR_MINUTE_SECOND_FORMATTER; - -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprBooleanValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprByteValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprCollectionValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDateValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDatetimeValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDoubleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprFloatValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprLongValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprShortValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprStringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTimeValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTimestampValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.utils.Content; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.utils.ObjectContent; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.utils.OpenSearchJsonContent; +package org.opensearch.sql.opensearch.data.value; + +import static org.opensearch.sql.data.type.ExprCoreType.ARRAY; +import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN; +import static org.opensearch.sql.data.type.ExprCoreType.BYTE; +import static org.opensearch.sql.data.type.ExprCoreType.DATE; +import static org.opensearch.sql.data.type.ExprCoreType.DATETIME; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.SHORT; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; +import static org.opensearch.sql.data.type.ExprCoreType.TIME; +import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_BINARY; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_GEO_POINT; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_IP; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; +import static org.opensearch.sql.opensearch.data.value.OpenSearchDateFormatters.SQL_LITERAL_DATE_TIME_FORMAT; +import static org.opensearch.sql.opensearch.data.value.OpenSearchDateFormatters.STRICT_DATE_OPTIONAL_TIME_FORMATTER; +import static org.opensearch.sql.opensearch.data.value.OpenSearchDateFormatters.STRICT_HOUR_MINUTE_SECOND_FORMATTER; + import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableMap; @@ -86,6 +66,26 @@ import lombok.AllArgsConstructor; import lombok.Setter; import org.opensearch.common.time.DateFormatters; +import org.opensearch.sql.data.model.ExprBooleanValue; +import org.opensearch.sql.data.model.ExprByteValue; +import org.opensearch.sql.data.model.ExprCollectionValue; +import org.opensearch.sql.data.model.ExprDateValue; +import org.opensearch.sql.data.model.ExprDatetimeValue; +import org.opensearch.sql.data.model.ExprDoubleValue; +import org.opensearch.sql.data.model.ExprFloatValue; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprLongValue; +import org.opensearch.sql.data.model.ExprNullValue; +import org.opensearch.sql.data.model.ExprShortValue; +import org.opensearch.sql.data.model.ExprStringValue; +import org.opensearch.sql.data.model.ExprTimeValue; +import org.opensearch.sql.data.model.ExprTimestampValue; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.opensearch.data.utils.Content; +import org.opensearch.sql.opensearch.data.utils.ObjectContent; +import org.opensearch.sql.opensearch.data.utils.OpenSearchJsonContent; /** * Construct ExprValue from OpenSearch response. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/OpenSearchExecutionEngine.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/executor/OpenSearchExecutionEngine.java similarity index 78% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/OpenSearchExecutionEngine.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/executor/OpenSearchExecutionEngine.java index 8fc3222dac..5fd7716434 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/OpenSearchExecutionEngine.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/executor/OpenSearchExecutionEngine.java @@ -25,20 +25,20 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.executor; +package org.opensearch.sql.opensearch.executor; -import com.amazon.opendistroforelasticsearch.sql.common.response.ResponseListener; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.executor.Explain; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector.ExecutionProtector; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.storage.TableScanOperator; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.List; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.common.response.ResponseListener; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.executor.Explain; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.executor.protector.ExecutionProtector; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.storage.TableScanOperator; /** OpenSearch execution engine implementation. */ @RequiredArgsConstructor diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/ExecutionProtector.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/ExecutionProtector.java similarity index 82% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/ExecutionProtector.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/ExecutionProtector.java index 397d172291..7dbe23a6b0 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/ExecutionProtector.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/ExecutionProtector.java @@ -26,10 +26,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector; +package org.opensearch.sql.opensearch.executor.protector; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanNodeVisitor; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlanNodeVisitor; /** * Execution Plan Protector. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/NoopExecutionProtector.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/NoopExecutionProtector.java similarity index 87% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/NoopExecutionProtector.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/NoopExecutionProtector.java index 0f3aa9a6bf..564c400a38 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/NoopExecutionProtector.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/NoopExecutionProtector.java @@ -26,9 +26,9 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector; +package org.opensearch.sql.opensearch.executor.protector; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlan; /** * No operation execution protector. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/OpenSearchExecutionProtector.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/OpenSearchExecutionProtector.java similarity index 77% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/OpenSearchExecutionProtector.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/OpenSearchExecutionProtector.java index a035ec2ce8..d556221a38 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/OpenSearchExecutionProtector.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/OpenSearchExecutionProtector.java @@ -26,24 +26,24 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector; - -import com.amazon.opendistroforelasticsearch.sql.monitor.ResourceMonitor; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.AggregationOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.DedupeOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.EvalOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.FilterOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.LimitOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.ProjectOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.RareTopNOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.RemoveOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.RenameOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.SortOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.ValuesOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.WindowOperator; -import com.amazon.opendistroforelasticsearch.sql.storage.TableScanOperator; +package org.opensearch.sql.opensearch.executor.protector; + import lombok.RequiredArgsConstructor; +import org.opensearch.sql.monitor.ResourceMonitor; +import org.opensearch.sql.planner.physical.AggregationOperator; +import org.opensearch.sql.planner.physical.DedupeOperator; +import org.opensearch.sql.planner.physical.EvalOperator; +import org.opensearch.sql.planner.physical.FilterOperator; +import org.opensearch.sql.planner.physical.LimitOperator; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.ProjectOperator; +import org.opensearch.sql.planner.physical.RareTopNOperator; +import org.opensearch.sql.planner.physical.RemoveOperator; +import org.opensearch.sql.planner.physical.RenameOperator; +import org.opensearch.sql.planner.physical.SortOperator; +import org.opensearch.sql.planner.physical.ValuesOperator; +import org.opensearch.sql.planner.physical.WindowOperator; +import org.opensearch.sql.storage.TableScanOperator; /** * OpenSearch Execution Protector. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/ResourceMonitorPlan.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/ResourceMonitorPlan.java similarity index 86% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/ResourceMonitorPlan.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/ResourceMonitorPlan.java index 301058e784..a363e0ee9c 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/ResourceMonitorPlan.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/ResourceMonitorPlan.java @@ -26,16 +26,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector; +package org.opensearch.sql.opensearch.executor.protector; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.monitor.ResourceMonitor; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanNodeVisitor; import java.util.List; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.monitor.ResourceMonitor; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlanNodeVisitor; /** * A PhysicalPlan which will run the delegate plan in resource protection manner. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/mapping/IndexMapping.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/mapping/IndexMapping.java similarity index 98% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/mapping/IndexMapping.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/mapping/IndexMapping.java index 0cb8c37164..dc9883d5c7 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/mapping/IndexMapping.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/mapping/IndexMapping.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.mapping; +package org.opensearch.sql.opensearch.mapping; import static java.util.Collections.emptyMap; diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/monitor/OpenSearchMemoryHealthy.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/monitor/OpenSearchMemoryHealthy.java similarity index 97% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/monitor/OpenSearchMemoryHealthy.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/monitor/OpenSearchMemoryHealthy.java index 965ffb5fd8..015a8183e5 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/monitor/OpenSearchMemoryHealthy.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/monitor/OpenSearchMemoryHealthy.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.monitor; +package org.opensearch.sql.opensearch.monitor; import com.google.common.annotations.VisibleForTesting; import java.util.concurrent.ThreadLocalRandom; diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/monitor/OpenSearchResourceMonitor.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/monitor/OpenSearchResourceMonitor.java similarity index 92% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/monitor/OpenSearchResourceMonitor.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/monitor/OpenSearchResourceMonitor.java index 02b8902011..0667ce7bd7 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/monitor/OpenSearchResourceMonitor.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/monitor/OpenSearchResourceMonitor.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.monitor; +package org.opensearch.sql.opensearch.monitor; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.monitor.ResourceMonitor; import io.github.resilience4j.core.IntervalFunction; import io.github.resilience4j.retry.Retry; import io.github.resilience4j.retry.RetryConfig; import java.util.function.Supplier; import lombok.extern.log4j.Log4j2; import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.monitor.ResourceMonitor; /** * {@link ResourceMonitor} implementation on Elasticsearch. When the heap memory usage exceeds diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexAgg.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexAgg.java similarity index 81% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexAgg.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexAgg.java index fe188a04b6..620dcaffc6 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexAgg.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexAgg.java @@ -26,14 +26,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical; +package org.opensearch.sql.opensearch.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanNodeVisitor; import com.google.common.collect.ImmutableList; import java.util.List; import lombok.Builder; @@ -42,6 +36,12 @@ import lombok.Setter; import lombok.ToString; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalPlanNodeVisitor; /** * Logical Index Scan Aggregation Operation. @@ -99,4 +99,4 @@ public OpenSearchLogicalIndexAgg( public R accept(LogicalPlanNodeVisitor visitor, C context) { return visitor.visitNode(this, context); } -} \ No newline at end of file +} diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexScan.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexScan.java similarity index 85% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexScan.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexScan.java index 062b291ab3..1ba99f58aa 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexScan.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexScan.java @@ -26,13 +26,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical; +package org.opensearch.sql.opensearch.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanNodeVisitor; import com.google.common.collect.ImmutableList; import java.util.List; import java.util.Set; @@ -42,6 +37,11 @@ import lombok.Setter; import lombok.ToString; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalPlanNodeVisitor; /** * OpenSearch Logical Index Scan Operation. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicalPlanOptimizerFactory.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicalPlanOptimizerFactory.java similarity index 58% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicalPlanOptimizerFactory.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicalPlanOptimizerFactory.java index 68644127f5..7f288b8669 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicalPlanOptimizerFactory.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicalPlanOptimizerFactory.java @@ -26,21 +26,21 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical; +package org.opensearch.sql.opensearch.planner.logical; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule.MergeAggAndIndexScan; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule.MergeAggAndRelation; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule.MergeFilterAndRelation; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule.MergeLimitAndIndexScan; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule.MergeLimitAndRelation; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule.MergeSortAndIndexAgg; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule.MergeSortAndIndexScan; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule.MergeSortAndRelation; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule.PushProjectAndIndexScan; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule.PushProjectAndRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.LogicalPlanOptimizer; import java.util.Arrays; import lombok.experimental.UtilityClass; +import org.opensearch.sql.opensearch.planner.logical.rule.MergeAggAndIndexScan; +import org.opensearch.sql.opensearch.planner.logical.rule.MergeAggAndRelation; +import org.opensearch.sql.opensearch.planner.logical.rule.MergeFilterAndRelation; +import org.opensearch.sql.opensearch.planner.logical.rule.MergeLimitAndIndexScan; +import org.opensearch.sql.opensearch.planner.logical.rule.MergeLimitAndRelation; +import org.opensearch.sql.opensearch.planner.logical.rule.MergeSortAndIndexAgg; +import org.opensearch.sql.opensearch.planner.logical.rule.MergeSortAndIndexScan; +import org.opensearch.sql.opensearch.planner.logical.rule.MergeSortAndRelation; +import org.opensearch.sql.opensearch.planner.logical.rule.PushProjectAndIndexScan; +import org.opensearch.sql.opensearch.planner.logical.rule.PushProjectAndRelation; +import org.opensearch.sql.planner.optimizer.LogicalPlanOptimizer; /** * OpenSearch storage specified logical plan optimizer. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeAggAndIndexScan.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeAggAndIndexScan.java similarity index 78% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeAggAndIndexScan.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeAggAndIndexScan.java index e23d9e1505..efdfb7228f 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeAggAndIndexScan.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeAggAndIndexScan.java @@ -26,21 +26,21 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule; +package org.opensearch.sql.opensearch.planner.logical.rule; -import static com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern.Patterns.source; import static com.facebook.presto.matching.Pattern.typeOf; +import static org.opensearch.sql.planner.optimizer.pattern.Patterns.source; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexAgg; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalAggregation; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.Rule; import com.facebook.presto.matching.Capture; import com.facebook.presto.matching.Captures; import com.facebook.presto.matching.Pattern; import lombok.Getter; import lombok.experimental.Accessors; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexAgg; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; +import org.opensearch.sql.planner.logical.LogicalAggregation; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.optimizer.Rule; /** * Merge Aggregation -- Relation to IndexScanAggregation. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeAggAndRelation.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeAggAndRelation.java similarity index 78% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeAggAndRelation.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeAggAndRelation.java index 82bb7405ec..857e7308ae 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeAggAndRelation.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeAggAndRelation.java @@ -26,21 +26,21 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule; +package org.opensearch.sql.opensearch.planner.logical.rule; -import static com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern.Patterns.source; import static com.facebook.presto.matching.Pattern.typeOf; +import static org.opensearch.sql.planner.optimizer.pattern.Patterns.source; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexAgg; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalAggregation; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.Rule; import com.facebook.presto.matching.Capture; import com.facebook.presto.matching.Captures; import com.facebook.presto.matching.Pattern; import lombok.Getter; import lombok.experimental.Accessors; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexAgg; +import org.opensearch.sql.planner.logical.LogicalAggregation; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalRelation; +import org.opensearch.sql.planner.optimizer.Rule; /** * Merge Aggregation -- Relation to IndexScanAggregation. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeFilterAndRelation.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeFilterAndRelation.java similarity index 77% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeFilterAndRelation.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeFilterAndRelation.java index fba5797beb..799a243e4e 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeFilterAndRelation.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeFilterAndRelation.java @@ -26,19 +26,19 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule; +package org.opensearch.sql.opensearch.planner.logical.rule; -import static com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern.Patterns.source; import static com.facebook.presto.matching.Pattern.typeOf; +import static org.opensearch.sql.planner.optimizer.pattern.Patterns.source; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalFilter; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.Rule; import com.facebook.presto.matching.Capture; import com.facebook.presto.matching.Captures; import com.facebook.presto.matching.Pattern; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; +import org.opensearch.sql.planner.logical.LogicalFilter; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalRelation; +import org.opensearch.sql.planner.optimizer.Rule; /** * Merge Filter -- Relation to LogicalIndexScan. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeLimitAndIndexScan.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeLimitAndIndexScan.java similarity index 81% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeLimitAndIndexScan.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeLimitAndIndexScan.java index 46543a2a42..8fe577dee3 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeLimitAndIndexScan.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeLimitAndIndexScan.java @@ -24,20 +24,20 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule; +package org.opensearch.sql.opensearch.planner.logical.rule; -import static com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern.Patterns.source; import static com.facebook.presto.matching.Pattern.typeOf; +import static org.opensearch.sql.planner.optimizer.pattern.Patterns.source; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalLimit; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.Rule; import com.facebook.presto.matching.Capture; import com.facebook.presto.matching.Captures; import com.facebook.presto.matching.Pattern; import lombok.Getter; import lombok.experimental.Accessors; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; +import org.opensearch.sql.planner.logical.LogicalLimit; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.optimizer.Rule; @Getter public class MergeLimitAndIndexScan implements Rule { diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeLimitAndRelation.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeLimitAndRelation.java similarity index 76% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeLimitAndRelation.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeLimitAndRelation.java index a08bd77fe7..eab979315d 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeLimitAndRelation.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeLimitAndRelation.java @@ -24,21 +24,21 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule; +package org.opensearch.sql.opensearch.planner.logical.rule; -import static com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern.Patterns.source; import static com.facebook.presto.matching.Pattern.typeOf; +import static org.opensearch.sql.planner.optimizer.pattern.Patterns.source; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalLimit; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.Rule; import com.facebook.presto.matching.Capture; import com.facebook.presto.matching.Captures; import com.facebook.presto.matching.Pattern; import lombok.Getter; import lombok.experimental.Accessors; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; +import org.opensearch.sql.planner.logical.LogicalLimit; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalRelation; +import org.opensearch.sql.planner.optimizer.Rule; @Getter public class MergeLimitAndRelation implements Rule { diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeSortAndIndexAgg.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeSortAndIndexAgg.java similarity index 79% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeSortAndIndexAgg.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeSortAndIndexAgg.java index db246990a6..5bae26e37d 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeSortAndIndexAgg.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeSortAndIndexAgg.java @@ -26,19 +26,11 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule; +package org.opensearch.sql.opensearch.planner.logical.rule; -import static com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern.Patterns.source; import static com.facebook.presto.matching.Pattern.typeOf; +import static org.opensearch.sql.planner.optimizer.pattern.Patterns.source; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexAgg; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalSort; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.Rule; import com.facebook.presto.matching.Capture; import com.facebook.presto.matching.Captures; import com.facebook.presto.matching.Pattern; @@ -48,6 +40,14 @@ import lombok.Getter; import lombok.experimental.Accessors; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexAgg; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalSort; +import org.opensearch.sql.planner.optimizer.Rule; /** * Merge Sort -- IndexScanAggregation to IndexScanAggregation. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeSortAndIndexScan.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeSortAndIndexScan.java similarity index 80% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeSortAndIndexScan.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeSortAndIndexScan.java index 31db11b4a7..05c044ff70 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeSortAndIndexScan.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeSortAndIndexScan.java @@ -26,17 +26,11 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule; +package org.opensearch.sql.opensearch.planner.logical.rule; -import static com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern.Patterns.source; import static com.facebook.presto.matching.Pattern.typeOf; +import static org.opensearch.sql.planner.optimizer.pattern.Patterns.source; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalSort; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.Rule; import com.facebook.presto.matching.Capture; import com.facebook.presto.matching.Captures; import com.facebook.presto.matching.Pattern; @@ -44,6 +38,12 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalSort; +import org.opensearch.sql.planner.optimizer.Rule; /** * Merge Sort with IndexScan only when Sort by fields. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeSortAndRelation.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeSortAndRelation.java similarity index 77% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeSortAndRelation.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeSortAndRelation.java index 0a399b8005..5ec86569fc 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/MergeSortAndRelation.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/MergeSortAndRelation.java @@ -26,19 +26,19 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule; +package org.opensearch.sql.opensearch.planner.logical.rule; -import static com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern.Patterns.source; import static com.facebook.presto.matching.Pattern.typeOf; +import static org.opensearch.sql.planner.optimizer.pattern.Patterns.source; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalSort; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.Rule; import com.facebook.presto.matching.Capture; import com.facebook.presto.matching.Captures; import com.facebook.presto.matching.Pattern; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalRelation; +import org.opensearch.sql.planner.logical.LogicalSort; +import org.opensearch.sql.planner.optimizer.Rule; /** * Merge Sort with Relation only when Sort by fields. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/OptimizationRuleUtils.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/OptimizationRuleUtils.java similarity index 87% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/OptimizationRuleUtils.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/OptimizationRuleUtils.java index 35588765ae..23b6aa4228 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/OptimizationRuleUtils.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/OptimizationRuleUtils.java @@ -26,18 +26,18 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule; +package org.opensearch.sql.opensearch.planner.logical.rule; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalSort; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import lombok.experimental.UtilityClass; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.expression.ExpressionNodeVisitor; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.planner.logical.LogicalSort; @UtilityClass public class OptimizationRuleUtils { diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/PushProjectAndIndexScan.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/PushProjectAndIndexScan.java similarity index 76% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/PushProjectAndIndexScan.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/PushProjectAndIndexScan.java index dbfa058964..363dc54320 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/PushProjectAndIndexScan.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/PushProjectAndIndexScan.java @@ -26,21 +26,21 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule; +package org.opensearch.sql.opensearch.planner.logical.rule; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule.OptimizationRuleUtils.findReferenceExpressions; -import static com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern.Patterns.source; import static com.facebook.presto.matching.Pattern.typeOf; +import static org.opensearch.sql.opensearch.planner.logical.rule.OptimizationRuleUtils.findReferenceExpressions; +import static org.opensearch.sql.planner.optimizer.pattern.Patterns.source; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalProject; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.Rule; import com.facebook.presto.matching.Capture; import com.facebook.presto.matching.Captures; import com.facebook.presto.matching.Pattern; import java.util.Set; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalProject; +import org.opensearch.sql.planner.optimizer.Rule; /** * Push Project list into ElasticsearchLogicalIndexScan. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/PushProjectAndRelation.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/PushProjectAndRelation.java similarity index 75% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/PushProjectAndRelation.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/PushProjectAndRelation.java index 89b6bd293c..73e591fa3c 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/rule/PushProjectAndRelation.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/logical/rule/PushProjectAndRelation.java @@ -26,22 +26,22 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule; +package org.opensearch.sql.opensearch.planner.logical.rule; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.rule.OptimizationRuleUtils.findReferenceExpressions; -import static com.amazon.opendistroforelasticsearch.sql.planner.optimizer.pattern.Patterns.source; import static com.facebook.presto.matching.Pattern.typeOf; +import static org.opensearch.sql.opensearch.planner.logical.rule.OptimizationRuleUtils.findReferenceExpressions; +import static org.opensearch.sql.planner.optimizer.pattern.Patterns.source; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalProject; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.Rule; import com.facebook.presto.matching.Capture; import com.facebook.presto.matching.Captures; import com.facebook.presto.matching.Pattern; import java.util.Set; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalProject; +import org.opensearch.sql.planner.logical.LogicalRelation; +import org.opensearch.sql.planner.optimizer.Rule; /** * Push Project list into Relation. The transformed plan is Project - IndexScan diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchQueryRequest.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/request/OpenSearchQueryRequest.java similarity index 93% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchQueryRequest.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/request/OpenSearchQueryRequest.java index 690d12e958..b4c899fefb 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchQueryRequest.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/request/OpenSearchQueryRequest.java @@ -26,10 +26,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.request; +package org.opensearch.sql.opensearch.request; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.OpenSearchResponse; import com.google.common.annotations.VisibleForTesting; import java.util.function.Consumer; import java.util.function.Function; @@ -42,6 +40,8 @@ import org.opensearch.common.unit.TimeValue; import org.opensearch.search.SearchHits; import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; +import org.opensearch.sql.opensearch.response.OpenSearchResponse; /** * OpenSearch search request. This has to be stateful because it needs to: diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchRequest.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/request/OpenSearchRequest.java similarity index 89% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchRequest.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/request/OpenSearchRequest.java index 7b41164d98..9874fc1e4d 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchRequest.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/request/OpenSearchRequest.java @@ -26,16 +26,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.request; +package org.opensearch.sql.opensearch.request; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.OpenSearchResponse; import java.util.function.Consumer; import java.util.function.Function; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.search.SearchScrollRequest; import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; +import org.opensearch.sql.opensearch.response.OpenSearchResponse; /** * OpenSearch search request. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchScrollRequest.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/request/OpenSearchScrollRequest.java similarity index 94% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchScrollRequest.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/request/OpenSearchScrollRequest.java index 323f3bb621..618f1b01d1 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchScrollRequest.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/request/OpenSearchScrollRequest.java @@ -25,10 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.request; +package org.opensearch.sql.opensearch.request; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.OpenSearchResponse; import java.util.Objects; import java.util.function.Consumer; import java.util.function.Function; @@ -42,6 +40,8 @@ import org.opensearch.action.search.SearchScrollRequest; import org.opensearch.common.unit.TimeValue; import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; +import org.opensearch.sql.opensearch.response.OpenSearchResponse; /** * OpenSearch scroll search request. This has to be stateful because it needs to: diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchCatIndicesRequest.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/request/system/OpenSearchCatIndicesRequest.java similarity index 82% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchCatIndicesRequest.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/request/system/OpenSearchCatIndicesRequest.java index f88d55e3c9..9c58f799f0 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchCatIndicesRequest.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/request/system/OpenSearchCatIndicesRequest.java @@ -26,19 +26,19 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.request.system; +package org.opensearch.sql.opensearch.request.system; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient.META_CLUSTER_NAME; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.opensearch.client.OpenSearchClient.META_CLUSTER_NAME; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.opensearch.client.OpenSearchClient; /** * Cat indices request. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchDescribeIndexRequest.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/request/system/OpenSearchDescribeIndexRequest.java similarity index 85% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchDescribeIndexRequest.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/request/system/OpenSearchDescribeIndexRequest.java index 9e8d915b8b..7d69fb6725 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchDescribeIndexRequest.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/request/system/OpenSearchDescribeIndexRequest.java @@ -26,19 +26,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.request.system; - -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient.META_CLUSTER_NAME; - -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType; -import com.amazon.opendistroforelasticsearch.sql.opensearch.mapping.IndexMapping; +package org.opensearch.sql.opensearch.request.system; + +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.opensearch.client.OpenSearchClient.META_CLUSTER_NAME; + import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.HashMap; @@ -47,6 +40,13 @@ import java.util.Map; import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.data.type.OpenSearchDataType; +import org.opensearch.sql.opensearch.mapping.IndexMapping; /** * Describe index meta data request. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchSystemRequest.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/request/system/OpenSearchSystemRequest.java similarity index 88% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchSystemRequest.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/request/system/OpenSearchSystemRequest.java index f9ddf9d2ef..acdb1691bd 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchSystemRequest.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/request/system/OpenSearchSystemRequest.java @@ -26,10 +26,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.request.system; +package org.opensearch.sql.opensearch.request.system; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; import java.util.List; +import org.opensearch.sql.data.model.ExprValue; /** * OpenSearch system request query against the system index. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/OpenSearchAggregationResponseParser.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/response/OpenSearchAggregationResponseParser.java similarity index 98% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/OpenSearchAggregationResponseParser.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/response/OpenSearchAggregationResponseParser.java index 05b4c5d0cf..bb029cddb0 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/OpenSearchAggregationResponseParser.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/response/OpenSearchAggregationResponseParser.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.response; +package org.opensearch.sql.opensearch.response; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/OpenSearchResponse.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/response/OpenSearchResponse.java similarity index 91% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/OpenSearchResponse.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/response/OpenSearchResponse.java index bb6c2452bc..fc7421aec3 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/OpenSearchResponse.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/response/OpenSearchResponse.java @@ -25,11 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.response; +package org.opensearch.sql.opensearch.response; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; import com.google.common.collect.ImmutableMap; import java.util.Arrays; import java.util.Iterator; @@ -39,6 +36,9 @@ import org.opensearch.action.search.SearchResponse; import org.opensearch.search.SearchHits; import org.opensearch.search.aggregations.Aggregations; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; /** * OpenSearch search response. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/ErrorMessage.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/response/error/ErrorMessage.java similarity index 96% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/ErrorMessage.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/response/error/ErrorMessage.java index 1783fcbf22..9139458d38 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/ErrorMessage.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/response/error/ErrorMessage.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.response.error; +package org.opensearch.sql.opensearch.response.error; import lombok.Getter; import org.json.JSONObject; diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/ErrorMessageFactory.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/response/error/ErrorMessageFactory.java similarity index 96% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/ErrorMessageFactory.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/response/error/ErrorMessageFactory.java index a84c4ac25f..c77f14c69c 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/ErrorMessageFactory.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/response/error/ErrorMessageFactory.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.response.error; +package org.opensearch.sql.opensearch.response.error; import lombok.experimental.UtilityClass; import org.opensearch.OpenSearchException; diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/OpenSearchErrorMessage.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/response/error/OpenSearchErrorMessage.java similarity index 97% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/OpenSearchErrorMessage.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/response/error/OpenSearchErrorMessage.java index 39b9e86bb9..4942ad1377 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/OpenSearchErrorMessage.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/response/error/OpenSearchErrorMessage.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.response.error; +package org.opensearch.sql.opensearch.response.error; import java.util.Locale; import org.opensearch.OpenSearchException; diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/security/SecurityAccess.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/security/SecurityAccess.java similarity index 95% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/security/SecurityAccess.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/security/SecurityAccess.java index cb46b6c6e2..f7cc6d51c5 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/security/SecurityAccess.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/security/SecurityAccess.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.security; +package org.opensearch.sql.opensearch.security; import java.io.IOException; import java.security.AccessController; diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/setting/OpenSearchSettings.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/setting/OpenSearchSettings.java similarity index 96% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/setting/OpenSearchSettings.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/setting/OpenSearchSettings.java index 6547f18a10..c5986a0a72 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/setting/OpenSearchSettings.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/setting/OpenSearchSettings.java @@ -26,11 +26,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.setting; +package org.opensearch.sql.opensearch.setting; import static org.opensearch.common.settings.Settings.EMPTY; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -42,6 +41,7 @@ import lombok.extern.log4j.Log4j2; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Setting; +import org.opensearch.sql.common.setting.Settings; /** * Setting implementation on OpenSearch. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchIndex.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/OpenSearchIndex.java similarity index 76% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchIndex.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/OpenSearchIndex.java index 4fc2e1f827..74e966637f 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchIndex.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/OpenSearchIndex.java @@ -25,26 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage; - -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexAgg; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalPlanOptimizerFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.system.OpenSearchDescribeIndexRequest; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation.AggregationQueryBuilder; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.FilterQueryBuilder; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.sort.SortQueryBuilder; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization.DefaultExpressionSerializer; -import com.amazon.opendistroforelasticsearch.sql.planner.DefaultImplementor; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.storage.Table; +package org.opensearch.sql.opensearch.storage; + import com.google.common.annotations.VisibleForTesting; import java.util.List; import java.util.Map; @@ -52,6 +34,24 @@ import lombok.RequiredArgsConstructor; import org.opensearch.index.query.QueryBuilder; import org.opensearch.search.aggregations.AggregationBuilder; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.common.utils.StringUtils; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexAgg; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalPlanOptimizerFactory; +import org.opensearch.sql.opensearch.request.system.OpenSearchDescribeIndexRequest; +import org.opensearch.sql.opensearch.storage.script.aggregation.AggregationQueryBuilder; +import org.opensearch.sql.opensearch.storage.script.filter.FilterQueryBuilder; +import org.opensearch.sql.opensearch.storage.script.sort.SortQueryBuilder; +import org.opensearch.sql.opensearch.storage.serialization.DefaultExpressionSerializer; +import org.opensearch.sql.planner.DefaultImplementor; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalRelation; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.storage.Table; /** OpenSearch table (index) implementation. */ @RequiredArgsConstructor diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchIndexScan.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/OpenSearchIndexScan.java similarity index 86% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchIndexScan.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/OpenSearchIndexScan.java index 0998a94509..99b11c21a4 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchIndexScan.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/OpenSearchIndexScan.java @@ -25,21 +25,11 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage; +package org.opensearch.sql.opensearch.storage; import static org.opensearch.search.sort.FieldSortBuilder.DOC_FIELD_NAME; import static org.opensearch.search.sort.SortOrder.ASC; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.OpenSearchQueryRequest; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.OpenSearchRequest; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.OpenSearchResponse; -import com.amazon.opendistroforelasticsearch.sql.storage.TableScanOperator; import com.google.common.collect.Iterables; import java.util.ArrayList; import java.util.Iterator; @@ -56,6 +46,16 @@ import org.opensearch.search.aggregations.AggregationBuilder; import org.opensearch.search.builder.SearchSourceBuilder; import org.opensearch.search.sort.SortBuilder; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; +import org.opensearch.sql.opensearch.request.OpenSearchQueryRequest; +import org.opensearch.sql.opensearch.request.OpenSearchRequest; +import org.opensearch.sql.opensearch.response.OpenSearchResponse; +import org.opensearch.sql.storage.TableScanOperator; /** * OpenSearch index scan operator. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchStorageEngine.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/OpenSearchStorageEngine.java similarity index 72% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchStorageEngine.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/OpenSearchStorageEngine.java index 556b8b3654..6b73b1f67a 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchStorageEngine.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/OpenSearchStorageEngine.java @@ -25,16 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage; +package org.opensearch.sql.opensearch.storage; -import static com.amazon.opendistroforelasticsearch.sql.utils.SystemIndexUtils.isSystemIndex; +import static org.opensearch.sql.utils.SystemIndexUtils.isSystemIndex; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.system.OpenSearchSystemIndex; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; -import com.amazon.opendistroforelasticsearch.sql.storage.Table; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.storage.system.OpenSearchSystemIndex; +import org.opensearch.sql.storage.StorageEngine; +import org.opensearch.sql.storage.Table; /** OpenSearch storage engine implementation. */ @RequiredArgsConstructor diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/ExpressionScriptEngine.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/ExpressionScriptEngine.java similarity index 86% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/ExpressionScriptEngine.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/ExpressionScriptEngine.java index 412ca11bfd..8498dc8090 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/ExpressionScriptEngine.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/ExpressionScriptEngine.java @@ -25,12 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script; +package org.opensearch.sql.opensearch.storage.script; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation.ExpressionAggregationScriptFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.ExpressionFilterScriptFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization.ExpressionSerializer; import com.google.common.collect.ImmutableMap; import java.util.Map; import java.util.Set; @@ -40,6 +36,10 @@ import org.opensearch.script.FilterScript; import org.opensearch.script.ScriptContext; import org.opensearch.script.ScriptEngine; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.opensearch.storage.script.aggregation.ExpressionAggregationScriptFactory; +import org.opensearch.sql.opensearch.storage.script.filter.ExpressionFilterScriptFactory; +import org.opensearch.sql.opensearch.storage.serialization.ExpressionSerializer; /** * Custom expression script engine that supports using core engine expression code in DSL diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/ScriptUtils.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/ScriptUtils.java similarity index 83% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/ScriptUtils.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/ScriptUtils.java index c229036d06..b10b22d91d 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/ScriptUtils.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/ScriptUtils.java @@ -26,12 +26,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script; +package org.opensearch.sql.opensearch.storage.script; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import lombok.experimental.UtilityClass; +import org.opensearch.sql.data.type.ExprType; /** * Script Utils. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/AggregationQueryBuilder.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/AggregationQueryBuilder.java similarity index 86% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/AggregationQueryBuilder.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/AggregationQueryBuilder.java index aac42b11a2..a89ba042ee 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/AggregationQueryBuilder.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/AggregationQueryBuilder.java @@ -26,18 +26,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation; - -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation.dsl.BucketAggregationBuilder; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation.dsl.MetricAggregationBuilder; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization.ExpressionSerializer; +package org.opensearch.sql.opensearch.storage.script.aggregation; + import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -53,6 +43,16 @@ import org.opensearch.search.aggregations.AggregationBuilder; import org.opensearch.search.aggregations.AggregationBuilders; import org.opensearch.search.sort.SortOrder; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionNodeVisitor; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.opensearch.storage.script.aggregation.dsl.BucketAggregationBuilder; +import org.opensearch.sql.opensearch.storage.script.aggregation.dsl.MetricAggregationBuilder; +import org.opensearch.sql.opensearch.storage.serialization.ExpressionSerializer; /** * Build the AggregationBuilder from the list of {@link NamedAggregator} diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScript.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScript.java similarity index 82% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScript.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScript.java index 038e242ae6..c087b59264 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScript.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScript.java @@ -26,18 +26,18 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation; +package org.opensearch.sql.opensearch.storage.script.aggregation; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprNullValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.core.ExpressionScript; import java.util.Map; import lombok.EqualsAndHashCode; import org.apache.lucene.index.LeafReaderContext; import org.opensearch.script.AggregationScript; import org.opensearch.search.lookup.SearchLookup; +import org.opensearch.sql.data.model.ExprNullValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.env.Environment; +import org.opensearch.sql.opensearch.storage.script.core.ExpressionScript; /** * Aggregation expression script that executed on each document. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactory.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactory.java similarity index 91% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactory.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactory.java index b57408fbec..18da804329 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactory.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactory.java @@ -26,13 +26,13 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation; +package org.opensearch.sql.opensearch.storage.script.aggregation; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.Map; import lombok.EqualsAndHashCode; import org.opensearch.script.AggregationScript; import org.opensearch.search.lookup.SearchLookup; +import org.opensearch.sql.expression.Expression; /** * Aggregation Expression script factory that generates leaf factory. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptLeafFactory.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptLeafFactory.java similarity index 92% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptLeafFactory.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptLeafFactory.java index ea2b18d82a..84e1988346 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptLeafFactory.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptLeafFactory.java @@ -26,13 +26,13 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation; +package org.opensearch.sql.opensearch.storage.script.aggregation; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.Map; import org.apache.lucene.index.LeafReaderContext; import org.opensearch.script.AggregationScript; import org.opensearch.search.lookup.SearchLookup; +import org.opensearch.sql.expression.Expression; /** * Expression script leaf factory that produces script executor for each leaf. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/AggregationBuilderHelper.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/AggregationBuilderHelper.java similarity index 77% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/AggregationBuilderHelper.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/AggregationBuilderHelper.java index cb3e9dd01c..73d58d793e 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/AggregationBuilderHelper.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/AggregationBuilderHelper.java @@ -26,20 +26,20 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation.dsl; +package org.opensearch.sql.opensearch.storage.script.aggregation.dsl; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.ExpressionScriptEngine.EXPRESSION_LANG_NAME; import static java.util.Collections.emptyMap; import static org.opensearch.script.Script.DEFAULT_SCRIPT_TYPE; +import static org.opensearch.sql.opensearch.storage.script.ExpressionScriptEngine.EXPRESSION_LANG_NAME; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.ScriptUtils; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization.ExpressionSerializer; import java.util.function.Function; import lombok.RequiredArgsConstructor; import org.opensearch.script.Script; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.opensearch.storage.script.ScriptUtils; +import org.opensearch.sql.opensearch.storage.serialization.ExpressionSerializer; /** * Abstract Aggregation Builder. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilder.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilder.java similarity index 89% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilder.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilder.java index ba563ad1e1..b1aff2c5b4 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilder.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilder.java @@ -26,16 +26,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation.dsl; +package org.opensearch.sql.opensearch.storage.script.aggregation.dsl; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization.ExpressionSerializer; import com.google.common.collect.ImmutableList; import java.util.List; import org.apache.commons.lang3.tuple.Pair; import org.opensearch.search.aggregations.bucket.composite.CompositeValuesSourceBuilder; import org.opensearch.search.aggregations.bucket.composite.TermsValuesSourceBuilder; import org.opensearch.search.sort.SortOrder; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.opensearch.storage.serialization.ExpressionSerializer; /** * Bucket Aggregation Builder. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilder.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilder.java similarity index 86% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilder.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilder.java index e347d7e5e5..f3807ae662 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilder.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilder.java @@ -26,23 +26,23 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation.dsl; +package org.opensearch.sql.opensearch.storage.script.aggregation.dsl; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.expression.LiteralExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.FilterQueryBuilder; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization.ExpressionSerializer; import java.util.List; import org.opensearch.search.aggregations.AggregationBuilder; import org.opensearch.search.aggregations.AggregationBuilders; import org.opensearch.search.aggregations.AggregatorFactories; import org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder; import org.opensearch.search.aggregations.support.ValuesSourceAggregationBuilder; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionNodeVisitor; +import org.opensearch.sql.expression.LiteralExpression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.opensearch.storage.script.filter.FilterQueryBuilder; +import org.opensearch.sql.opensearch.storage.serialization.ExpressionSerializer; /** * Build the Metric Aggregation from {@link NamedAggregator}. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/core/ExpressionScript.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/core/ExpressionScript.java similarity index 86% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/core/ExpressionScript.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/core/ExpressionScript.java index 36666d1202..644c46a2c7 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/core/ExpressionScript.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/core/ExpressionScript.java @@ -26,20 +26,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.core; +package org.opensearch.sql.opensearch.storage.script.core; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; import static java.util.stream.Collectors.toMap; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.ScriptUtils; import java.security.AccessController; import java.security.PrivilegedAction; import java.time.chrono.ChronoZonedDateTime; @@ -51,6 +43,14 @@ import java.util.function.Supplier; import lombok.EqualsAndHashCode; import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionNodeVisitor; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.env.Environment; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; +import org.opensearch.sql.opensearch.storage.script.ScriptUtils; /** * Expression script executor that executes the expression on each document diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScript.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScript.java similarity index 81% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScript.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScript.java index a4f69f6716..716090d319 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScript.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScript.java @@ -25,19 +25,19 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter; +package org.opensearch.sql.opensearch.storage.script.filter; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprBooleanValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.core.ExpressionScript; import java.util.Map; import lombok.EqualsAndHashCode; import org.apache.lucene.index.LeafReaderContext; import org.opensearch.script.FilterScript; import org.opensearch.search.lookup.SearchLookup; +import org.opensearch.sql.data.model.ExprBooleanValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.env.Environment; +import org.opensearch.sql.opensearch.storage.script.core.ExpressionScript; /** * Expression script executor that executes the expression on each document diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactory.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactory.java similarity index 91% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactory.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactory.java index 17ae8e7344..17674ac840 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactory.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactory.java @@ -25,13 +25,13 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter; +package org.opensearch.sql.opensearch.storage.script.filter; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.Map; import lombok.EqualsAndHashCode; import org.opensearch.script.FilterScript; import org.opensearch.search.lookup.SearchLookup; +import org.opensearch.sql.expression.Expression; /** * Expression script factory that generates leaf factory. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptLeafFactory.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptLeafFactory.java similarity index 92% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptLeafFactory.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptLeafFactory.java index 3b9794a7fd..19bdc273cd 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptLeafFactory.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptLeafFactory.java @@ -25,13 +25,13 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter; +package org.opensearch.sql.opensearch.storage.script.filter; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.util.Map; import org.apache.lucene.index.LeafReaderContext; import org.opensearch.script.FilterScript; import org.opensearch.search.lookup.SearchLookup; +import org.opensearch.sql.expression.Expression; /** * Expression script leaf factory that produces script executor for each leaf. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/FilterQueryBuilder.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/FilterQueryBuilder.java similarity index 75% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/FilterQueryBuilder.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/FilterQueryBuilder.java index bdd283c38a..3bf748708b 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/FilterQueryBuilder.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/FilterQueryBuilder.java @@ -25,23 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter; +package org.opensearch.sql.opensearch.storage.script.filter; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.ExpressionScriptEngine.EXPRESSION_LANG_NAME; import static java.util.Collections.emptyMap; import static org.opensearch.script.Script.DEFAULT_SCRIPT_TYPE; +import static org.opensearch.sql.opensearch.storage.script.ExpressionScriptEngine.EXPRESSION_LANG_NAME; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.lucene.LuceneQuery; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.lucene.RangeQuery; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.lucene.RangeQuery.Comparison; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.lucene.TermQuery; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.lucene.WildcardQuery; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization.ExpressionSerializer; import com.google.common.collect.ImmutableMap; import java.util.Map; import java.util.function.BiFunction; @@ -51,6 +40,17 @@ import org.opensearch.index.query.QueryBuilders; import org.opensearch.index.query.ScriptQueryBuilder; import org.opensearch.script.Script; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionNodeVisitor; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.function.BuiltinFunctionName; +import org.opensearch.sql.expression.function.FunctionName; +import org.opensearch.sql.opensearch.storage.script.filter.lucene.LuceneQuery; +import org.opensearch.sql.opensearch.storage.script.filter.lucene.RangeQuery; +import org.opensearch.sql.opensearch.storage.script.filter.lucene.RangeQuery.Comparison; +import org.opensearch.sql.opensearch.storage.script.filter.lucene.TermQuery; +import org.opensearch.sql.opensearch.storage.script.filter.lucene.WildcardQuery; +import org.opensearch.sql.opensearch.storage.serialization.ExpressionSerializer; @RequiredArgsConstructor public class FilterQueryBuilder extends ExpressionNodeVisitor { diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/LuceneQuery.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/LuceneQuery.java similarity index 84% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/LuceneQuery.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/LuceneQuery.java index 94be72a628..d95d5a18db 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/LuceneQuery.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/LuceneQuery.java @@ -25,16 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.lucene; +package org.opensearch.sql.opensearch.storage.script.filter.lucene; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.LiteralExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; import org.opensearch.index.query.QueryBuilder; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.LiteralExpression; +import org.opensearch.sql.expression.ReferenceExpression; /** * Lucene query abstraction that builds Lucene query from function expression. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/RangeQuery.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/RangeQuery.java similarity index 89% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/RangeQuery.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/RangeQuery.java index b544e1a61c..6a09902f65 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/RangeQuery.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/RangeQuery.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.lucene; +package org.opensearch.sql.opensearch.storage.script.filter.lucene; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import lombok.RequiredArgsConstructor; import org.opensearch.index.query.QueryBuilder; import org.opensearch.index.query.QueryBuilders; import org.opensearch.index.query.RangeQueryBuilder; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; /** * Lucene query that builds range query for non-quality comparison. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/TermQuery.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/TermQuery.java similarity index 85% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/TermQuery.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/TermQuery.java index 592a74b3e3..f784f4077a 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/TermQuery.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/TermQuery.java @@ -25,12 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.lucene; +package org.opensearch.sql.opensearch.storage.script.filter.lucene; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import org.opensearch.index.query.QueryBuilder; import org.opensearch.index.query.QueryBuilders; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; /** * Lucene query that build term query for equality comparison. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/WildcardQuery.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/WildcardQuery.java similarity index 87% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/WildcardQuery.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/WildcardQuery.java index fff33a0a03..3a71981dd6 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/WildcardQuery.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/WildcardQuery.java @@ -25,12 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.lucene; +package org.opensearch.sql.opensearch.storage.script.filter.lucene; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import org.opensearch.index.query.QueryBuilder; import org.opensearch.index.query.QueryBuilders; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; /** * Lucene query that builds wildcard query. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/sort/SortQueryBuilder.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/sort/SortQueryBuilder.java similarity index 87% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/sort/SortQueryBuilder.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/sort/SortQueryBuilder.java index df8fb337e1..379f5f8a09 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/sort/SortQueryBuilder.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/sort/SortQueryBuilder.java @@ -26,18 +26,18 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.sort; +package org.opensearch.sql.opensearch.storage.script.sort; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.ScriptUtils; import com.google.common.collect.ImmutableMap; import java.util.Map; import org.opensearch.search.sort.FieldSortBuilder; import org.opensearch.search.sort.SortBuilder; import org.opensearch.search.sort.SortBuilders; import org.opensearch.search.sort.SortOrder; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.opensearch.storage.script.ScriptUtils; /** * Builder of {@link SortBuilder}. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/serialization/DefaultExpressionSerializer.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/serialization/DefaultExpressionSerializer.java similarity index 93% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/serialization/DefaultExpressionSerializer.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/serialization/DefaultExpressionSerializer.java index 3f13624acd..bc0b4e43f9 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/serialization/DefaultExpressionSerializer.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/serialization/DefaultExpressionSerializer.java @@ -25,15 +25,15 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization; +package org.opensearch.sql.opensearch.storage.serialization; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.Base64; +import org.opensearch.sql.expression.Expression; /** * Default serializer that (de-)serialize expressions by JDK serialization. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/serialization/ExpressionSerializer.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/serialization/ExpressionSerializer.java similarity index 89% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/serialization/ExpressionSerializer.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/serialization/ExpressionSerializer.java index a35461f1ef..79f26e3c3a 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/serialization/ExpressionSerializer.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/serialization/ExpressionSerializer.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization; +package org.opensearch.sql.opensearch.storage.serialization; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; +import org.opensearch.sql.expression.Expression; /** * Expression serializer that (de-)serializes expression object. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndex.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndex.java similarity index 71% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndex.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndex.java index 2c73214470..a929c04ef2 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndex.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndex.java @@ -26,25 +26,25 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.system; +package org.opensearch.sql.opensearch.storage.system; -import static com.amazon.opendistroforelasticsearch.sql.utils.SystemIndexUtils.systemTable; +import static org.opensearch.sql.utils.SystemIndexUtils.systemTable; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.system.OpenSearchCatIndicesRequest; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.system.OpenSearchDescribeIndexRequest; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.system.OpenSearchSystemRequest; -import com.amazon.opendistroforelasticsearch.sql.planner.DefaultImplementor; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.storage.Table; -import com.amazon.opendistroforelasticsearch.sql.utils.SystemIndexUtils; import com.google.common.annotations.VisibleForTesting; import java.util.Map; import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.request.system.OpenSearchCatIndicesRequest; +import org.opensearch.sql.opensearch.request.system.OpenSearchDescribeIndexRequest; +import org.opensearch.sql.opensearch.request.system.OpenSearchSystemRequest; +import org.opensearch.sql.planner.DefaultImplementor; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalRelation; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.storage.Table; +import org.opensearch.sql.utils.SystemIndexUtils; /** * OpenSearch System Index Table Implementation. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndexScan.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndexScan.java similarity index 84% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndexScan.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndexScan.java index 8176d25d34..fe2f8dffd3 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndexScan.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndexScan.java @@ -26,15 +26,15 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.system; +package org.opensearch.sql.opensearch.storage.system; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.system.OpenSearchSystemRequest; -import com.amazon.opendistroforelasticsearch.sql.storage.TableScanOperator; import java.util.Iterator; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.opensearch.request.system.OpenSearchSystemRequest; +import org.opensearch.sql.storage.TableScanOperator; /** * OpenSearch index scan operator. diff --git a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndexSchema.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndexSchema.java similarity index 91% rename from opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndexSchema.java rename to opensearch/src/main/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndexSchema.java index 3124099d1c..b2af3203c2 100644 --- a/opensearch/src/main/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndexSchema.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndexSchema.java @@ -26,16 +26,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.system; +package org.opensearch.sql.opensearch.storage.system; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; import com.google.common.collect.ImmutableMap; import java.util.LinkedHashMap; import java.util.Map; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.type.ExprType; /** * Definition of the system table schema. diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchNodeClientTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/client/OpenSearchNodeClientTest.java similarity index 95% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchNodeClientTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/client/OpenSearchNodeClientTest.java index b489f8b595..e40a44c59f 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchNodeClientTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/client/OpenSearchNodeClientTest.java @@ -25,9 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.client; +package org.opensearch.sql.opensearch.client; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient.META_CLUSTER_NAME; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -39,14 +38,8 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import static org.opensearch.sql.opensearch.client.OpenSearchClient.META_CLUSTER_NAME; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.mapping.IndexMapping; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.OpenSearchScrollRequest; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.OpenSearchResponse; import com.google.common.base.Charsets; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSortedMap; @@ -86,6 +79,13 @@ import org.opensearch.index.IndexNotFoundException; import org.opensearch.search.SearchHit; import org.opensearch.search.SearchHits; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; +import org.opensearch.sql.opensearch.mapping.IndexMapping; +import org.opensearch.sql.opensearch.request.OpenSearchScrollRequest; +import org.opensearch.sql.opensearch.response.OpenSearchResponse; import org.opensearch.threadpool.ThreadPool; @ExtendWith(MockitoExtension.class) diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchRestClientTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/client/OpenSearchRestClientTest.java similarity index 93% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchRestClientTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/client/OpenSearchRestClientTest.java index 1944256204..197ead7457 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/client/OpenSearchRestClientTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/client/OpenSearchRestClientTest.java @@ -25,9 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.client; +package org.opensearch.sql.opensearch.client; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient.META_CLUSTER_NAME; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -38,14 +37,8 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import static org.opensearch.sql.opensearch.client.OpenSearchClient.META_CLUSTER_NAME; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.mapping.IndexMapping; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.OpenSearchScrollRequest; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.OpenSearchResponse; import com.google.common.base.Charsets; import com.google.common.collect.ImmutableMap; import com.google.common.io.Resources; @@ -78,6 +71,13 @@ import org.opensearch.common.xcontent.XContentType; import org.opensearch.search.SearchHit; import org.opensearch.search.SearchHits; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; +import org.opensearch.sql.opensearch.mapping.IndexMapping; +import org.opensearch.sql.opensearch.request.OpenSearchScrollRequest; +import org.opensearch.sql.opensearch.response.OpenSearchResponse; @ExtendWith(MockitoExtension.class) class OpenSearchRestClientTest { diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/type/OpenSearchDataTypeTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/type/OpenSearchDataTypeTest.java similarity index 82% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/type/OpenSearchDataTypeTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/data/type/OpenSearchDataTypeTest.java index ca312871bf..825200ce00 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/type/OpenSearchDataTypeTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/type/OpenSearchDataTypeTest.java @@ -26,14 +26,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.type; +package org.opensearch.sql.opensearch.data.type; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; import org.junit.jupiter.api.Test; @@ -58,4 +58,4 @@ public void legacyTypeName() { assertEquals("text", OPENSEARCH_TEXT.legacyTypeName()); assertEquals("text", OPENSEARCH_TEXT_KEYWORD.legacyTypeName()); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprBinaryValueTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprBinaryValueTest.java similarity index 91% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprBinaryValueTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprBinaryValueTest.java index 9d87d3c12f..0bbb0f51c1 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprBinaryValueTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprBinaryValueTest.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.value; +package org.opensearch.sql.opensearch.data.value; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_BINARY; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_BINARY; import org.junit.jupiter.api.Test; diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprGeoPointValueTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprGeoPointValueTest.java similarity index 90% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprGeoPointValueTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprGeoPointValueTest.java index 257c7ea63f..dacdabeb0f 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprGeoPointValueTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprGeoPointValueTest.java @@ -26,12 +26,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.value; +package org.opensearch.sql.opensearch.data.value; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_GEO_POINT; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_GEO_POINT; import org.junit.jupiter.api.Test; @@ -65,4 +65,4 @@ void equal() { void testHashCode() { assertNotNull(geoPointValue.hashCode()); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprIpValueTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprIpValueTest.java similarity index 90% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprIpValueTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprIpValueTest.java index 4f52432eb2..e973b71b28 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprIpValueTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprIpValueTest.java @@ -26,12 +26,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.value; +package org.opensearch.sql.opensearch.data.value; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_IP; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_IP; import org.junit.jupiter.api.Test; diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprTextKeywordValueTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprTextKeywordValueTest.java similarity index 86% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprTextKeywordValueTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprTextKeywordValueTest.java index 7cd1d9c4af..6b44a8de0f 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprTextKeywordValueTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprTextKeywordValueTest.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.value; +package org.opensearch.sql.opensearch.data.value; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; import org.junit.jupiter.api.Test; @@ -39,4 +39,4 @@ public void testTypeOfExprTextKeywordValue() { assertEquals(OPENSEARCH_TEXT_KEYWORD, new OpenSearchExprTextKeywordValue("A").type()); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprTextValueTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprTextValueTest.java similarity index 86% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprTextValueTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprTextValueTest.java index 7814f974c1..d2996846d3 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprTextValueTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprTextValueTest.java @@ -26,10 +26,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.value; +package org.opensearch.sql.opensearch.data.value; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT; import org.junit.jupiter.api.Test; @@ -38,4 +38,4 @@ class OpenSearchExprTextValueTest { public void typeOfExprTextValue() { assertEquals(OPENSEARCH_TEXT, new OpenSearchExprTextValue("A").type()); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprValueFactoryTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprValueFactoryTest.java similarity index 79% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprValueFactoryTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprValueFactoryTest.java index 9db8535adc..a5d7560a0d 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/data/value/OpenSearchExprValueFactoryTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprValueFactoryTest.java @@ -26,49 +26,40 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.data.value; - -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.booleanValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.byteValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.doubleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.floatValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.longValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.nullValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.shortValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.ARRAY; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BOOLEAN; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.BYTE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DATETIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.SHORT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIME; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIMESTAMP; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_BINARY; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_GEO_POINT; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_IP; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; +package org.opensearch.sql.opensearch.data.value; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.data.model.ExprValueUtils.booleanValue; +import static org.opensearch.sql.data.model.ExprValueUtils.byteValue; +import static org.opensearch.sql.data.model.ExprValueUtils.doubleValue; +import static org.opensearch.sql.data.model.ExprValueUtils.floatValue; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.model.ExprValueUtils.longValue; +import static org.opensearch.sql.data.model.ExprValueUtils.nullValue; +import static org.opensearch.sql.data.model.ExprValueUtils.shortValue; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.data.type.ExprCoreType.ARRAY; +import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN; +import static org.opensearch.sql.data.type.ExprCoreType.BYTE; +import static org.opensearch.sql.data.type.ExprCoreType.DATE; +import static org.opensearch.sql.data.type.ExprCoreType.DATETIME; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.SHORT; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; +import static org.opensearch.sql.data.type.ExprCoreType.TIME; +import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_BINARY; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_GEO_POINT; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_IP; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprCollectionValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDateValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprDatetimeValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTimeValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTimestampValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.utils.OpenSearchJsonContent; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.time.Instant; @@ -77,6 +68,15 @@ import lombok.EqualsAndHashCode; import lombok.ToString; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprCollectionValue; +import org.opensearch.sql.data.model.ExprDateValue; +import org.opensearch.sql.data.model.ExprDatetimeValue; +import org.opensearch.sql.data.model.ExprTimeValue; +import org.opensearch.sql.data.model.ExprTimestampValue; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.opensearch.data.utils.OpenSearchJsonContent; class OpenSearchExprValueFactoryTest { diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/OpenSearchExecutionEngineTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/executor/OpenSearchExecutionEngineTest.java similarity index 82% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/OpenSearchExecutionEngineTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/executor/OpenSearchExecutionEngineTest.java index 995f2c3bd1..6116eb1c7e 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/OpenSearchExecutionEngineTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/executor/OpenSearchExecutionEngineTest.java @@ -25,11 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.executor; +package org.opensearch.sql.opensearch.executor; -import static com.amazon.opendistroforelasticsearch.sql.common.setting.Settings.Key.QUERY_SIZE_LIMIT; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.tupleValue; -import static com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.QueryResponse; import static com.google.common.collect.ImmutableMap.of; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -40,18 +37,10 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import static org.opensearch.sql.common.setting.Settings.Key.QUERY_SIZE_LIMIT; +import static org.opensearch.sql.data.model.ExprValueUtils.tupleValue; +import static org.opensearch.sql.executor.ExecutionEngine.QueryResponse; -import com.amazon.opendistroforelasticsearch.sql.common.response.ResponseListener; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.ExplainResponse; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector.OpenSearchExecutionProtector; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.OpenSearchIndexScan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.storage.TableScanOperator; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; @@ -63,6 +52,17 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.common.response.ResponseListener; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.executor.ExecutionEngine.ExplainResponse; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; +import org.opensearch.sql.opensearch.executor.protector.OpenSearchExecutionProtector; +import org.opensearch.sql.opensearch.storage.OpenSearchIndexScan; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.storage.TableScanOperator; @ExtendWith(MockitoExtension.class) class OpenSearchExecutionEngineTest { diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/OpenSearchExecutionProtectorTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/executor/OpenSearchExecutionProtectorTest.java similarity index 75% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/OpenSearchExecutionProtectorTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/executor/OpenSearchExecutionProtectorTest.java index f75072a856..da571c8fc2 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/OpenSearchExecutionProtectorTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/executor/OpenSearchExecutionProtectorTest.java @@ -26,46 +26,24 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.executor; +package org.opensearch.sql.opensearch.executor; -import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.literal; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.named; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.filter; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.sort; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.values; -import static com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL.window; import static java.util.Collections.emptyList; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import static org.opensearch.sql.ast.tree.Sort.SortOption.DEFAULT_ASC; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.DSL.literal; +import static org.opensearch.sql.expression.DSL.named; +import static org.opensearch.sql.expression.DSL.ref; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.filter; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.sort; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.values; +import static org.opensearch.sql.planner.physical.PhysicalPlanDSL.window; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprBooleanValue; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.AvgAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.window.WindowDefinition; -import com.amazon.opendistroforelasticsearch.sql.expression.window.aggregation.AggregateWindowFunction; -import com.amazon.opendistroforelasticsearch.sql.expression.window.ranking.RankFunction; -import com.amazon.opendistroforelasticsearch.sql.monitor.ResourceMonitor; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector.OpenSearchExecutionProtector; -import com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector.ResourceMonitorPlan; -import com.amazon.opendistroforelasticsearch.sql.opensearch.setting.OpenSearchSettings; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.OpenSearchIndexScan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.Arrays; @@ -78,6 +56,28 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.ast.tree.RareTopN.CommandType; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.data.model.ExprBooleanValue; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.AvgAggregator; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.expression.window.WindowDefinition; +import org.opensearch.sql.expression.window.aggregation.AggregateWindowFunction; +import org.opensearch.sql.expression.window.ranking.RankFunction; +import org.opensearch.sql.monitor.ResourceMonitor; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; +import org.opensearch.sql.opensearch.executor.protector.OpenSearchExecutionProtector; +import org.opensearch.sql.opensearch.executor.protector.ResourceMonitorPlan; +import org.opensearch.sql.opensearch.setting.OpenSearchSettings; +import org.opensearch.sql.opensearch.storage.OpenSearchIndexScan; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlanDSL; @ExtendWith(MockitoExtension.class) class OpenSearchExecutionProtectorTest { @@ -277,4 +277,4 @@ public void testWithoutProtection() { PhysicalPlan resourceMonitor(PhysicalPlan input) { return new ResourceMonitorPlan(input, resourceMonitor); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/ResourceMonitorPlanTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/executor/ResourceMonitorPlanTest.java similarity index 88% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/ResourceMonitorPlanTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/executor/ResourceMonitorPlanTest.java index 4dc1c3d928..7f0e427dfa 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/ResourceMonitorPlanTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/executor/ResourceMonitorPlanTest.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.executor; +package org.opensearch.sql.opensearch.executor; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -34,15 +34,15 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.monitor.ResourceMonitor; -import com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector.ResourceMonitorPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanNodeVisitor; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.monitor.ResourceMonitor; +import org.opensearch.sql.opensearch.executor.protector.ResourceMonitorPlan; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlanNodeVisitor; @ExtendWith(MockitoExtension.class) class ResourceMonitorPlanTest { @@ -129,4 +129,4 @@ void acceptSuccess() { monitorPlan.accept(visitor, context); verify(plan, times(1)).accept(visitor, context); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/NoopExecutionProtectorTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/executor/protector/NoopExecutionProtectorTest.java similarity index 90% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/NoopExecutionProtectorTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/executor/protector/NoopExecutionProtectorTest.java index e00d4a488a..03a7f7e2c5 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/executor/protector/NoopExecutionProtectorTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/executor/protector/NoopExecutionProtectorTest.java @@ -26,15 +26,15 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector; +package org.opensearch.sql.opensearch.executor.protector; import static org.junit.jupiter.api.Assertions.assertEquals; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.planner.physical.PhysicalPlan; @ExtendWith(MockitoExtension.class) class NoopExecutionProtectorTest { @@ -49,4 +49,4 @@ void protect() { assertEquals(plan, protectedPlan); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/mapping/IndexMappingTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/mapping/IndexMappingTest.java similarity index 96% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/mapping/IndexMappingTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/mapping/IndexMappingTest.java index f0d342e831..f955c275dc 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/mapping/IndexMappingTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/mapping/IndexMappingTest.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.mapping; +package org.opensearch.sql.opensearch.mapping; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.aMapWithSize; diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/monitor/OpenSearchMemoryHealthyTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/monitor/OpenSearchMemoryHealthyTest.java similarity index 97% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/monitor/OpenSearchMemoryHealthyTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/monitor/OpenSearchMemoryHealthyTest.java index 5a64dea0a3..b5ce132c59 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/monitor/OpenSearchMemoryHealthyTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/monitor/OpenSearchMemoryHealthyTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.monitor; +package org.opensearch.sql.opensearch.monitor; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -96,4 +96,4 @@ void setMemoryUsage() { new OpenSearchMemoryHealthy.MemoryUsage(); assertTrue(usage.usage() > 0); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/monitor/OpenSearchResourceMonitorTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/monitor/OpenSearchResourceMonitorTest.java similarity index 95% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/monitor/OpenSearchResourceMonitorTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/monitor/OpenSearchResourceMonitorTest.java index d42dbddb97..6b997ee6dc 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/monitor/OpenSearchResourceMonitorTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/monitor/OpenSearchResourceMonitorTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.monitor; +package org.opensearch.sql.opensearch.monitor; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -33,13 +33,13 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.sql.common.setting.Settings; @ExtendWith(MockitoExtension.class) class OpenSearchResourceMonitorTest { diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicOptimizerTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicOptimizerTest.java similarity index 91% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicOptimizerTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicOptimizerTest.java index 1ab9ac3184..381a8438d8 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicOptimizerTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicOptimizerTest.java @@ -26,36 +26,36 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical; +package org.opensearch.sql.opensearch.planner.logical; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.integerValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.LONG; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils.indexScan; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils.indexScanAgg; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils.noProjects; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils.projects; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.filter; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.limit; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.project; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.relation; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.sort; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.data.model.ExprValueUtils.integerValue; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.LONG; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.opensearch.utils.Utils.indexScan; +import static org.opensearch.sql.opensearch.utils.Utils.indexScanAgg; +import static org.opensearch.sql.opensearch.utils.Utils.noProjects; +import static org.opensearch.sql.opensearch.utils.Utils.projects; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.aggregation; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.filter; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.limit; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.project; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.relation; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.sort; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.LogicalPlanOptimizer; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import org.apache.commons.lang3.tuple.Pair; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.opensearch.utils.Utils; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.optimizer.LogicalPlanOptimizer; class OpenSearchLogicOptimizerTest { @@ -592,4 +592,4 @@ private LogicalPlan optimize(LogicalPlan plan) { final LogicalPlan optimize = optimizer.optimize(plan); return optimize; } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexScanTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexScanTest.java similarity index 94% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexScanTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexScanTest.java index 2908070c44..fbc7c9a094 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexScanTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/planner/logical/OpenSearchLogicalIndexScanTest.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical; +package org.opensearch.sql.opensearch.planner.logical; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -43,4 +43,4 @@ void has_projects() { assertFalse(OpenSearchLogicalIndexScan.builder().build().hasProjects()); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchQueryRequestTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/request/OpenSearchQueryRequestTest.java similarity index 93% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchQueryRequestTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/request/OpenSearchQueryRequestTest.java index 8bf9e5a749..921a19d7ef 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchQueryRequestTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/request/OpenSearchQueryRequestTest.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.request; +package org.opensearch.sql.opensearch.request; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -37,8 +37,6 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.OpenSearchResponse; import java.util.function.Consumer; import java.util.function.Function; import org.junit.jupiter.api.Test; @@ -52,6 +50,8 @@ import org.opensearch.search.SearchHit; import org.opensearch.search.SearchHits; import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; +import org.opensearch.sql.opensearch.response.OpenSearchResponse; @ExtendWith(MockitoExtension.class) public class OpenSearchQueryRequestTest { diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchScrollRequestTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/request/OpenSearchScrollRequestTest.java similarity index 93% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchScrollRequestTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/request/OpenSearchScrollRequestTest.java index 962f858315..db5cfb228e 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/OpenSearchScrollRequestTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/request/OpenSearchScrollRequestTest.java @@ -25,13 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.request; +package org.opensearch.sql.opensearch.request; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; @@ -40,6 +39,7 @@ import org.opensearch.action.search.SearchScrollRequest; import org.opensearch.index.query.QueryBuilders; import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; @ExtendWith(MockitoExtension.class) class OpenSearchScrollRequestTest { diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchCatIndicesRequestTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/request/system/OpenSearchCatIndicesRequestTest.java similarity index 85% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchCatIndicesRequestTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/request/system/OpenSearchCatIndicesRequestTest.java index 0b96f9a031..bfce203ab8 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchCatIndicesRequestTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/request/system/OpenSearchCatIndicesRequestTest.java @@ -26,23 +26,23 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.request.system; +package org.opensearch.sql.opensearch.request.system; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.hasEntry; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.opensearch.client.OpenSearchClient; @ExtendWith(MockitoExtension.class) class OpenSearchCatIndicesRequestTest { @@ -66,4 +66,4 @@ void testToString() { assertEquals("OpenSearchCatIndicesRequest{}", new OpenSearchCatIndicesRequest(client).toString()); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchDescribeIndexRequestTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/request/system/OpenSearchDescribeIndexRequestTest.java similarity index 84% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchDescribeIndexRequestTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/request/system/OpenSearchDescribeIndexRequestTest.java index 23295339c8..deba42ae69 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/request/system/OpenSearchDescribeIndexRequestTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/request/system/OpenSearchDescribeIndexRequestTest.java @@ -26,20 +26,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.request.system; +package org.opensearch.sql.opensearch.request.system; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.hasEntry; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.mapping.IndexMapping; import com.google.common.collect.ImmutableMap; import java.util.List; import java.util.Map; @@ -47,6 +43,10 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.mapping.IndexMapping; @ExtendWith(MockitoExtension.class) class OpenSearchDescribeIndexRequestTest { @@ -97,4 +97,4 @@ void filterOutUnknownType() { assertEquals(1, fieldTypes.size()); assertThat(fieldTypes, hasEntry("name", STRING)); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/AggregationResponseUtils.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/response/AggregationResponseUtils.java similarity index 98% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/AggregationResponseUtils.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/response/AggregationResponseUtils.java index 022cef9953..c8ef830635 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/AggregationResponseUtils.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/response/AggregationResponseUtils.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.response; +package org.opensearch.sql.opensearch.response; import com.google.common.collect.ImmutableMap; import java.io.IOException; diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/OpenSearchAggregationResponseParserTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/response/OpenSearchAggregationResponseParserTest.java similarity index 99% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/OpenSearchAggregationResponseParserTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/response/OpenSearchAggregationResponseParserTest.java index 3464249391..b49bec4d44 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/OpenSearchAggregationResponseParserTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/response/OpenSearchAggregationResponseParserTest.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.response; +package org.opensearch.sql.opensearch.response; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.contains; @@ -231,4 +231,4 @@ public Map entry(String name, Object value) { public Map entry(String name, Object value, String name2, Object value2) { return ImmutableMap.of(name, value, name2, value2); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/OpenSearchResponseTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/response/OpenSearchResponseTest.java similarity index 93% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/OpenSearchResponseTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/response/OpenSearchResponseTest.java index d20c56fc3a..184312afa1 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/OpenSearchResponseTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/response/OpenSearchResponseTest.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.response; +package org.opensearch.sql.opensearch.response; import static java.util.Collections.emptyList; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -36,10 +36,6 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprIntegerValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; import com.google.common.collect.ImmutableMap; import java.util.Arrays; import org.apache.lucene.search.TotalHits; @@ -53,6 +49,10 @@ import org.opensearch.search.SearchHit; import org.opensearch.search.SearchHits; import org.opensearch.search.aggregations.Aggregations; +import org.opensearch.sql.data.model.ExprIntegerValue; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; @ExtendWith(MockitoExtension.class) class OpenSearchResponseTest { diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/ErrorMessageFactoryTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/response/error/ErrorMessageFactoryTest.java similarity index 97% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/ErrorMessageFactoryTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/response/error/ErrorMessageFactoryTest.java index d8b45a800d..ed1274fd65 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/ErrorMessageFactoryTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/response/error/ErrorMessageFactoryTest.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.response.error; +package org.opensearch.sql.opensearch.response.error; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/ErrorMessageTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/response/error/ErrorMessageTest.java similarity index 97% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/ErrorMessageTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/response/error/ErrorMessageTest.java index 012b0d18ec..a1e7eab624 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/ErrorMessageTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/response/error/ErrorMessageTest.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.response.error; +package org.opensearch.sql.opensearch.response.error; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.opensearch.rest.RestStatus.BAD_REQUEST; @@ -83,4 +83,4 @@ public void testToStringWithEmptyErrorMessage() { + " \"status\": 503\n" + "}", errorMessage.toString()); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/OpenSearchErrorMessageTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/response/error/OpenSearchErrorMessageTest.java similarity index 97% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/OpenSearchErrorMessageTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/response/error/OpenSearchErrorMessageTest.java index 247e274cb1..519c6ec938 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/response/error/OpenSearchErrorMessageTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/response/error/OpenSearchErrorMessageTest.java @@ -26,7 +26,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.response.error; +package org.opensearch.sql.opensearch.response.error; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; @@ -89,4 +89,4 @@ public void fetchDetailsWithSearchPhaseExecutionException() { + "raw response from OpenSearch engine.", errorMessage.fetchDetails()); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/setting/OpenSearchSettingsTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/setting/OpenSearchSettingsTest.java similarity index 94% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/setting/OpenSearchSettingsTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/setting/OpenSearchSettingsTest.java index 73201698b9..794fd64d91 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/setting/OpenSearchSettingsTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/setting/OpenSearchSettingsTest.java @@ -26,13 +26,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.setting; +package org.opensearch.sql.opensearch.setting; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; import java.util.List; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -41,6 +40,7 @@ import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Setting; import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.sql.common.setting.Settings; @ExtendWith(MockitoExtension.class) class OpenSearchSettingsTest { @@ -75,4 +75,4 @@ void update() { assertNotEquals(newValue.getBytes(), oldValue.getBytes()); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchDefaultImplementorTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/OpenSearchDefaultImplementorTest.java similarity index 87% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchDefaultImplementorTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/OpenSearchDefaultImplementorTest.java index 0a94b1d3bd..cede9a9f6d 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchDefaultImplementorTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/OpenSearchDefaultImplementorTest.java @@ -26,11 +26,11 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage; +package org.opensearch.sql.opensearch.storage; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.relation; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.relation; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -57,7 +57,7 @@ public void visitInvalidTypeShouldThrowException() { ; assertEquals( "unexpected plan node type " - + "class com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRelation", + + "class org.opensearch.sql.planner.logical.LogicalRelation", exception.getMessage()); } } diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchIndexScanTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/OpenSearchIndexScanTest.java similarity index 89% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchIndexScanTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/OpenSearchIndexScanTest.java index 18c01de8d9..90e988c42c 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchIndexScanTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/OpenSearchIndexScanTest.java @@ -25,9 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage; +package org.opensearch.sql.opensearch.storage; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -38,15 +37,8 @@ import static org.mockito.Mockito.when; import static org.opensearch.search.sort.FieldSortBuilder.DOC_FIELD_NAME; import static org.opensearch.search.sort.SortOrder.ASC; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.OpenSearchQueryRequest; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.OpenSearchRequest; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.OpenSearchResponse; import com.google.common.collect.ImmutableMap; import java.util.Arrays; import org.junit.jupiter.api.BeforeEach; @@ -60,6 +52,14 @@ import org.opensearch.index.query.QueryBuilder; import org.opensearch.index.query.QueryBuilders; import org.opensearch.search.SearchHit; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; +import org.opensearch.sql.opensearch.request.OpenSearchQueryRequest; +import org.opensearch.sql.opensearch.request.OpenSearchRequest; +import org.opensearch.sql.opensearch.response.OpenSearchResponse; @ExtendWith(MockitoExtension.class) class OpenSearchIndexScanTest { diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchIndexTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/OpenSearchIndexTest.java similarity index 79% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchIndexTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/OpenSearchIndexTest.java index 015298ac17..26a5a34f53 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchIndexTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/OpenSearchIndexTest.java @@ -25,27 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage; - -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.literal; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.named; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils.indexScan; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils.indexScanAgg; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils.noProjects; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils.projects; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.eval; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.filter; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.limit; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.project; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.relation; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.remove; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.rename; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.sort; +package org.opensearch.sql.opensearch.storage; + import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.aMapWithSize; import static org.hamcrest.Matchers.allOf; @@ -55,32 +36,26 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.DSL.literal; +import static org.opensearch.sql.expression.DSL.named; +import static org.opensearch.sql.expression.DSL.ref; +import static org.opensearch.sql.opensearch.utils.Utils.indexScan; +import static org.opensearch.sql.opensearch.utils.Utils.indexScanAgg; +import static org.opensearch.sql.opensearch.utils.Utils.noProjects; +import static org.opensearch.sql.opensearch.utils.Utils.projects; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.aggregation; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.eval; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.filter; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.limit; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.project; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.relation; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.remove; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.rename; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.sort; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprBooleanValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.AvgAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType; -import com.amazon.opendistroforelasticsearch.sql.opensearch.data.value.OpenSearchExprValueFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.mapping.IndexMapping; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.AggregationOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.FilterOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.LimitOperator; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlanDSL; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.ProjectOperator; -import com.amazon.opendistroforelasticsearch.sql.storage.Table; import com.google.common.collect.ImmutableMap; import java.util.Arrays; import java.util.List; @@ -92,6 +67,31 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.opensearch.search.fetch.subphase.FetchSourceContext; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.data.model.ExprBooleanValue; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.AvgAggregator; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.data.type.OpenSearchDataType; +import org.opensearch.sql.opensearch.data.value.OpenSearchExprValueFactory; +import org.opensearch.sql.opensearch.mapping.IndexMapping; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.logical.LogicalPlanDSL; +import org.opensearch.sql.planner.physical.AggregationOperator; +import org.opensearch.sql.planner.physical.FilterOperator; +import org.opensearch.sql.planner.physical.LimitOperator; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.PhysicalPlanDSL; +import org.opensearch.sql.planner.physical.ProjectOperator; +import org.opensearch.sql.storage.Table; @ExtendWith(MockitoExtension.class) class OpenSearchIndexTest { diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchStorageEngineTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/OpenSearchStorageEngineTest.java similarity index 78% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchStorageEngineTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/OpenSearchStorageEngineTest.java index 2db67001b8..156e5e1c30 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/OpenSearchStorageEngineTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/OpenSearchStorageEngineTest.java @@ -25,20 +25,20 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage; +package org.opensearch.sql.opensearch.storage; -import static com.amazon.opendistroforelasticsearch.sql.utils.SystemIndexUtils.TABLE_INFO; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.utils.SystemIndexUtils.TABLE_INFO; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.system.OpenSearchSystemIndex; -import com.amazon.opendistroforelasticsearch.sql.storage.Table; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.storage.system.OpenSearchSystemIndex; +import org.opensearch.sql.storage.Table; @ExtendWith(MockitoExtension.class) class OpenSearchStorageEngineTest { diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/ExpressionScriptEngineTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/ExpressionScriptEngineTest.java similarity index 87% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/ExpressionScriptEngineTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/ExpressionScriptEngineTest.java index 22e564e523..4e832e1e02 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/ExpressionScriptEngineTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/ExpressionScriptEngineTest.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script; +package org.opensearch.sql.opensearch.storage.script; import static java.util.Collections.emptyMap; import static org.hamcrest.MatcherAssert.assertThat; @@ -35,10 +35,6 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.ExpressionFilterScriptFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization.ExpressionSerializer; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayNameGeneration; import org.junit.jupiter.api.DisplayNameGenerator; @@ -50,6 +46,10 @@ import org.opensearch.script.FilterScript; import org.opensearch.script.ScriptContext; import org.opensearch.script.ScriptEngine; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.opensearch.storage.script.filter.ExpressionFilterScriptFactory; +import org.opensearch.sql.opensearch.storage.serialization.ExpressionSerializer; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -91,4 +91,4 @@ void should_throw_exception_for_unsupported_script_context() { scriptEngine.compile("test", "test code", unknownCtx, emptyMap())); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/AggregationQueryBuilderTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/AggregationQueryBuilderTest.java similarity index 89% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/AggregationQueryBuilderTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/AggregationQueryBuilderTest.java index fc8b15d422..2242298bed 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/AggregationQueryBuilderTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/AggregationQueryBuilderTest.java @@ -26,34 +26,25 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation; +package org.opensearch.sql.opensearch.storage.script.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.DOUBLE; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.literal; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.named; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils.agg; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils.avg; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils.group; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils.sort; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; +import static org.opensearch.sql.data.type.ExprCoreType.DOUBLE; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.DSL.literal; +import static org.opensearch.sql.expression.DSL.named; +import static org.opensearch.sql.expression.DSL.ref; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; +import static org.opensearch.sql.opensearch.utils.Utils.agg; +import static org.opensearch.sql.opensearch.utils.Utils.avg; +import static org.opensearch.sql.opensearch.utils.Utils.group; +import static org.opensearch.sql.opensearch.utils.Utils.sort; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.AvgAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization.ExpressionSerializer; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.AbstractMap; import java.util.Arrays; @@ -70,6 +61,15 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.aggregation.AvgAggregator; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.opensearch.storage.serialization.ExpressionSerializer; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -442,4 +442,4 @@ private Set> buildTypeMapping( private Map.Entry map(String name, ExprType type) { return new AbstractMap.SimpleEntry(name, type); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactoryTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactoryTest.java similarity index 92% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactoryTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactoryTest.java index ecf33c791d..03603ee64c 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactoryTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptFactoryTest.java @@ -26,15 +26,13 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation; +package org.opensearch.sql.opensearch.storage.script.aggregation; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.io.IOException; import java.util.Collections; import java.util.Map; @@ -48,6 +46,8 @@ import org.opensearch.script.AggregationScript; import org.opensearch.search.lookup.LeafSearchLookup; import org.opensearch.search.lookup.SearchLookup; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -88,4 +88,4 @@ void can_initialize_expression_filter_script() throws IOException { actualScript ); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptTest.java similarity index 88% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptTest.java index 0d09e6fd38..c36b6d63a3 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/ExpressionAggregationScriptTest.java @@ -26,23 +26,20 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation; +package org.opensearch.sql.opensearch.storage.script.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.literal; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; import static java.util.Collections.emptyMap; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.DSL.literal; +import static org.opensearch.sql.expression.DSL.ref; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; import com.google.common.collect.ImmutableMap; import java.util.Map; import lombok.RequiredArgsConstructor; @@ -57,6 +54,9 @@ import org.opensearch.search.lookup.LeafDocLookup; import org.opensearch.search.lookup.LeafSearchLookup; import org.opensearch.search.lookup.SearchLookup; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.config.ExpressionConfig; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -190,4 +190,4 @@ public int size() { return 1; } } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/GroupSortOrderTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/GroupSortOrderTest.java similarity index 78% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/GroupSortOrderTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/GroupSortOrderTest.java index 5dbd8b2389..e589fbf3a0 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/GroupSortOrderTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/GroupSortOrderTest.java @@ -26,23 +26,23 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation; +package org.opensearch.sql.opensearch.storage.script.aggregation; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.named; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.utils.Utils.sort; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.DSL.named; +import static org.opensearch.sql.expression.DSL.ref; +import static org.opensearch.sql.opensearch.utils.Utils.sort; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.opensearch.search.sort.SortOrder; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.ReferenceExpression; @ExtendWith(MockitoExtension.class) class GroupSortOrderTest { @@ -85,4 +85,4 @@ private int compare(NamedExpression e1, NamedExpression e2) { private SortOrder order(NamedExpression expr) { return groupSortOrder.apply(expr); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilderTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilderTest.java similarity index 85% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilderTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilderTest.java index bdced7559a..7d1d711464 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilderTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/BucketAggregationBuilderTest.java @@ -26,17 +26,15 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation.dsl; +package org.opensearch.sql.opensearch.storage.script.aggregation.dsl; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.named; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.opensearch.common.xcontent.ToXContent.EMPTY_PARAMS; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.expression.DSL.named; +import static org.opensearch.sql.expression.DSL.ref; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization.ExpressionSerializer; import java.util.Arrays; import java.util.List; import lombok.SneakyThrows; @@ -54,6 +52,8 @@ import org.opensearch.common.xcontent.XContentType; import org.opensearch.search.aggregations.bucket.composite.CompositeValuesSourceBuilder; import org.opensearch.search.sort.SortOrder; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.opensearch.storage.serialization.ExpressionSerializer; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -113,4 +113,4 @@ private String buildQuery(List> groupByExpressi private Pair asc(NamedExpression expression) { return Pair.of(expression, SortOrder.ASC); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilderTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilderTest.java similarity index 84% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilderTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilderTest.java index f4cf074a5c..b956a2f5a0 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilderTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/aggregation/dsl/MetricAggregationBuilderTest.java @@ -26,24 +26,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.aggregation.dsl; +package org.opensearch.sql.opensearch.storage.script.aggregation.dsl; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.literal; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.named; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.expression.DSL.literal; +import static org.opensearch.sql.expression.DSL.named; +import static org.opensearch.sql.expression.DSL.ref; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.AvgAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.CountAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.MaxAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.MinAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.SumAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.function.FunctionName; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization.ExpressionSerializer; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Arrays; import java.util.List; @@ -55,6 +47,14 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.expression.aggregation.AvgAggregator; +import org.opensearch.sql.expression.aggregation.CountAggregator; +import org.opensearch.sql.expression.aggregation.MaxAggregator; +import org.opensearch.sql.expression.aggregation.MinAggregator; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.expression.aggregation.SumAggregator; +import org.opensearch.sql.expression.function.FunctionName; +import org.opensearch.sql.opensearch.storage.serialization.ExpressionSerializer; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -214,4 +214,4 @@ private String buildQuery(List namedAggregatorList) { aggregationBuilder.build(namedAggregatorList).toString()) .toPrettyString(); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactoryTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactoryTest.java similarity index 92% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactoryTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactoryTest.java index b927fad061..d3d87826c9 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactoryTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptFactoryTest.java @@ -25,14 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter; +package org.opensearch.sql.opensearch.storage.script.filter; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; import java.io.IOException; import java.util.Collections; import java.util.Map; @@ -46,6 +44,8 @@ import org.opensearch.script.FilterScript; import org.opensearch.search.lookup.LeafSearchLookup; import org.opensearch.search.lookup.SearchLookup; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -84,4 +84,4 @@ void can_initialize_expression_filter_script() throws IOException { ); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptTest.java similarity index 87% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptTest.java index 8a82f38646..d948276021 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/ExpressionFilterScriptTest.java @@ -25,15 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter; - -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.FLOAT; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.TIMESTAMP; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.literal; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; +package org.opensearch.sql.opensearch.storage.script.filter; + import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; import static java.util.Collections.singletonList; @@ -43,12 +36,14 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.type.ExprCoreType.FLOAT; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.TIMESTAMP; +import static org.opensearch.sql.expression.DSL.literal; +import static org.opensearch.sql.expression.DSL.ref; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTimestampValue; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.LiteralExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; import com.google.common.collect.ImmutableMap; import java.time.ZonedDateTime; import java.util.List; @@ -66,6 +61,11 @@ import org.opensearch.search.lookup.LeafDocLookup; import org.opensearch.search.lookup.LeafSearchLookup; import org.opensearch.search.lookup.SearchLookup; +import org.opensearch.sql.data.model.ExprTimestampValue; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.LiteralExpression; +import org.opensearch.sql.expression.config.ExpressionConfig; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -256,4 +256,4 @@ public int size() { } } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/FilterQueryBuilderTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/FilterQueryBuilderTest.java similarity index 89% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/FilterQueryBuilderTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/FilterQueryBuilderTest.java index 89c360f32c..658e10332e 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/FilterQueryBuilderTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/FilterQueryBuilderTest.java @@ -25,23 +25,17 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter; +package org.opensearch.sql.opensearch.storage.script.filter; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.literal; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.DSL.literal; +import static org.opensearch.sql.expression.DSL.ref; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; -import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.FunctionExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization.ExpressionSerializer; import com.google.common.collect.ImmutableMap; import java.util.Map; import org.json.JSONObject; @@ -52,6 +46,12 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.common.utils.StringUtils; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.FunctionExpression; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.opensearch.storage.serialization.ExpressionSerializer; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) @ExtendWith(MockitoExtension.class) @@ -292,4 +292,4 @@ private void mockToStringSerializer() { }).when(serializer).serialize(any()); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/LuceneQueryTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/LuceneQueryTest.java similarity index 83% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/LuceneQueryTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/LuceneQueryTest.java index 7dba39e0bf..4f3cdb3655 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/LuceneQueryTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/LuceneQueryTest.java @@ -25,17 +25,17 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.lucene; +package org.opensearch.sql.opensearch.storage.script.filter.lucene; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; import org.junit.jupiter.api.DisplayNameGeneration; import org.junit.jupiter.api.DisplayNameGenerator; import org.junit.jupiter.api.Test; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.config.ExpressionConfig; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) class LuceneQueryTest { @@ -52,4 +52,4 @@ void should_throw_exception_if_not_implemented() { new LuceneQuery(){}.doBuild(null, null, null)); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/RangeQueryTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/RangeQueryTest.java similarity index 80% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/RangeQueryTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/RangeQueryTest.java index 579b116fd1..84513b7376 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/filter/lucene/RangeQueryTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/RangeQueryTest.java @@ -25,16 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.lucene; +package org.opensearch.sql.opensearch.storage.script.filter.lucene; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.filter.lucene.RangeQuery.Comparison; import org.junit.jupiter.api.DisplayNameGeneration; import org.junit.jupiter.api.DisplayNameGenerator; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.opensearch.storage.script.filter.lucene.RangeQuery.Comparison; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) class RangeQueryTest { @@ -47,4 +47,4 @@ void should_throw_exception_for_unsupported_comparison() { .doBuild("name", STRING, ExprValueUtils.stringValue("John"))); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/sort/SortQueryBuilderTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/sort/SortQueryBuilderTest.java similarity index 83% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/sort/SortQueryBuilderTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/sort/SortQueryBuilderTest.java index 7078fb6737..f82ac27d4a 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/script/sort/SortQueryBuilderTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/script/sort/SortQueryBuilderTest.java @@ -26,18 +26,18 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.sort; +package org.opensearch.sql.opensearch.storage.script.sort; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.config.ExpressionConfig; class SortQueryBuilderTest { @@ -57,4 +57,4 @@ void build_sortbuilder_from_function_should_throw_exception() { "intV", INTEGER), DSL.literal(1)), Sort.SortOption.DEFAULT_ASC)); assertThat(exception.getMessage(), Matchers.containsString("unsupported expression")); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/serialization/DefaultExpressionSerializerTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/serialization/DefaultExpressionSerializerTest.java similarity index 80% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/serialization/DefaultExpressionSerializerTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/serialization/DefaultExpressionSerializerTest.java index 8985e49ffe..25f4dc93f8 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/serialization/DefaultExpressionSerializerTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/serialization/DefaultExpressionSerializerTest.java @@ -25,25 +25,25 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization; +package org.opensearch.sql.opensearch.storage.serialization; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.literal; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.DSL.literal; +import static org.opensearch.sql.expression.DSL.ref; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.ExpressionNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.expression.env.Environment; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayNameGeneration; import org.junit.jupiter.api.DisplayNameGenerator; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.ExpressionNodeVisitor; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.expression.env.Environment; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) class DefaultExpressionSerializerTest { @@ -111,4 +111,4 @@ public void cannot_deserialize_illegal_expression_code() { assertThrows(IllegalStateException.class, () -> serializer.deserialize("hello world")); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndexScanTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndexScanTest.java similarity index 88% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndexScanTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndexScanTest.java index ec04d9489f..4503068347 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndexScanTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndexScanTest.java @@ -26,19 +26,19 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.system; +package org.opensearch.sql.opensearch.storage.system; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.when; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; -import com.amazon.opendistroforelasticsearch.sql.opensearch.request.system.OpenSearchSystemRequest; import java.util.Collections; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.opensearch.request.system.OpenSearchSystemRequest; @ExtendWith(MockitoExtension.class) class OpenSearchSystemIndexScanTest { @@ -63,4 +63,4 @@ public void explain() { assertEquals("request", systemIndexScan.explain()); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndexTest.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndexTest.java similarity index 69% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndexTest.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndexTest.java index 0a43d4d7fa..007385275d 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/storage/system/OpenSearchSystemIndexTest.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/storage/system/OpenSearchSystemIndexTest.java @@ -26,30 +26,30 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.storage.system; +package org.opensearch.sql.opensearch.storage.system; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.named; -import static com.amazon.opendistroforelasticsearch.sql.expression.DSL.ref; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.project; -import static com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlanDSL.relation; -import static com.amazon.opendistroforelasticsearch.sql.utils.SystemIndexUtils.TABLE_INFO; -import static com.amazon.opendistroforelasticsearch.sql.utils.SystemIndexUtils.mappingTable; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.hasEntry; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.expression.DSL.named; +import static org.opensearch.sql.expression.DSL.ref; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.project; +import static org.opensearch.sql.planner.logical.LogicalPlanDSL.relation; +import static org.opensearch.sql.utils.SystemIndexUtils.TABLE_INFO; +import static org.opensearch.sql.utils.SystemIndexUtils.mappingTable; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.ProjectOperator; import java.util.Map; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.planner.physical.ProjectOperator; @ExtendWith(MockitoExtension.class) class OpenSearchSystemIndexTest { @@ -89,4 +89,4 @@ void implement() { assertTrue(plan instanceof ProjectOperator); assertTrue(plan.getChild().get(0) instanceof OpenSearchSystemIndexScan); } -} \ No newline at end of file +} diff --git a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/utils/Utils.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/utils/Utils.java similarity index 88% rename from opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/utils/Utils.java rename to opensearch/src/test/java/org/opensearch/sql/opensearch/utils/Utils.java index 3c90588b3a..28190c26b3 100644 --- a/opensearch/src/test/java/com/amazon/opendistroforelasticsearch/sql/opensearch/utils/Utils.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/utils/Utils.java @@ -26,18 +26,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.opensearch.utils; - -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.expression.Expression; -import com.amazon.opendistroforelasticsearch.sql.expression.NamedExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.ReferenceExpression; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.AvgAggregator; -import com.amazon.opendistroforelasticsearch.sql.expression.aggregation.NamedAggregator; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexAgg; -import com.amazon.opendistroforelasticsearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; +package org.opensearch.sql.opensearch.utils; + import com.google.common.collect.ImmutableSet; import java.util.Arrays; import java.util.Collections; @@ -45,6 +35,16 @@ import java.util.Set; import lombok.experimental.UtilityClass; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.expression.Expression; +import org.opensearch.sql.expression.NamedExpression; +import org.opensearch.sql.expression.ReferenceExpression; +import org.opensearch.sql.expression.aggregation.AvgAggregator; +import org.opensearch.sql.expression.aggregation.NamedAggregator; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexAgg; +import org.opensearch.sql.opensearch.planner.logical.OpenSearchLogicalIndexScan; +import org.opensearch.sql.planner.logical.LogicalPlan; @UtilityClass public class Utils { diff --git a/plugin/build.gradle b/plugin/build.gradle index 0b93b0f1b6..ebb244fe17 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -47,7 +47,7 @@ repositories { opensearchplugin { name 'opensearch-sql' description 'OpenSearch SQL' - classname 'com.amazon.opendistroforelasticsearch.sql.plugin.SQLPlugin' + classname 'org.opensearch.sql.plugin.SQLPlugin' licenseFile rootProject.file("LICENSE.txt") noticeFile rootProject.file("NOTICE") } @@ -85,7 +85,7 @@ ext { // ANTLR generated parser file is too large to be checked which caused licenseHeaders stuck. licenseHeaders { enabled = true - excludes = ['com/amazon/opendistroforelasticsearch/sql/antlr/parser/**'] + excludes = ['org/opensearch/sql/antlr/parser/**'] } tasks.withType(licenseHeaders.class) { @@ -142,10 +142,10 @@ afterEvaluate { prefix '/usr' license 'ASL-2.0' - maintainer 'OpenDistro for Elasticsearch Team ' + maintainer 'OpenSearch Team ' url 'https://opendistro.github.io/for-elasticsearch/downloads.html' summary ''' - SQL plugin for OpenDistro for Elasticsearch. + SQL plugin for OpenSearch. Reference documentation can be found at https://opendistro.github.io/for-elasticsearch-docs/. '''.stripIndent().replace('\n', ' ').trim() } diff --git a/plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/SQLPlugin.java b/plugin/src/main/java/org/opensearch/sql/plugin/SQLPlugin.java similarity index 84% rename from plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/SQLPlugin.java rename to plugin/src/main/java/org/opensearch/sql/plugin/SQLPlugin.java index 326acf48e3..34fb01671e 100644 --- a/plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/SQLPlugin.java +++ b/plugin/src/main/java/org/opensearch/sql/plugin/SQLPlugin.java @@ -24,20 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.plugin; - -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.AsyncRestExecutor; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlSettingsAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.plugin.RestSqlStatsAction; -import com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings; -import com.amazon.opendistroforelasticsearch.sql.opensearch.setting.OpenSearchSettings; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.script.ExpressionScriptEngine; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.serialization.DefaultExpressionSerializer; -import com.amazon.opendistroforelasticsearch.sql.plugin.rest.RestPPLQueryAction; -import com.amazon.opendistroforelasticsearch.sql.plugin.rest.RestPPLStatsAction; +package org.opensearch.sql.plugin; + import com.google.common.collect.ImmutableList; import java.util.Arrays; import java.util.Collection; @@ -68,6 +56,18 @@ import org.opensearch.script.ScriptContext; import org.opensearch.script.ScriptEngine; import org.opensearch.script.ScriptService; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.legacy.executor.AsyncRestExecutor; +import org.opensearch.sql.legacy.metrics.Metrics; +import org.opensearch.sql.legacy.plugin.RestSqlAction; +import org.opensearch.sql.legacy.plugin.RestSqlSettingsAction; +import org.opensearch.sql.legacy.plugin.RestSqlStatsAction; +import org.opensearch.sql.legacy.plugin.SqlSettings; +import org.opensearch.sql.opensearch.setting.OpenSearchSettings; +import org.opensearch.sql.opensearch.storage.script.ExpressionScriptEngine; +import org.opensearch.sql.opensearch.storage.serialization.DefaultExpressionSerializer; +import org.opensearch.sql.plugin.rest.RestPPLQueryAction; +import org.opensearch.sql.plugin.rest.RestPPLStatsAction; import org.opensearch.threadpool.ExecutorBuilder; import org.opensearch.threadpool.FixedExecutorBuilder; import org.opensearch.threadpool.ThreadPool; @@ -85,7 +85,7 @@ public class SQLPlugin extends Plugin implements ActionPlugin, ScriptPlugin { /** * Settings should be inited when bootstrap the plugin. */ - private com.amazon.opendistroforelasticsearch.sql.common.setting.Settings pluginSettings; + private org.opensearch.sql.common.setting.Settings pluginSettings; public String name() { return "sql"; diff --git a/plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/request/PPLQueryRequestFactory.java b/plugin/src/main/java/org/opensearch/sql/plugin/request/PPLQueryRequestFactory.java similarity index 90% rename from plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/request/PPLQueryRequestFactory.java rename to plugin/src/main/java/org/opensearch/sql/plugin/request/PPLQueryRequestFactory.java index 9782ddc8a0..299c48e3b7 100644 --- a/plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/request/PPLQueryRequestFactory.java +++ b/plugin/src/main/java/org/opensearch/sql/plugin/request/PPLQueryRequestFactory.java @@ -24,18 +24,18 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.plugin.request; +package org.opensearch.sql.plugin.request; -import static com.amazon.opendistroforelasticsearch.sql.legacy.plugin.SqlSettings.QUERY_RESPONSE_FORMAT; +import static org.opensearch.sql.legacy.plugin.SqlSettings.QUERY_RESPONSE_FORMAT; -import com.amazon.opendistroforelasticsearch.sql.legacy.esdomain.LocalClusterState; -import com.amazon.opendistroforelasticsearch.sql.ppl.domain.PPLQueryRequest; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.Format; import java.util.Map; import java.util.Optional; import org.json.JSONException; import org.json.JSONObject; import org.opensearch.rest.RestRequest; +import org.opensearch.sql.legacy.esdomain.LocalClusterState; +import org.opensearch.sql.ppl.domain.PPLQueryRequest; +import org.opensearch.sql.protocol.response.format.Format; /** * Factory of {@link PPLQueryRequest}. diff --git a/plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/rest/OpenSearchPluginConfig.java b/plugin/src/main/java/org/opensearch/sql/plugin/rest/OpenSearchPluginConfig.java similarity index 65% rename from plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/rest/OpenSearchPluginConfig.java rename to plugin/src/main/java/org/opensearch/sql/plugin/rest/OpenSearchPluginConfig.java index 1524915238..2b697890cf 100644 --- a/plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/rest/OpenSearchPluginConfig.java +++ b/plugin/src/main/java/org/opensearch/sql/plugin/rest/OpenSearchPluginConfig.java @@ -25,22 +25,22 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.plugin.rest; +package org.opensearch.sql.plugin.rest; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.monitor.ResourceMonitor; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.client.OpenSearchNodeClient; -import com.amazon.opendistroforelasticsearch.sql.opensearch.executor.OpenSearchExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector.ExecutionProtector; -import com.amazon.opendistroforelasticsearch.sql.opensearch.executor.protector.OpenSearchExecutionProtector; -import com.amazon.opendistroforelasticsearch.sql.opensearch.monitor.OpenSearchMemoryHealthy; -import com.amazon.opendistroforelasticsearch.sql.opensearch.monitor.OpenSearchResourceMonitor; -import com.amazon.opendistroforelasticsearch.sql.opensearch.storage.OpenSearchStorageEngine; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; import org.opensearch.client.node.NodeClient; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.monitor.ResourceMonitor; +import org.opensearch.sql.opensearch.client.OpenSearchClient; +import org.opensearch.sql.opensearch.client.OpenSearchNodeClient; +import org.opensearch.sql.opensearch.executor.OpenSearchExecutionEngine; +import org.opensearch.sql.opensearch.executor.protector.ExecutionProtector; +import org.opensearch.sql.opensearch.executor.protector.OpenSearchExecutionProtector; +import org.opensearch.sql.opensearch.monitor.OpenSearchMemoryHealthy; +import org.opensearch.sql.opensearch.monitor.OpenSearchResourceMonitor; +import org.opensearch.sql.opensearch.storage.OpenSearchStorageEngine; +import org.opensearch.sql.storage.StorageEngine; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/rest/RestPPLQueryAction.java b/plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLQueryAction.java similarity index 80% rename from plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/rest/RestPPLQueryAction.java rename to plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLQueryAction.java index 5ce2179d82..2fb90f324e 100644 --- a/plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/rest/RestPPLQueryAction.java +++ b/plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLQueryAction.java @@ -24,38 +24,14 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.plugin.rest; +package org.opensearch.sql.plugin.rest; -import static com.amazon.opendistroforelasticsearch.sql.protocol.response.format.JsonResponseFormatter.Style.PRETTY; import static org.opensearch.rest.RestStatus.BAD_REQUEST; import static org.opensearch.rest.RestStatus.INTERNAL_SERVER_ERROR; import static org.opensearch.rest.RestStatus.OK; import static org.opensearch.rest.RestStatus.SERVICE_UNAVAILABLE; +import static org.opensearch.sql.protocol.response.format.JsonResponseFormatter.Style.PRETTY; -import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxCheckException; -import com.amazon.opendistroforelasticsearch.sql.common.response.ResponseListener; -import com.amazon.opendistroforelasticsearch.sql.common.setting.Settings; -import com.amazon.opendistroforelasticsearch.sql.common.utils.LogUtils; -import com.amazon.opendistroforelasticsearch.sql.exception.ExpressionEvaluationException; -import com.amazon.opendistroforelasticsearch.sql.exception.QueryEngineException; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.ExplainResponse; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.QueryResponse; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.MetricName; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.error.ErrorMessageFactory; -import com.amazon.opendistroforelasticsearch.sql.opensearch.security.SecurityAccess; -import com.amazon.opendistroforelasticsearch.sql.plugin.request.PPLQueryRequestFactory; -import com.amazon.opendistroforelasticsearch.sql.ppl.PPLService; -import com.amazon.opendistroforelasticsearch.sql.ppl.config.PPLServiceConfig; -import com.amazon.opendistroforelasticsearch.sql.ppl.domain.PPLQueryRequest; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.QueryResult; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.CsvResponseFormatter; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.Format; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.JsonResponseFormatter; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.RawResponseFormatter; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.ResponseFormatter; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.SimpleJsonResponseFormatter; import java.io.IOException; import java.security.PrivilegedExceptionAction; import java.util.Arrays; @@ -74,6 +50,30 @@ import org.opensearch.rest.RestController; import org.opensearch.rest.RestRequest; import org.opensearch.rest.RestStatus; +import org.opensearch.sql.common.antlr.SyntaxCheckException; +import org.opensearch.sql.common.response.ResponseListener; +import org.opensearch.sql.common.setting.Settings; +import org.opensearch.sql.common.utils.LogUtils; +import org.opensearch.sql.exception.ExpressionEvaluationException; +import org.opensearch.sql.exception.QueryEngineException; +import org.opensearch.sql.exception.SemanticCheckException; +import org.opensearch.sql.executor.ExecutionEngine.ExplainResponse; +import org.opensearch.sql.executor.ExecutionEngine.QueryResponse; +import org.opensearch.sql.legacy.metrics.MetricName; +import org.opensearch.sql.legacy.metrics.Metrics; +import org.opensearch.sql.opensearch.response.error.ErrorMessageFactory; +import org.opensearch.sql.opensearch.security.SecurityAccess; +import org.opensearch.sql.plugin.request.PPLQueryRequestFactory; +import org.opensearch.sql.ppl.PPLService; +import org.opensearch.sql.ppl.config.PPLServiceConfig; +import org.opensearch.sql.ppl.domain.PPLQueryRequest; +import org.opensearch.sql.protocol.response.QueryResult; +import org.opensearch.sql.protocol.response.format.CsvResponseFormatter; +import org.opensearch.sql.protocol.response.format.Format; +import org.opensearch.sql.protocol.response.format.JsonResponseFormatter; +import org.opensearch.sql.protocol.response.format.RawResponseFormatter; +import org.opensearch.sql.protocol.response.format.ResponseFormatter; +import org.opensearch.sql.protocol.response.format.SimpleJsonResponseFormatter; import org.springframework.context.annotation.AnnotationConfigApplicationContext; public class RestPPLQueryAction extends BaseRestHandler { diff --git a/plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/rest/RestPPLStatsAction.java b/plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLStatsAction.java similarity index 91% rename from plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/rest/RestPPLStatsAction.java rename to plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLStatsAction.java index 98ae42bd3e..ef34b9a86c 100644 --- a/plugin/src/main/java/com/amazon/opendistroforelasticsearch/sql/plugin/rest/RestPPLStatsAction.java +++ b/plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLStatsAction.java @@ -26,13 +26,10 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.plugin.rest; +package org.opensearch.sql.plugin.rest; import static org.opensearch.rest.RestStatus.SERVICE_UNAVAILABLE; -import com.amazon.opendistroforelasticsearch.sql.legacy.executor.format.ErrorMessageFactory; -import com.amazon.opendistroforelasticsearch.sql.legacy.metrics.Metrics; -import com.amazon.opendistroforelasticsearch.sql.legacy.utils.LogUtils; import com.google.common.collect.ImmutableList; import java.util.Arrays; import java.util.HashSet; @@ -47,6 +44,9 @@ import org.opensearch.rest.RestController; import org.opensearch.rest.RestRequest; import org.opensearch.rest.RestStatus; +import org.opensearch.sql.legacy.executor.format.ErrorMessageFactory; +import org.opensearch.sql.legacy.metrics.Metrics; +import org.opensearch.sql.legacy.utils.LogUtils; /** * PPL Node level status. diff --git a/ppl/build.gradle b/ppl/build.gradle index 6f740cc110..d9c5e20616 100644 --- a/ppl/build.gradle +++ b/ppl/build.gradle @@ -36,9 +36,9 @@ plugins { } generateGrammarSource { - arguments += ['-visitor', '-package', 'com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser'] + arguments += ['-visitor', '-package', 'org.opensearch.sql.ppl.antlr.parser'] source = sourceSets.main.antlr - outputDirectory = file("build/generated-src/antlr/main/com/amazon/opendistroforelasticsearch/sql/ppl/antlr/parser") + outputDirectory = file("build/generated-src/antlr/main/org/opensearch/sql/ppl/antlr/parser") } configurations { @@ -108,4 +108,4 @@ jacocoTestCoverageVerification { })) } } -check.dependsOn jacocoTestCoverageVerification \ No newline at end of file +check.dependsOn jacocoTestCoverageVerification diff --git a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/PPLService.java b/ppl/src/main/java/org/opensearch/sql/ppl/PPLService.java similarity index 65% rename from ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/PPLService.java rename to ppl/src/main/java/org/opensearch/sql/ppl/PPLService.java index 3a312b1acf..b7c4bd3ec1 100644 --- a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/PPLService.java +++ b/ppl/src/main/java/org/opensearch/sql/ppl/PPLService.java @@ -24,34 +24,34 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; - -import static com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.QueryResponse; - -import com.amazon.opendistroforelasticsearch.sql.analysis.AnalysisContext; -import com.amazon.opendistroforelasticsearch.sql.analysis.Analyzer; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan; -import com.amazon.opendistroforelasticsearch.sql.common.response.ResponseListener; -import com.amazon.opendistroforelasticsearch.sql.common.utils.LogUtils; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.ExplainResponse; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.planner.Planner; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.LogicalPlanOptimizer; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.ppl.antlr.PPLSyntaxParser; -import com.amazon.opendistroforelasticsearch.sql.ppl.domain.PPLQueryRequest; -import com.amazon.opendistroforelasticsearch.sql.ppl.parser.AstBuilder; -import com.amazon.opendistroforelasticsearch.sql.ppl.parser.AstExpressionBuilder; -import com.amazon.opendistroforelasticsearch.sql.ppl.utils.PPLQueryDataAnonymizer; -import com.amazon.opendistroforelasticsearch.sql.ppl.utils.UnresolvedPlanHelper; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; +package org.opensearch.sql.ppl; + +import static org.opensearch.sql.executor.ExecutionEngine.QueryResponse; + import lombok.RequiredArgsConstructor; import org.antlr.v4.runtime.tree.ParseTree; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.opensearch.sql.analysis.AnalysisContext; +import org.opensearch.sql.analysis.Analyzer; +import org.opensearch.sql.ast.tree.UnresolvedPlan; +import org.opensearch.sql.common.response.ResponseListener; +import org.opensearch.sql.common.utils.LogUtils; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.executor.ExecutionEngine.ExplainResponse; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.planner.Planner; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.optimizer.LogicalPlanOptimizer; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.ppl.antlr.PPLSyntaxParser; +import org.opensearch.sql.ppl.domain.PPLQueryRequest; +import org.opensearch.sql.ppl.parser.AstBuilder; +import org.opensearch.sql.ppl.parser.AstExpressionBuilder; +import org.opensearch.sql.ppl.utils.PPLQueryDataAnonymizer; +import org.opensearch.sql.ppl.utils.UnresolvedPlanHelper; +import org.opensearch.sql.storage.StorageEngine; @RequiredArgsConstructor public class PPLService { diff --git a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/antlr/PPLSyntaxParser.java b/ppl/src/main/java/org/opensearch/sql/ppl/antlr/PPLSyntaxParser.java similarity index 79% rename from ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/antlr/PPLSyntaxParser.java rename to ppl/src/main/java/org/opensearch/sql/ppl/antlr/PPLSyntaxParser.java index 58b9b94840..9d635eaff1 100644 --- a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/antlr/PPLSyntaxParser.java +++ b/ppl/src/main/java/org/opensearch/sql/ppl/antlr/PPLSyntaxParser.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.antlr; +package org.opensearch.sql.ppl.antlr; -import com.amazon.opendistroforelasticsearch.sql.common.antlr.CaseInsensitiveCharStream; -import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxAnalysisErrorListener; -import com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLLexer; -import com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser; import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.tree.ParseTree; +import org.opensearch.sql.common.antlr.CaseInsensitiveCharStream; +import org.opensearch.sql.common.antlr.SyntaxAnalysisErrorListener; +import org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLLexer; +import org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser; /** * PPL Syntax Parser. diff --git a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/config/PPLServiceConfig.java b/ppl/src/main/java/org/opensearch/sql/ppl/config/PPLServiceConfig.java similarity index 71% rename from ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/config/PPLServiceConfig.java rename to ppl/src/main/java/org/opensearch/sql/ppl/config/PPLServiceConfig.java index 089711bd04..3068ff0668 100644 --- a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/config/PPLServiceConfig.java +++ b/ppl/src/main/java/org/opensearch/sql/ppl/config/PPLServiceConfig.java @@ -24,16 +24,16 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.config; +package org.opensearch.sql.ppl.config; -import com.amazon.opendistroforelasticsearch.sql.analysis.Analyzer; -import com.amazon.opendistroforelasticsearch.sql.analysis.ExpressionAnalyzer; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.ppl.PPLService; -import com.amazon.opendistroforelasticsearch.sql.ppl.antlr.PPLSyntaxParser; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; +import org.opensearch.sql.analysis.Analyzer; +import org.opensearch.sql.analysis.ExpressionAnalyzer; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.ppl.PPLService; +import org.opensearch.sql.ppl.antlr.PPLSyntaxParser; +import org.opensearch.sql.storage.StorageEngine; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/domain/PPLQueryRequest.java b/ppl/src/main/java/org/opensearch/sql/ppl/domain/PPLQueryRequest.java similarity index 94% rename from ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/domain/PPLQueryRequest.java rename to ppl/src/main/java/org/opensearch/sql/ppl/domain/PPLQueryRequest.java index ce10bf3ea7..f0de0d268f 100644 --- a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/domain/PPLQueryRequest.java +++ b/ppl/src/main/java/org/opensearch/sql/ppl/domain/PPLQueryRequest.java @@ -24,9 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.domain; +package org.opensearch.sql.ppl.domain; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.Format; import java.util.Locale; import java.util.Optional; import lombok.Getter; @@ -34,6 +33,7 @@ import lombok.Setter; import lombok.experimental.Accessors; import org.json.JSONObject; +import org.opensearch.sql.protocol.response.format.Format; @RequiredArgsConstructor public class PPLQueryRequest { diff --git a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/domain/PPLQueryResponse.java b/ppl/src/main/java/org/opensearch/sql/ppl/domain/PPLQueryResponse.java similarity index 93% rename from ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/domain/PPLQueryResponse.java rename to ppl/src/main/java/org/opensearch/sql/ppl/domain/PPLQueryResponse.java index 3696ef79a6..f0a7c7e558 100644 --- a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/domain/PPLQueryResponse.java +++ b/ppl/src/main/java/org/opensearch/sql/ppl/domain/PPLQueryResponse.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.domain; +package org.opensearch.sql.ppl.domain; public class PPLQueryResponse { } diff --git a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/parser/AstBuilder.java b/ppl/src/main/java/org/opensearch/sql/ppl/parser/AstBuilder.java similarity index 68% rename from ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/parser/AstBuilder.java rename to ppl/src/main/java/org/opensearch/sql/ppl/parser/AstBuilder.java index 4beaf4516f..fb812e738f 100644 --- a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/parser/AstBuilder.java +++ b/ppl/src/main/java/org/opensearch/sql/ppl/parser/AstBuilder.java @@ -24,47 +24,24 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.parser; +package org.opensearch.sql.ppl.parser; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.DedupCommandContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.EvalCommandContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.FieldsCommandContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.FromClauseContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.HeadCommandContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.PplStatementContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.RareCommandContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.RenameCommandContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.SearchFilterFromContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.SearchFromContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.SearchFromFilterContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.SortCommandContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.StatsCommandContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.TopCommandContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.WhereCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.DedupCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.EvalCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.FieldsCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.FromClauseContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.HeadCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.PplStatementContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.RareCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.RenameCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.SearchFilterFromContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.SearchFromContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.SearchFromFilterContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.SortCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.StatsCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.TopCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.WhereCommandContext; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Alias; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Field; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Let; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Map; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Aggregation; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Dedupe; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Eval; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Filter; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Head; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Project; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Relation; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Rename; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan; -import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils; -import com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser; -import com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.ByClauseContext; -import com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.FieldListContext; -import com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParserBaseVisitor; -import com.amazon.opendistroforelasticsearch.sql.ppl.utils.ArgumentFactory; import com.google.common.collect.ImmutableList; import java.util.Collections; import java.util.List; @@ -73,6 +50,29 @@ import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.tree.ParseTree; +import org.opensearch.sql.ast.expression.Alias; +import org.opensearch.sql.ast.expression.Field; +import org.opensearch.sql.ast.expression.Let; +import org.opensearch.sql.ast.expression.Map; +import org.opensearch.sql.ast.expression.UnresolvedExpression; +import org.opensearch.sql.ast.tree.Aggregation; +import org.opensearch.sql.ast.tree.Dedupe; +import org.opensearch.sql.ast.tree.Eval; +import org.opensearch.sql.ast.tree.Filter; +import org.opensearch.sql.ast.tree.Head; +import org.opensearch.sql.ast.tree.Project; +import org.opensearch.sql.ast.tree.RareTopN; +import org.opensearch.sql.ast.tree.RareTopN.CommandType; +import org.opensearch.sql.ast.tree.Relation; +import org.opensearch.sql.ast.tree.Rename; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.ast.tree.UnresolvedPlan; +import org.opensearch.sql.common.utils.StringUtils; +import org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser; +import org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.ByClauseContext; +import org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.FieldListContext; +import org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParserBaseVisitor; +import org.opensearch.sql.ppl.utils.ArgumentFactory; /** * Class of building the AST. diff --git a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/parser/AstExpressionBuilder.java b/ppl/src/main/java/org/opensearch/sql/ppl/parser/AstExpressionBuilder.java similarity index 60% rename from ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/parser/AstExpressionBuilder.java rename to ppl/src/main/java/org/opensearch/sql/ppl/parser/AstExpressionBuilder.java index be7f5e5483..f2b405d8d4 100644 --- a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/parser/AstExpressionBuilder.java +++ b/ppl/src/main/java/org/opensearch/sql/ppl/parser/AstExpressionBuilder.java @@ -24,58 +24,37 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.parser; - -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.IS_NOT_NULL; -import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.IS_NULL; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.BinaryArithmeticContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.BooleanFunctionCallContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.BooleanLiteralContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.CompareExprContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.CountAllFunctionCallContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.DecimalLiteralContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.EvalClauseContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.EvalFunctionCallContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.FieldExpressionContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.IdentsAsQualifiedNameContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.IdentsAsWildcardQualifiedNameContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.InExprContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.IntegerLiteralContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.IntervalLiteralContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.LogicalAndContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.LogicalNotContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.LogicalOrContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.LogicalXorContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.ParentheticBinaryArithmeticContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.PercentileAggFunctionContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.SortFieldContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.StatsFunctionCallContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.StringLiteralContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.TableSourceContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.WcFieldExpressionContext; - -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AggregateFunction; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AllFields; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.And; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Argument; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Compare; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.DataType; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Field; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Function; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.In; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Interval; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.IntervalUnit; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Let; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Literal; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Not; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Or; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.QualifiedName; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Xor; -import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils; -import com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParserBaseVisitor; -import com.amazon.opendistroforelasticsearch.sql.ppl.utils.ArgumentFactory; +package org.opensearch.sql.ppl.parser; + +import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName; +import static org.opensearch.sql.expression.function.BuiltinFunctionName.IS_NOT_NULL; +import static org.opensearch.sql.expression.function.BuiltinFunctionName.IS_NULL; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.BinaryArithmeticContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.BooleanFunctionCallContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.BooleanLiteralContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.CompareExprContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.CountAllFunctionCallContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.DecimalLiteralContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.EvalClauseContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.EvalFunctionCallContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.FieldExpressionContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.IdentsAsQualifiedNameContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.IdentsAsWildcardQualifiedNameContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.InExprContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.IntegerLiteralContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.IntervalLiteralContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.LogicalAndContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.LogicalNotContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.LogicalOrContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.LogicalXorContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.ParentheticBinaryArithmeticContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.PercentileAggFunctionContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.SortFieldContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.StatsFunctionCallContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.StringLiteralContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.TableSourceContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.WcFieldExpressionContext; + import com.google.common.collect.ImmutableMap; import java.util.Arrays; import java.util.Collections; @@ -84,6 +63,27 @@ import java.util.stream.Collectors; import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.RuleContext; +import org.opensearch.sql.ast.expression.AggregateFunction; +import org.opensearch.sql.ast.expression.AllFields; +import org.opensearch.sql.ast.expression.And; +import org.opensearch.sql.ast.expression.Argument; +import org.opensearch.sql.ast.expression.Compare; +import org.opensearch.sql.ast.expression.DataType; +import org.opensearch.sql.ast.expression.Field; +import org.opensearch.sql.ast.expression.Function; +import org.opensearch.sql.ast.expression.In; +import org.opensearch.sql.ast.expression.Interval; +import org.opensearch.sql.ast.expression.IntervalUnit; +import org.opensearch.sql.ast.expression.Let; +import org.opensearch.sql.ast.expression.Literal; +import org.opensearch.sql.ast.expression.Not; +import org.opensearch.sql.ast.expression.Or; +import org.opensearch.sql.ast.expression.QualifiedName; +import org.opensearch.sql.ast.expression.UnresolvedExpression; +import org.opensearch.sql.ast.expression.Xor; +import org.opensearch.sql.common.utils.StringUtils; +import org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParserBaseVisitor; +import org.opensearch.sql.ppl.utils.ArgumentFactory; /** * Class of building AST Expression nodes. diff --git a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/ArgumentFactory.java b/ppl/src/main/java/org/opensearch/sql/ppl/utils/ArgumentFactory.java similarity index 81% rename from ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/ArgumentFactory.java rename to ppl/src/main/java/org/opensearch/sql/ppl/utils/ArgumentFactory.java index 5b48f3c85c..e098e91631 100644 --- a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/ArgumentFactory.java +++ b/ppl/src/main/java/org/opensearch/sql/ppl/utils/ArgumentFactory.java @@ -24,25 +24,25 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.utils; +package org.opensearch.sql.ppl.utils; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.BooleanLiteralContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.DedupCommandContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.FieldsCommandContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.IntegerLiteralContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.RareCommandContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.SortFieldContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.StatsCommandContext; -import static com.amazon.opendistroforelasticsearch.sql.ppl.antlr.parser.OpenSearchPPLParser.TopCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.BooleanLiteralContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.DedupCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.FieldsCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.IntegerLiteralContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.RareCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.SortFieldContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.StatsCommandContext; +import static org.opensearch.sql.ppl.antlr.parser.OpenSearchPPLParser.TopCommandContext; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Argument; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.DataType; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Literal; -import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.antlr.v4.runtime.ParserRuleContext; +import org.opensearch.sql.ast.expression.Argument; +import org.opensearch.sql.ast.expression.DataType; +import org.opensearch.sql.ast.expression.Literal; +import org.opensearch.sql.common.utils.StringUtils; /** diff --git a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/PPLQueryDataAnonymizer.java b/ppl/src/main/java/org/opensearch/sql/ppl/utils/PPLQueryDataAnonymizer.java similarity index 79% rename from ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/PPLQueryDataAnonymizer.java rename to ppl/src/main/java/org/opensearch/sql/ppl/utils/PPLQueryDataAnonymizer.java index 2ef548e8f5..96633bc812 100644 --- a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/PPLQueryDataAnonymizer.java +++ b/ppl/src/main/java/org/opensearch/sql/ppl/utils/PPLQueryDataAnonymizer.java @@ -26,44 +26,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ppl.utils; - -import com.amazon.opendistroforelasticsearch.sql.ast.AbstractNodeVisitor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AggregateFunction; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Alias; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.And; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Argument; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Compare; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Field; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Function; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Interval; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Let; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Literal; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Map; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Not; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Or; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Xor; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Aggregation; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Dedupe; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Eval; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Filter; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Head; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Project; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Relation; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Rename; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan; -import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalAggregation; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalDedupe; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalEval; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalProject; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRareTopN; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRemove; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalRename; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalSort; +package org.opensearch.sql.ppl.utils; + import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -71,6 +35,42 @@ import java.util.stream.Collectors; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.sql.ast.AbstractNodeVisitor; +import org.opensearch.sql.ast.expression.AggregateFunction; +import org.opensearch.sql.ast.expression.Alias; +import org.opensearch.sql.ast.expression.And; +import org.opensearch.sql.ast.expression.Argument; +import org.opensearch.sql.ast.expression.Compare; +import org.opensearch.sql.ast.expression.Field; +import org.opensearch.sql.ast.expression.Function; +import org.opensearch.sql.ast.expression.Interval; +import org.opensearch.sql.ast.expression.Let; +import org.opensearch.sql.ast.expression.Literal; +import org.opensearch.sql.ast.expression.Map; +import org.opensearch.sql.ast.expression.Not; +import org.opensearch.sql.ast.expression.Or; +import org.opensearch.sql.ast.expression.UnresolvedExpression; +import org.opensearch.sql.ast.expression.Xor; +import org.opensearch.sql.ast.tree.Aggregation; +import org.opensearch.sql.ast.tree.Dedupe; +import org.opensearch.sql.ast.tree.Eval; +import org.opensearch.sql.ast.tree.Filter; +import org.opensearch.sql.ast.tree.Head; +import org.opensearch.sql.ast.tree.Project; +import org.opensearch.sql.ast.tree.RareTopN; +import org.opensearch.sql.ast.tree.Relation; +import org.opensearch.sql.ast.tree.Rename; +import org.opensearch.sql.ast.tree.Sort; +import org.opensearch.sql.ast.tree.UnresolvedPlan; +import org.opensearch.sql.common.utils.StringUtils; +import org.opensearch.sql.planner.logical.LogicalAggregation; +import org.opensearch.sql.planner.logical.LogicalDedupe; +import org.opensearch.sql.planner.logical.LogicalEval; +import org.opensearch.sql.planner.logical.LogicalProject; +import org.opensearch.sql.planner.logical.LogicalRareTopN; +import org.opensearch.sql.planner.logical.LogicalRemove; +import org.opensearch.sql.planner.logical.LogicalRename; +import org.opensearch.sql.planner.logical.LogicalSort; /** * Utility class to mask sensitive information in incoming PPL queries. diff --git a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/UnresolvedPlanHelper.java b/ppl/src/main/java/org/opensearch/sql/ppl/utils/UnresolvedPlanHelper.java similarity index 83% rename from ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/UnresolvedPlanHelper.java rename to ppl/src/main/java/org/opensearch/sql/ppl/utils/UnresolvedPlanHelper.java index e017fc2e39..6e1f26b323 100644 --- a/ppl/src/main/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/UnresolvedPlanHelper.java +++ b/ppl/src/main/java/org/opensearch/sql/ppl/utils/UnresolvedPlanHelper.java @@ -26,13 +26,13 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ppl.utils; +package org.opensearch.sql.ppl.utils; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AllFields; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Project; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan; import com.google.common.collect.ImmutableList; import lombok.experimental.UtilityClass; +import org.opensearch.sql.ast.expression.AllFields; +import org.opensearch.sql.ast.tree.Project; +import org.opensearch.sql.ast.tree.UnresolvedPlan; /** * The helper to add select to {@link UnresolvedPlan} if needed. diff --git a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/PPLServiceTest.java b/ppl/src/test/java/org/opensearch/sql/ppl/PPLServiceTest.java similarity index 85% rename from ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/PPLServiceTest.java rename to ppl/src/test/java/org/opensearch/sql/ppl/PPLServiceTest.java index eb1bc3a1a3..8918a044f7 100644 --- a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/PPLServiceTest.java +++ b/ppl/src/test/java/org/opensearch/sql/ppl/PPLServiceTest.java @@ -24,23 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl; +package org.opensearch.sql.ppl; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.common.response.ResponseListener; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.ExplainResponse; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.ExplainResponseNode; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.QueryResponse; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.ppl.config.PPLServiceConfig; -import com.amazon.opendistroforelasticsearch.sql.ppl.domain.PPLQueryRequest; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; -import com.amazon.opendistroforelasticsearch.sql.storage.Table; import com.google.common.collect.ImmutableMap; import java.util.Collections; import org.junit.Assert; @@ -49,6 +38,17 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; +import org.opensearch.sql.common.response.ResponseListener; +import org.opensearch.sql.data.type.ExprCoreType; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.executor.ExecutionEngine.ExplainResponse; +import org.opensearch.sql.executor.ExecutionEngine.ExplainResponseNode; +import org.opensearch.sql.executor.ExecutionEngine.QueryResponse; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.ppl.config.PPLServiceConfig; +import org.opensearch.sql.ppl.domain.PPLQueryRequest; +import org.opensearch.sql.storage.StorageEngine; +import org.opensearch.sql.storage.Table; import org.springframework.context.annotation.AnnotationConfigApplicationContext; @RunWith(MockitoJUnitRunner.class) @@ -199,4 +199,4 @@ public void onFailure(Exception e) { } }); } -} \ No newline at end of file +} diff --git a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/antlr/PPLSyntaxParserTest.java b/ppl/src/test/java/org/opensearch/sql/ppl/antlr/PPLSyntaxParserTest.java similarity index 98% rename from ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/antlr/PPLSyntaxParserTest.java rename to ppl/src/test/java/org/opensearch/sql/ppl/antlr/PPLSyntaxParserTest.java index 89ae294d79..e47c6d3910 100644 --- a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/antlr/PPLSyntaxParserTest.java +++ b/ppl/src/test/java/org/opensearch/sql/ppl/antlr/PPLSyntaxParserTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.antlr; +package org.opensearch.sql.ppl.antlr; import static org.junit.Assert.assertNotEquals; @@ -99,4 +99,4 @@ public void testTopCommandWithoutNAndGroupByShouldPass() { ParseTree tree = new PPLSyntaxParser().analyzeSyntax("source=t a=1 | top a by b"); assertNotEquals(null, tree); } -} \ No newline at end of file +} diff --git a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/config/PPLServiceConfigTest.java b/ppl/src/test/java/org/opensearch/sql/ppl/config/PPLServiceConfigTest.java similarity index 90% rename from ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/config/PPLServiceConfigTest.java rename to ppl/src/test/java/org/opensearch/sql/ppl/config/PPLServiceConfigTest.java index 4804c415fe..bba5168cda 100644 --- a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/config/PPLServiceConfigTest.java +++ b/ppl/src/test/java/org/opensearch/sql/ppl/config/PPLServiceConfigTest.java @@ -24,12 +24,12 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.config; +package org.opensearch.sql.ppl.config; import static org.junit.Assert.assertNotNull; -import com.amazon.opendistroforelasticsearch.sql.ppl.PPLService; import org.junit.Test; +import org.opensearch.sql.ppl.PPLService; public class PPLServiceConfigTest { @Test diff --git a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/domain/PPLQueryRequestTest.java b/ppl/src/test/java/org/opensearch/sql/ppl/domain/PPLQueryRequestTest.java similarity index 94% rename from ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/domain/PPLQueryRequestTest.java rename to ppl/src/test/java/org/opensearch/sql/ppl/domain/PPLQueryRequestTest.java index 24171a6dab..23c676fbed 100644 --- a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/domain/PPLQueryRequestTest.java +++ b/ppl/src/test/java/org/opensearch/sql/ppl/domain/PPLQueryRequestTest.java @@ -24,15 +24,15 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.domain; +package org.opensearch.sql.ppl.domain; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.Format; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.opensearch.sql.protocol.response.format.Format; public class PPLQueryRequestTest { diff --git a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/domain/PPLQueryResponseTest.java b/ppl/src/test/java/org/opensearch/sql/ppl/domain/PPLQueryResponseTest.java similarity index 94% rename from ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/domain/PPLQueryResponseTest.java rename to ppl/src/test/java/org/opensearch/sql/ppl/domain/PPLQueryResponseTest.java index 91c33ff3bd..3d823979b3 100644 --- a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/domain/PPLQueryResponseTest.java +++ b/ppl/src/test/java/org/opensearch/sql/ppl/domain/PPLQueryResponseTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.domain; +package org.opensearch.sql.ppl.domain; import org.junit.Test; diff --git a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/parser/AstBuilderTest.java b/ppl/src/test/java/org/opensearch/sql/ppl/parser/AstBuilderTest.java similarity index 82% rename from ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/parser/AstBuilderTest.java rename to ppl/src/test/java/org/opensearch/sql/ppl/parser/AstBuilderTest.java index cab3d2c7d9..38d28fe30a 100644 --- a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/parser/AstBuilderTest.java +++ b/ppl/src/test/java/org/opensearch/sql/ppl/parser/AstBuilderTest.java @@ -24,46 +24,46 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.parser; - -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.agg; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.aggregate; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.alias; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.argument; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.booleanLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.compare; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.dedupe; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.defaultDedupArgs; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.defaultFieldsArgs; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.defaultSortFieldArgs; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.defaultStatsArgs; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.eval; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.exprList; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.field; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.filter; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.function; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.head; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.intLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.let; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.map; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.nullLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.projectWithArg; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.rareTopN; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.relation; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.rename; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.sort; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.stringLiteral; +package org.opensearch.sql.ppl.parser; + import static java.util.Collections.emptyList; import static org.junit.Assert.assertEquals; +import static org.opensearch.sql.ast.dsl.AstDSL.agg; +import static org.opensearch.sql.ast.dsl.AstDSL.aggregate; +import static org.opensearch.sql.ast.dsl.AstDSL.alias; +import static org.opensearch.sql.ast.dsl.AstDSL.argument; +import static org.opensearch.sql.ast.dsl.AstDSL.booleanLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.compare; +import static org.opensearch.sql.ast.dsl.AstDSL.dedupe; +import static org.opensearch.sql.ast.dsl.AstDSL.defaultDedupArgs; +import static org.opensearch.sql.ast.dsl.AstDSL.defaultFieldsArgs; +import static org.opensearch.sql.ast.dsl.AstDSL.defaultSortFieldArgs; +import static org.opensearch.sql.ast.dsl.AstDSL.defaultStatsArgs; +import static org.opensearch.sql.ast.dsl.AstDSL.eval; +import static org.opensearch.sql.ast.dsl.AstDSL.exprList; +import static org.opensearch.sql.ast.dsl.AstDSL.field; +import static org.opensearch.sql.ast.dsl.AstDSL.filter; +import static org.opensearch.sql.ast.dsl.AstDSL.function; +import static org.opensearch.sql.ast.dsl.AstDSL.head; +import static org.opensearch.sql.ast.dsl.AstDSL.intLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.let; +import static org.opensearch.sql.ast.dsl.AstDSL.map; +import static org.opensearch.sql.ast.dsl.AstDSL.nullLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.projectWithArg; +import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName; +import static org.opensearch.sql.ast.dsl.AstDSL.rareTopN; +import static org.opensearch.sql.ast.dsl.AstDSL.relation; +import static org.opensearch.sql.ast.dsl.AstDSL.rename; +import static org.opensearch.sql.ast.dsl.AstDSL.sort; +import static org.opensearch.sql.ast.dsl.AstDSL.stringLiteral; -import com.amazon.opendistroforelasticsearch.sql.ast.Node; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.RareTopN.CommandType; -import com.amazon.opendistroforelasticsearch.sql.ppl.antlr.PPLSyntaxParser; import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.opensearch.sql.ast.Node; +import org.opensearch.sql.ast.tree.RareTopN.CommandType; +import org.opensearch.sql.ppl.antlr.PPLSyntaxParser; public class AstBuilderTest { diff --git a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/parser/AstExpressionBuilderTest.java b/ppl/src/test/java/org/opensearch/sql/ppl/parser/AstExpressionBuilderTest.java similarity index 81% rename from ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/parser/AstExpressionBuilderTest.java rename to ppl/src/test/java/org/opensearch/sql/ppl/parser/AstExpressionBuilderTest.java index 826c8db103..5cd6b4c4db 100644 --- a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/parser/AstExpressionBuilderTest.java +++ b/ppl/src/test/java/org/opensearch/sql/ppl/parser/AstExpressionBuilderTest.java @@ -24,44 +24,44 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.parser; - -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.agg; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.aggregate; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.alias; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.and; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.argument; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.booleanLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.compare; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.defaultFieldsArgs; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.defaultSortFieldArgs; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.defaultStatsArgs; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.doubleLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.equalTo; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.eval; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.exprList; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.field; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.filter; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.function; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.in; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.intLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.intervalLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.let; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.not; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.nullLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.or; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.projectWithArg; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.relation; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.sort; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.stringLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.xor; +package org.opensearch.sql.ppl.parser; + import static java.util.Collections.emptyList; +import static org.opensearch.sql.ast.dsl.AstDSL.agg; +import static org.opensearch.sql.ast.dsl.AstDSL.aggregate; +import static org.opensearch.sql.ast.dsl.AstDSL.alias; +import static org.opensearch.sql.ast.dsl.AstDSL.and; +import static org.opensearch.sql.ast.dsl.AstDSL.argument; +import static org.opensearch.sql.ast.dsl.AstDSL.booleanLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.compare; +import static org.opensearch.sql.ast.dsl.AstDSL.defaultFieldsArgs; +import static org.opensearch.sql.ast.dsl.AstDSL.defaultSortFieldArgs; +import static org.opensearch.sql.ast.dsl.AstDSL.defaultStatsArgs; +import static org.opensearch.sql.ast.dsl.AstDSL.doubleLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.equalTo; +import static org.opensearch.sql.ast.dsl.AstDSL.eval; +import static org.opensearch.sql.ast.dsl.AstDSL.exprList; +import static org.opensearch.sql.ast.dsl.AstDSL.field; +import static org.opensearch.sql.ast.dsl.AstDSL.filter; +import static org.opensearch.sql.ast.dsl.AstDSL.function; +import static org.opensearch.sql.ast.dsl.AstDSL.in; +import static org.opensearch.sql.ast.dsl.AstDSL.intLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.intervalLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.let; +import static org.opensearch.sql.ast.dsl.AstDSL.not; +import static org.opensearch.sql.ast.dsl.AstDSL.nullLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.or; +import static org.opensearch.sql.ast.dsl.AstDSL.projectWithArg; +import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName; +import static org.opensearch.sql.ast.dsl.AstDSL.relation; +import static org.opensearch.sql.ast.dsl.AstDSL.sort; +import static org.opensearch.sql.ast.dsl.AstDSL.stringLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.xor; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AllFields; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.DataType; import org.junit.Ignore; import org.junit.Test; +import org.opensearch.sql.ast.expression.AllFields; +import org.opensearch.sql.ast.expression.DataType; public class AstExpressionBuilderTest extends AstBuilderTest { diff --git a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/ArgumentFactoryTest.java b/ppl/src/test/java/org/opensearch/sql/ppl/utils/ArgumentFactoryTest.java similarity index 74% rename from ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/ArgumentFactoryTest.java rename to ppl/src/test/java/org/opensearch/sql/ppl/utils/ArgumentFactoryTest.java index ee869f89a3..4fef5ee849 100644 --- a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/ArgumentFactoryTest.java +++ b/ppl/src/test/java/org/opensearch/sql/ppl/utils/ArgumentFactoryTest.java @@ -24,25 +24,25 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.ppl.utils; +package org.opensearch.sql.ppl.utils; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.agg; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.aggregate; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.alias; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.argument; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.booleanLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.dedupe; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.exprList; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.field; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.intLiteral; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.projectWithArg; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.relation; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.sort; -import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.stringLiteral; import static java.util.Collections.emptyList; +import static org.opensearch.sql.ast.dsl.AstDSL.agg; +import static org.opensearch.sql.ast.dsl.AstDSL.aggregate; +import static org.opensearch.sql.ast.dsl.AstDSL.alias; +import static org.opensearch.sql.ast.dsl.AstDSL.argument; +import static org.opensearch.sql.ast.dsl.AstDSL.booleanLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.dedupe; +import static org.opensearch.sql.ast.dsl.AstDSL.exprList; +import static org.opensearch.sql.ast.dsl.AstDSL.field; +import static org.opensearch.sql.ast.dsl.AstDSL.intLiteral; +import static org.opensearch.sql.ast.dsl.AstDSL.projectWithArg; +import static org.opensearch.sql.ast.dsl.AstDSL.relation; +import static org.opensearch.sql.ast.dsl.AstDSL.sort; +import static org.opensearch.sql.ast.dsl.AstDSL.stringLiteral; -import com.amazon.opendistroforelasticsearch.sql.ppl.parser.AstBuilderTest; import org.junit.Test; +import org.opensearch.sql.ppl.parser.AstBuilderTest; public class ArgumentFactoryTest extends AstBuilderTest { diff --git a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/PPLQueryDataAnonymizerTest.java b/ppl/src/test/java/org/opensearch/sql/ppl/utils/PPLQueryDataAnonymizerTest.java similarity index 94% rename from ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/PPLQueryDataAnonymizerTest.java rename to ppl/src/test/java/org/opensearch/sql/ppl/utils/PPLQueryDataAnonymizerTest.java index 99a6fdc6ed..90c2232532 100644 --- a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/PPLQueryDataAnonymizerTest.java +++ b/ppl/src/test/java/org/opensearch/sql/ppl/utils/PPLQueryDataAnonymizerTest.java @@ -26,14 +26,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ppl.utils; +package org.opensearch.sql.ppl.utils; import static org.junit.Assert.assertEquals; -import com.amazon.opendistroforelasticsearch.sql.ppl.antlr.PPLSyntaxParser; -import com.amazon.opendistroforelasticsearch.sql.ppl.parser.AstBuilder; -import com.amazon.opendistroforelasticsearch.sql.ppl.parser.AstExpressionBuilder; import org.junit.Test; +import org.opensearch.sql.ppl.antlr.PPLSyntaxParser; +import org.opensearch.sql.ppl.parser.AstBuilder; +import org.opensearch.sql.ppl.parser.AstExpressionBuilder; public class PPLQueryDataAnonymizerTest { diff --git a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/UnresolvedPlanHelperTest.java b/ppl/src/test/java/org/opensearch/sql/ppl/utils/UnresolvedPlanHelperTest.java similarity index 84% rename from ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/UnresolvedPlanHelperTest.java rename to ppl/src/test/java/org/opensearch/sql/ppl/utils/UnresolvedPlanHelperTest.java index 1849e0d9bc..df3c21f3b3 100644 --- a/ppl/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/utils/UnresolvedPlanHelperTest.java +++ b/ppl/src/test/java/org/opensearch/sql/ppl/utils/UnresolvedPlanHelperTest.java @@ -26,16 +26,11 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.ppl.utils; +package org.opensearch.sql.ppl.utils; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.when; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AllFields; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Project; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Rename; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan; import java.util.Arrays; import junit.framework.TestCase; import org.hamcrest.Matchers; @@ -43,6 +38,11 @@ import org.junit.runner.RunWith; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; +import org.opensearch.sql.ast.expression.AllFields; +import org.opensearch.sql.ast.expression.UnresolvedExpression; +import org.opensearch.sql.ast.tree.Project; +import org.opensearch.sql.ast.tree.Rename; +import org.opensearch.sql.ast.tree.UnresolvedPlan; @RunWith(MockitoJUnitRunner.class) public class UnresolvedPlanHelperTest extends TestCase { @@ -76,4 +76,4 @@ public void dontAddProjectForProjectOperator() { assertTrue(plan instanceof Project); assertThat(((Project) plan).getProjectList(), Matchers.contains(expression)); } -} \ No newline at end of file +} diff --git a/protocol/build.gradle b/protocol/build.gradle index 59055e0279..7ae89bc93c 100644 --- a/protocol/build.gradle +++ b/protocol/build.gradle @@ -94,4 +94,4 @@ jacocoTestCoverageVerification { } } check.dependsOn jacocoTestCoverageVerification -jacocoTestCoverageVerification.dependsOn jacocoTestReport \ No newline at end of file +jacocoTestCoverageVerification.dependsOn jacocoTestReport diff --git a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/QueryResult.java b/protocol/src/main/java/org/opensearch/sql/protocol/response/QueryResult.java similarity index 87% rename from protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/QueryResult.java rename to protocol/src/main/java/org/opensearch/sql/protocol/response/QueryResult.java index 122adbc80b..af96410d86 100644 --- a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/QueryResult.java +++ b/protocol/src/main/java/org/opensearch/sql/protocol/response/QueryResult.java @@ -25,18 +25,18 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response; +package org.opensearch.sql.protocol.response; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValue; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.Schema.Column; import java.util.Collection; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.data.model.ExprValue; +import org.opensearch.sql.data.model.ExprValueUtils; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.executor.ExecutionEngine.Schema.Column; /** * Query response that encapsulates query results and isolate {@link ExprValue} diff --git a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/CsvResponseFormatter.java b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/CsvResponseFormatter.java similarity index 93% rename from protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/CsvResponseFormatter.java rename to protocol/src/main/java/org/opensearch/sql/protocol/response/format/CsvResponseFormatter.java index 81bd22f33c..483975e1e6 100644 --- a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/CsvResponseFormatter.java +++ b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/CsvResponseFormatter.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; +package org.opensearch.sql.protocol.response.format; public class CsvResponseFormatter extends FlatResponseFormatter { public CsvResponseFormatter() { diff --git a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/ErrorFormatter.java b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/ErrorFormatter.java similarity index 97% rename from protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/ErrorFormatter.java rename to protocol/src/main/java/org/opensearch/sql/protocol/response/format/ErrorFormatter.java index 1f304dbe5d..fc30b61339 100644 --- a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/ErrorFormatter.java +++ b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/ErrorFormatter.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; +package org.opensearch.sql.protocol.response.format; import com.google.gson.Gson; import com.google.gson.GsonBuilder; diff --git a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/FlatResponseFormatter.java b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/FlatResponseFormatter.java similarity index 97% rename from protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/FlatResponseFormatter.java rename to protocol/src/main/java/org/opensearch/sql/protocol/response/format/FlatResponseFormatter.java index ccf69d3216..280301fa11 100644 --- a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/FlatResponseFormatter.java +++ b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/FlatResponseFormatter.java @@ -24,9 +24,8 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; +package org.opensearch.sql.protocol.response.format; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.QueryResult; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import java.util.ArrayList; @@ -36,6 +35,7 @@ import java.util.stream.Collectors; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.opensearch.sql.protocol.response.QueryResult; @RequiredArgsConstructor public abstract class FlatResponseFormatter implements ResponseFormatter { diff --git a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/Format.java b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/Format.java similarity index 95% rename from protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/Format.java rename to protocol/src/main/java/org/opensearch/sql/protocol/response/format/Format.java index af65798e82..f18d8ef59a 100644 --- a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/Format.java +++ b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/Format.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; +package org.opensearch.sql.protocol.response.format; import com.google.common.base.Strings; import com.google.common.collect.ImmutableMap; diff --git a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/JdbcResponseFormatter.java b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/JdbcResponseFormatter.java similarity index 85% rename from protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/JdbcResponseFormatter.java rename to protocol/src/main/java/org/opensearch/sql/protocol/response/format/JdbcResponseFormatter.java index 3fd886c0ab..684aa8261f 100644 --- a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/JdbcResponseFormatter.java +++ b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/JdbcResponseFormatter.java @@ -25,20 +25,20 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; - -import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxCheckException; -import com.amazon.opendistroforelasticsearch.sql.data.type.ExprType; -import com.amazon.opendistroforelasticsearch.sql.exception.QueryEngineException; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.Schema; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.error.ErrorMessage; -import com.amazon.opendistroforelasticsearch.sql.opensearch.response.error.ErrorMessageFactory; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.QueryResult; +package org.opensearch.sql.protocol.response.format; + import java.util.List; import lombok.Builder; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Singular; +import org.opensearch.sql.common.antlr.SyntaxCheckException; +import org.opensearch.sql.data.type.ExprType; +import org.opensearch.sql.exception.QueryEngineException; +import org.opensearch.sql.executor.ExecutionEngine.Schema; +import org.opensearch.sql.opensearch.response.error.ErrorMessage; +import org.opensearch.sql.opensearch.response.error.ErrorMessageFactory; +import org.opensearch.sql.protocol.response.QueryResult; /** * JDBC formatter that formats both normal or error response exactly same way as legacy code to diff --git a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/JsonResponseFormatter.java b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/JsonResponseFormatter.java similarity index 77% rename from protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/JsonResponseFormatter.java rename to protocol/src/main/java/org/opensearch/sql/protocol/response/format/JsonResponseFormatter.java index b7965090c5..97215934bb 100644 --- a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/JsonResponseFormatter.java +++ b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/JsonResponseFormatter.java @@ -25,13 +25,13 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; +package org.opensearch.sql.protocol.response.format; -import static com.amazon.opendistroforelasticsearch.sql.protocol.response.format.ErrorFormatter.compactFormat; -import static com.amazon.opendistroforelasticsearch.sql.protocol.response.format.ErrorFormatter.compactJsonify; -import static com.amazon.opendistroforelasticsearch.sql.protocol.response.format.ErrorFormatter.prettyFormat; -import static com.amazon.opendistroforelasticsearch.sql.protocol.response.format.ErrorFormatter.prettyJsonify; -import static com.amazon.opendistroforelasticsearch.sql.protocol.response.format.JsonResponseFormatter.Style.PRETTY; +import static org.opensearch.sql.protocol.response.format.ErrorFormatter.compactFormat; +import static org.opensearch.sql.protocol.response.format.ErrorFormatter.compactJsonify; +import static org.opensearch.sql.protocol.response.format.ErrorFormatter.prettyFormat; +import static org.opensearch.sql.protocol.response.format.ErrorFormatter.prettyJsonify; +import static org.opensearch.sql.protocol.response.format.JsonResponseFormatter.Style.PRETTY; import java.security.AccessController; import java.security.PrivilegedAction; diff --git a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/RawResponseFormatter.java b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/RawResponseFormatter.java similarity index 93% rename from protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/RawResponseFormatter.java rename to protocol/src/main/java/org/opensearch/sql/protocol/response/format/RawResponseFormatter.java index cef420c3e6..a40b1c2694 100644 --- a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/RawResponseFormatter.java +++ b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/RawResponseFormatter.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; +package org.opensearch.sql.protocol.response.format; /** * Response formatter to format response to csv or raw format. diff --git a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/ResponseFormatter.java b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/ResponseFormatter.java similarity index 94% rename from protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/ResponseFormatter.java rename to protocol/src/main/java/org/opensearch/sql/protocol/response/format/ResponseFormatter.java index e454ab639c..137a2d541b 100644 --- a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/ResponseFormatter.java +++ b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/ResponseFormatter.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; +package org.opensearch.sql.protocol.response.format; /** * Response formatter to format response to different formats. diff --git a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/SimpleJsonResponseFormatter.java b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/SimpleJsonResponseFormatter.java similarity index 94% rename from protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/SimpleJsonResponseFormatter.java rename to protocol/src/main/java/org/opensearch/sql/protocol/response/format/SimpleJsonResponseFormatter.java index c8cf8ce67c..8217697b92 100644 --- a/protocol/src/main/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/SimpleJsonResponseFormatter.java +++ b/protocol/src/main/java/org/opensearch/sql/protocol/response/format/SimpleJsonResponseFormatter.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; +package org.opensearch.sql.protocol.response.format; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.QueryResult; import java.util.List; import lombok.Builder; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Singular; +import org.opensearch.sql.protocol.response.QueryResult; /** * JSON response format with schema header and data rows. For example, diff --git a/protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/QueryResultTest.java b/protocol/src/test/java/org/opensearch/sql/protocol/response/QueryResultTest.java similarity index 90% rename from protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/QueryResultTest.java rename to protocol/src/test/java/org/opensearch/sql/protocol/response/QueryResultTest.java index 1f5be2d014..613550c7a1 100644 --- a/protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/QueryResultTest.java +++ b/protocol/src/test/java/org/opensearch/sql/protocol/response/QueryResultTest.java @@ -25,21 +25,21 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response; +package org.opensearch.sql.protocol.response; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.tupleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; +import static org.opensearch.sql.data.model.ExprValueUtils.tupleValue; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.Arrays; import java.util.Collections; import org.junit.jupiter.api.Test; +import org.opensearch.sql.executor.ExecutionEngine; class QueryResultTest { @@ -136,4 +136,4 @@ void iterate() { } } -} \ No newline at end of file +} diff --git a/protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/CsvResponseFormatterTest.java b/protocol/src/test/java/org/opensearch/sql/protocol/response/format/CsvResponseFormatterTest.java similarity index 86% rename from protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/CsvResponseFormatterTest.java rename to protocol/src/test/java/org/opensearch/sql/protocol/response/format/CsvResponseFormatterTest.java index ce029cf6e7..8e6e305035 100644 --- a/protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/CsvResponseFormatterTest.java +++ b/protocol/src/test/java/org/opensearch/sql/protocol/response/format/CsvResponseFormatterTest.java @@ -24,23 +24,23 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; +package org.opensearch.sql.protocol.response.format; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.tupleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.data.model.ExprValueUtils.tupleValue; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.QueryResult; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.Arrays; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.protocol.response.QueryResult; /** * Unit test for {@link CsvResponseFormatter}. diff --git a/protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/FormatTest.java b/protocol/src/test/java/org/opensearch/sql/protocol/response/format/FormatTest.java similarity index 96% rename from protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/FormatTest.java rename to protocol/src/test/java/org/opensearch/sql/protocol/response/format/FormatTest.java index eb7f6098e2..85ae11d910 100644 --- a/protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/FormatTest.java +++ b/protocol/src/test/java/org/opensearch/sql/protocol/response/format/FormatTest.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; +package org.opensearch.sql.protocol.response.format; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; diff --git a/protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/JdbcResponseFormatterTest.java b/protocol/src/test/java/org/opensearch/sql/protocol/response/format/JdbcResponseFormatterTest.java similarity index 79% rename from protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/JdbcResponseFormatterTest.java rename to protocol/src/test/java/org/opensearch/sql/protocol/response/format/JdbcResponseFormatterTest.java index 4b18db2c76..64486ebfe1 100644 --- a/protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/JdbcResponseFormatterTest.java +++ b/protocol/src/test/java/org/opensearch/sql/protocol/response/format/JdbcResponseFormatterTest.java @@ -25,27 +25,23 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; - -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.tupleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.ARRAY; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRUCT; -import static com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.Schema; -import static com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.Schema.Column; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT; -import static com.amazon.opendistroforelasticsearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; -import static com.amazon.opendistroforelasticsearch.sql.protocol.response.format.JsonResponseFormatter.Style.COMPACT; +package org.opensearch.sql.protocol.response.format; + import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.data.model.ExprValueUtils.tupleValue; +import static org.opensearch.sql.data.type.ExprCoreType.ARRAY; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.data.type.ExprCoreType.STRUCT; +import static org.opensearch.sql.executor.ExecutionEngine.Schema; +import static org.opensearch.sql.executor.ExecutionEngine.Schema.Column; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT; +import static org.opensearch.sql.opensearch.data.type.OpenSearchDataType.OPENSEARCH_TEXT_KEYWORD; +import static org.opensearch.sql.protocol.response.format.JsonResponseFormatter.Style.COMPACT; -import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxCheckException; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.QueryResult; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.gson.JsonParser; @@ -54,6 +50,10 @@ import org.junit.jupiter.api.DisplayNameGenerator; import org.junit.jupiter.api.Test; import org.opensearch.OpenSearchException; +import org.opensearch.sql.common.antlr.SyntaxCheckException; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.exception.SemanticCheckException; +import org.opensearch.sql.protocol.response.QueryResult; @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class) class JdbcResponseFormatterTest { @@ -191,4 +191,4 @@ private static void assertJsonEquals(String expected, String actual) { JsonParser.parseString(actual)); } -} \ No newline at end of file +} diff --git a/protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/RawResponseFormatterTest.java b/protocol/src/test/java/org/opensearch/sql/protocol/response/format/RawResponseFormatterTest.java similarity index 88% rename from protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/RawResponseFormatterTest.java rename to protocol/src/test/java/org/opensearch/sql/protocol/response/format/RawResponseFormatterTest.java index 2498fa990a..e55a166a98 100644 --- a/protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/RawResponseFormatterTest.java +++ b/protocol/src/test/java/org/opensearch/sql/protocol/response/format/RawResponseFormatterTest.java @@ -24,23 +24,23 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; +package org.opensearch.sql.protocol.response.format; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_NULL; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.tupleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.data.model.ExprValueUtils.tupleValue; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.QueryResult; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.Arrays; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.protocol.response.QueryResult; /** * Unit test for {@link FlatResponseFormatter}. diff --git a/protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/SimpleJsonResponseFormatterTest.java b/protocol/src/test/java/org/opensearch/sql/protocol/response/format/SimpleJsonResponseFormatterTest.java similarity index 87% rename from protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/SimpleJsonResponseFormatterTest.java rename to protocol/src/test/java/org/opensearch/sql/protocol/response/format/SimpleJsonResponseFormatterTest.java index 5682de9486..29a4d60d9c 100644 --- a/protocol/src/test/java/com/amazon/opendistroforelasticsearch/sql/protocol/response/format/SimpleJsonResponseFormatterTest.java +++ b/protocol/src/test/java/org/opensearch/sql/protocol/response/format/SimpleJsonResponseFormatterTest.java @@ -25,24 +25,24 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.protocol.response.format; +package org.opensearch.sql.protocol.response.format; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.stringValue; -import static com.amazon.opendistroforelasticsearch.sql.data.model.ExprValueUtils.tupleValue; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.INTEGER; -import static com.amazon.opendistroforelasticsearch.sql.data.type.ExprCoreType.STRING; -import static com.amazon.opendistroforelasticsearch.sql.protocol.response.format.JsonResponseFormatter.Style.COMPACT; -import static com.amazon.opendistroforelasticsearch.sql.protocol.response.format.JsonResponseFormatter.Style.PRETTY; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_MISSING; +import static org.opensearch.sql.data.model.ExprValueUtils.stringValue; +import static org.opensearch.sql.data.model.ExprValueUtils.tupleValue; +import static org.opensearch.sql.data.type.ExprCoreType.INTEGER; +import static org.opensearch.sql.data.type.ExprCoreType.STRING; +import static org.opensearch.sql.protocol.response.format.JsonResponseFormatter.Style.COMPACT; +import static org.opensearch.sql.protocol.response.format.JsonResponseFormatter.Style.PRETTY; -import com.amazon.opendistroforelasticsearch.sql.data.model.ExprTupleValue; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.QueryResult; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.Arrays; import org.junit.jupiter.api.Test; +import org.opensearch.sql.data.model.ExprTupleValue; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.protocol.response.QueryResult; class SimpleJsonResponseFormatterTest { diff --git a/sql-jdbc/README.md b/sql-jdbc/README.md index f696010d5b..82397d1de5 100644 --- a/sql-jdbc/README.md +++ b/sql-jdbc/README.md @@ -62,7 +62,7 @@ To setup a connection, the driver requires a JDBC connection URL. The connection | logOutput | location where driver logs should be emitted | a valid file path | `null` (logs are disabled) | | logLevel | severity level for which driver logs should be emitted | in order from highest(least logging) to lowest(most logging): OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL | OFF (logs are disabled) | | auth | authentication mechanism to use | `NONE` (no auth), `BASIC` (HTTP Basic), `AWS_SIGV4` (AWS SIGV4) | `basic` if username and/or password is specified, `NONE` otherwise | - | awsCredentialsProvider | The AWS credential provider to be used when authentication mechanism is `AWS_SIGV4` (AWS SIGV4). If not set, the driver will use DefaultAWSCredentialsProviderChain to sign the request. Note that the driver renamed the namespaces of its dependencies, so the value has to be an instance of com.amazonaws.opendistro.opensearch.sql.jdbc.shadow.com.amazonaws.auth.AWSCredentialsProvider| Instance of an AWSCredentialProvider | DefaultAWSCredentialsProviderChain | + | awsCredentialsProvider | The AWS credential provider to be used when authentication mechanism is `AWS_SIGV4` (AWS SIGV4). If not set, the driver will use DefaultAWSCredentialsProviderChain to sign the request. Note that the driver renamed the namespaces of its dependencies, so the value has to be an instance of com.amazonaws.opensearch.sql.jdbc.shadow.com.amazonaws.auth.AWSCredentialsProvider| Instance of an AWSCredentialProvider | DefaultAWSCredentialsProviderChain | | region | if authentication type is `aws_sigv4`, then this is the region value to use when signing requests. Only needed if the driver can not determine the region for the host endpoint. The driver will detect the region if the host endpoint matches a known url pattern. | a valid AWS region value e.g. us-east-1 | `null` (auto-detected if possible from the host endpoint) | | requestCompression | whether to indicate acceptance of compressed (gzip) responses when making server requests | `true` or `false` | `false` | | useSSL | whether to establish the connection over SSL/TLS | `true` or `false` | `false` if scheme is `http`, `true` if scheme is `https` | @@ -77,7 +77,7 @@ To setup a connection, the driver requires a JDBC connection URL. The connection ### Connecting using the DriverManager interface -The main Driver class is `com.amazon.opendistroforelasticsearch.jdbc.Driver`. If the driver jar is on the application classpath, no other configuration is required. +The main Driver class is `org.opensearch.jdbc.Driver`. If the driver jar is on the application classpath, no other configuration is required. Code samples to open a connection for some typical scenarios are given below: @@ -321,7 +321,7 @@ con.close(); ``` ### Connecting using the DataSource interface -The driver also provides a javax.sql.DataSource implementation via the `com.amazon.opendistroforelasticsearch.jdbc.OpenSearchDataSource` class that can be used to obtain a connection. Here are some typical code samples: +The driver also provides a javax.sql.DataSource implementation via the `org.opensearch.jdbc.OpenSearchDataSource` class that can be used to obtain a connection. Here are some typical code samples: * Connect to localhost on port 9200 with no authentication over a plain connection @@ -331,7 +331,7 @@ import java.sql.Connection; import java.sql.Statement; import javax.sql.DataSource; -import com.amazon.opendistroforelasticsearch.jdbc.OpenSearchDataSource; +import org.opensearch.jdbc.OpenSearchDataSource; . . @@ -356,7 +356,7 @@ import java.sql.Connection; import java.sql.Statement; import javax.sql.DataSource; -import com.amazon.opendistroforelasticsearch.jdbc.OpenSearchDataSource; +import org.opensearch.jdbc.OpenSearchDataSource; . . @@ -381,7 +381,7 @@ import java.sql.Connection; import java.sql.Statement; import javax.sql.DataSource; -import com.amazon.opendistroforelasticsearch.jdbc.OpenSearchDataSource; +import org.opensearch.jdbc.OpenSearchDataSource; . . @@ -407,7 +407,7 @@ import java.sql.Connection; import java.sql.Statement; import javax.sql.DataSource; -import com.amazon.opendistroforelasticsearch.jdbc.OpenSearchDataSource; +import org.opensearch.jdbc.OpenSearchDataSource; . . @@ -432,7 +432,7 @@ import java.sql.Connection; import java.sql.Statement; import javax.sql.DataSource; -import com.amazon.opendistroforelasticsearch.jdbc.OpenSearchDataSource; +import org.opensearch.jdbc.OpenSearchDataSource; . . @@ -458,7 +458,7 @@ import java.sql.Connection; import java.sql.Statement; import javax.sql.DataSource; -import com.amazon.opendistroforelasticsearch.jdbc.OpenSearchDataSource; +import org.opensearch.jdbc.OpenSearchDataSource; . . diff --git a/sql-jdbc/build.gradle b/sql-jdbc/build.gradle index 585d44a3d6..49b160c975 100644 --- a/sql-jdbc/build.gradle +++ b/sql-jdbc/build.gradle @@ -40,7 +40,7 @@ plugins { id 'signing' } -group 'com.amazon.opendistroforelasticsearch.client' +group 'org.opensearch.client' // keep version in sync with version in Driver source version '1.0.0.0-beta1' @@ -82,7 +82,7 @@ tasks.withType(JavaCompile) { } static def getShadowPath(String path) { - return 'com.amazonaws.opendistro.opensearch.sql.jdbc.shadow.' + path + return 'com.amazonaws.opensearch.sql.jdbc.shadow.' + path } shadowJar { @@ -101,7 +101,7 @@ shadowJar { exclude 'META-INF/DEPENDENCIES' relocate('com.amazonaws', getShadowPath('com.amazonaws')) { - exclude 'com.amazonaws.opendistro.*/**' + exclude 'com.amazonaws.opensearch.*/**' } relocate 'org.apache', getShadowPath('org.apache') @@ -132,10 +132,10 @@ publishing { artifact javadocJar pom { - name = "Open Distro For Elasticsearch SQL JDBC Driver" + name = "OpenSearch SQL JDBC Driver" packaging = "jar" url = "https://github.com/opendistro-for-elasticsearch/sql-jdbc" - description = "Open Distro For Elasticsearch SQL JDBC driver" + description = "OpenSearch SQL JDBC driver" scm { connection = "scm:git@github.com:opendistro-for-elasticsearch/sql-jdbc.git" developerConnection = "scm:git@github.com:opendistro-for-elasticsearch/sql-jdbc.git" diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/ConnectionImpl.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/ConnectionImpl.java similarity index 93% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/ConnectionImpl.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/ConnectionImpl.java index 50988fd6a5..76ea5eac56 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/ConnectionImpl.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/ConnectionImpl.java @@ -25,24 +25,24 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.internal.JdbcWrapper; -import com.amazon.opendistroforelasticsearch.jdbc.internal.Version; -import com.amazon.opendistroforelasticsearch.jdbc.internal.util.JavaUtil; -import com.amazon.opendistroforelasticsearch.jdbc.logging.Logger; -import com.amazon.opendistroforelasticsearch.jdbc.logging.LoggingSource; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ClusterMetadata; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ConnectionResponse; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.Protocol; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ProtocolFactory; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.ResponseException; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.JsonHttpProtocolFactory; -import com.amazon.opendistroforelasticsearch.jdbc.transport.Transport; -import com.amazon.opendistroforelasticsearch.jdbc.transport.TransportException; -import com.amazon.opendistroforelasticsearch.jdbc.transport.TransportFactory; -import com.amazon.opendistroforelasticsearch.jdbc.transport.http.ApacheHttpTransportFactory; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.internal.JdbcWrapper; +import org.opensearch.jdbc.internal.Version; +import org.opensearch.jdbc.internal.util.JavaUtil; +import org.opensearch.jdbc.logging.Logger; +import org.opensearch.jdbc.logging.LoggingSource; +import org.opensearch.jdbc.protocol.ClusterMetadata; +import org.opensearch.jdbc.protocol.ConnectionResponse; +import org.opensearch.jdbc.protocol.Protocol; +import org.opensearch.jdbc.protocol.ProtocolFactory; +import org.opensearch.jdbc.protocol.exceptions.ResponseException; +import org.opensearch.jdbc.protocol.http.JsonHttpProtocolFactory; +import org.opensearch.jdbc.transport.Transport; +import org.opensearch.jdbc.transport.TransportException; +import org.opensearch.jdbc.transport.TransportFactory; +import org.opensearch.jdbc.transport.http.ApacheHttpTransportFactory; import java.io.IOException; import java.sql.Array; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/DatabaseMetaDataImpl.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/DatabaseMetaDataImpl.java similarity index 98% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/DatabaseMetaDataImpl.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/DatabaseMetaDataImpl.java index da7e643d9d..c520b5db72 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/DatabaseMetaDataImpl.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/DatabaseMetaDataImpl.java @@ -25,15 +25,15 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.internal.JdbcWrapper; -import com.amazon.opendistroforelasticsearch.jdbc.internal.Version; -import com.amazon.opendistroforelasticsearch.jdbc.logging.LoggingSource; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ColumnDescriptor; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryResponse; -import com.amazon.opendistroforelasticsearch.jdbc.types.OpenSearchType; -import com.amazon.opendistroforelasticsearch.jdbc.logging.Logger; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.internal.JdbcWrapper; +import org.opensearch.jdbc.internal.Version; +import org.opensearch.jdbc.logging.LoggingSource; +import org.opensearch.jdbc.protocol.ColumnDescriptor; +import org.opensearch.jdbc.protocol.QueryResponse; +import org.opensearch.jdbc.types.OpenSearchType; +import org.opensearch.jdbc.logging.Logger; import java.sql.Connection; import java.sql.DatabaseMetaData; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/Driver.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/Driver.java similarity index 83% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/Driver.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/Driver.java index 5f2a0da188..2e2f37ac33 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/Driver.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/Driver.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; +package org.opensearch.jdbc; -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.internal.util.UrlParser; -import com.amazon.opendistroforelasticsearch.jdbc.logging.LoggingSource; -import com.amazon.opendistroforelasticsearch.jdbc.internal.Version; -import com.amazon.opendistroforelasticsearch.jdbc.logging.LoggerFactory; -import com.amazon.opendistroforelasticsearch.jdbc.logging.NoOpLogger; +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.internal.util.UrlParser; +import org.opensearch.jdbc.logging.LoggingSource; +import org.opensearch.jdbc.internal.Version; +import org.opensearch.jdbc.logging.LoggerFactory; +import org.opensearch.jdbc.logging.NoOpLogger; import java.sql.Connection; import java.sql.DriverManager; @@ -61,7 +61,7 @@ public Connection connect(String url, Properties info) throws SQLException { .setUrl(url) .setProperties(info) .build(); - com.amazon.opendistroforelasticsearch.jdbc.logging.Logger log = initLog(connectionConfig); + org.opensearch.jdbc.logging.Logger log = initLog(connectionConfig); log.debug(() -> logMessage("connect (%s, %s)", url, info == null ? "null" : info.toString())); log.debug(() -> logMessage("Opening connection using config: %s", connectionConfig)); return new ConnectionImpl(connectionConfig, log); @@ -98,7 +98,7 @@ public Logger getParentLogger() throws SQLFeatureNotSupportedException { throw new SQLFeatureNotSupportedException(); } - static com.amazon.opendistroforelasticsearch.jdbc.logging.Logger initLog(ConnectionConfig connectionConfig) { + static org.opensearch.jdbc.logging.Logger initLog(ConnectionConfig connectionConfig) { // precedence: // 1. explicitly supplied logWriter // 2. logOutput property diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/OpenSearchConnection.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/OpenSearchConnection.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/OpenSearchConnection.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/OpenSearchConnection.java index 1a5826ad9f..3fbd31a3b9 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/OpenSearchConnection.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/OpenSearchConnection.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; +package org.opensearch.jdbc; import java.sql.SQLException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/OpenSearchDataSource.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/OpenSearchDataSource.java similarity index 89% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/OpenSearchDataSource.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/OpenSearchDataSource.java index 26378748e1..5dbf98aa6d 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/OpenSearchDataSource.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/OpenSearchDataSource.java @@ -25,16 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.config.AwsCredentialsProviderProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.config.LoginTimeoutConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.PasswordConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.UserConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.internal.JdbcWrapper; -import com.amazon.opendistroforelasticsearch.jdbc.internal.util.UrlParser; -import com.amazon.opendistroforelasticsearch.jdbc.logging.LoggingSource; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.config.AwsCredentialsProviderProperty; +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.config.LoginTimeoutConnectionProperty; +import org.opensearch.jdbc.config.PasswordConnectionProperty; +import org.opensearch.jdbc.config.UserConnectionProperty; +import org.opensearch.jdbc.internal.JdbcWrapper; +import org.opensearch.jdbc.internal.util.UrlParser; +import org.opensearch.jdbc.logging.LoggingSource; import com.amazonaws.auth.AWSCredentialsProvider; import javax.sql.DataSource; @@ -181,7 +181,7 @@ private Object getConnectionProperty(String key, Object defaultValue) { private Connection getConnection(Map overrideProperties) throws SQLException { ConnectionConfig connectionConfig = getConnectionConfig(overrideProperties); - com.amazon.opendistroforelasticsearch.jdbc.logging.Logger log = Driver.initLog(connectionConfig); + org.opensearch.jdbc.logging.Logger log = Driver.initLog(connectionConfig); log.debug(() -> logMessage("Opening connection using config: %s", connectionConfig)); return new ConnectionImpl(connectionConfig, log); } diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/OpenSearchVersion.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/OpenSearchVersion.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/OpenSearchVersion.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/OpenSearchVersion.java index ebfa4437d1..51659d96ae 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/OpenSearchVersion.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/OpenSearchVersion.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; +package org.opensearch.jdbc; public interface OpenSearchVersion { int getMajor(); diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/PreparedStatementImpl.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/PreparedStatementImpl.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/PreparedStatementImpl.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/PreparedStatementImpl.java index 9012c3d5f1..051db5ecfb 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/PreparedStatementImpl.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/PreparedStatementImpl.java @@ -25,15 +25,15 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.protocol.JdbcQueryRequest; -import com.amazon.opendistroforelasticsearch.jdbc.types.OpenSearchType; -import com.amazon.opendistroforelasticsearch.jdbc.types.TypeConverters; -import com.amazon.opendistroforelasticsearch.jdbc.internal.util.SqlParser; -import com.amazon.opendistroforelasticsearch.jdbc.logging.Logger; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.JdbcDateTimeFormatter; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.JdbcQueryParam; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.protocol.JdbcQueryRequest; +import org.opensearch.jdbc.types.OpenSearchType; +import org.opensearch.jdbc.types.TypeConverters; +import org.opensearch.jdbc.internal.util.SqlParser; +import org.opensearch.jdbc.logging.Logger; +import org.opensearch.jdbc.protocol.JdbcDateTimeFormatter; +import org.opensearch.jdbc.protocol.JdbcQueryParam; import java.io.InputStream; import java.io.Reader; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetImpl.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/ResultSetImpl.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetImpl.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/ResultSetImpl.java index 8184a9c2fe..488c897ea2 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetImpl.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/ResultSetImpl.java @@ -25,27 +25,27 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.internal.results.ColumnMetaData; -import com.amazon.opendistroforelasticsearch.jdbc.internal.results.Cursor; -import com.amazon.opendistroforelasticsearch.jdbc.internal.exceptions.ObjectClosedException; -import com.amazon.opendistroforelasticsearch.jdbc.internal.results.Row; -import com.amazon.opendistroforelasticsearch.jdbc.internal.results.Schema; -import com.amazon.opendistroforelasticsearch.jdbc.logging.LoggingSource; -import com.amazon.opendistroforelasticsearch.jdbc.logging.Logger; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ColumnDescriptor; -import com.amazon.opendistroforelasticsearch.jdbc.internal.JdbcWrapper; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryResponse; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.InternalServerErrorException; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.ResponseException; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.JdbcCursorQueryRequest; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.JsonCursorHttpProtocol; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.JsonCursorHttpProtocolFactory; -import com.amazon.opendistroforelasticsearch.jdbc.transport.http.HttpTransport; -import com.amazon.opendistroforelasticsearch.jdbc.types.TypeConverter; -import com.amazon.opendistroforelasticsearch.jdbc.types.TypeConverters; -import com.amazon.opendistroforelasticsearch.jdbc.types.UnrecognizedOpenSearchTypeException; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.internal.results.ColumnMetaData; +import org.opensearch.jdbc.internal.results.Cursor; +import org.opensearch.jdbc.internal.exceptions.ObjectClosedException; +import org.opensearch.jdbc.internal.results.Row; +import org.opensearch.jdbc.internal.results.Schema; +import org.opensearch.jdbc.logging.LoggingSource; +import org.opensearch.jdbc.logging.Logger; +import org.opensearch.jdbc.protocol.ColumnDescriptor; +import org.opensearch.jdbc.internal.JdbcWrapper; +import org.opensearch.jdbc.protocol.QueryResponse; +import org.opensearch.jdbc.protocol.exceptions.InternalServerErrorException; +import org.opensearch.jdbc.protocol.exceptions.ResponseException; +import org.opensearch.jdbc.protocol.http.JdbcCursorQueryRequest; +import org.opensearch.jdbc.protocol.http.JsonCursorHttpProtocol; +import org.opensearch.jdbc.protocol.http.JsonCursorHttpProtocolFactory; +import org.opensearch.jdbc.transport.http.HttpTransport; +import org.opensearch.jdbc.types.TypeConverter; +import org.opensearch.jdbc.types.TypeConverters; +import org.opensearch.jdbc.types.UnrecognizedOpenSearchTypeException; import java.io.IOException; import java.io.InputStream; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetMetaDataImpl.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/ResultSetMetaDataImpl.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetMetaDataImpl.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/ResultSetMetaDataImpl.java index 7a62ec3f90..5b659ca58d 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetMetaDataImpl.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/ResultSetMetaDataImpl.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; +package org.opensearch.jdbc; -import com.amazon.opendistroforelasticsearch.jdbc.internal.JdbcWrapper; -import com.amazon.opendistroforelasticsearch.jdbc.internal.results.Schema; +import org.opensearch.jdbc.internal.JdbcWrapper; +import org.opensearch.jdbc.internal.results.Schema; import java.sql.ResultSetMetaData; import java.sql.SQLException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/StatementImpl.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/StatementImpl.java similarity index 93% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/StatementImpl.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/StatementImpl.java index c09b4f0515..26ed342931 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/StatementImpl.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/StatementImpl.java @@ -25,16 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.internal.exceptions.ObjectClosedException; -import com.amazon.opendistroforelasticsearch.jdbc.logging.LoggingSource; -import com.amazon.opendistroforelasticsearch.jdbc.logging.Logger; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.JdbcQueryRequest; -import com.amazon.opendistroforelasticsearch.jdbc.internal.JdbcWrapper; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.InternalServerErrorException; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryResponse; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.ResponseException; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.internal.exceptions.ObjectClosedException; +import org.opensearch.jdbc.logging.LoggingSource; +import org.opensearch.jdbc.logging.Logger; +import org.opensearch.jdbc.protocol.JdbcQueryRequest; +import org.opensearch.jdbc.internal.JdbcWrapper; +import org.opensearch.jdbc.protocol.exceptions.InternalServerErrorException; +import org.opensearch.jdbc.protocol.QueryResponse; +import org.opensearch.jdbc.protocol.exceptions.ResponseException; import java.io.IOException; import java.sql.Connection; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/auth/AuthenticationType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/auth/AuthenticationType.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/auth/AuthenticationType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/auth/AuthenticationType.java index 91a0fe1baf..f562aa5050 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/auth/AuthenticationType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/auth/AuthenticationType.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.auth; +package org.opensearch.jdbc.auth; /** * Enum representing supported authentication methods diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/AuthConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/AuthConnectionProperty.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/AuthConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/AuthConnectionProperty.java index bd4f4dcab1..79cf8a2a84 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/AuthConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/AuthConnectionProperty.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; -import com.amazon.opendistroforelasticsearch.jdbc.auth.AuthenticationType; +import org.opensearch.jdbc.auth.AuthenticationType; import java.util.Locale; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/AwsCredentialsProviderProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/AwsCredentialsProviderProperty.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/AwsCredentialsProviderProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/AwsCredentialsProviderProperty.java index d2bcd583a1..bf7035fe70 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/AwsCredentialsProviderProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/AwsCredentialsProviderProperty.java @@ -9,7 +9,7 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.auth.DefaultAWSCredentialsProviderChain; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/BoolConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/BoolConnectionProperty.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/BoolConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/BoolConnectionProperty.java index 7ad0cd87a7..d13cb88384 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/BoolConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/BoolConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class BoolConnectionProperty extends ConnectionProperty { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/ConnectionConfig.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/ConnectionConfig.java similarity index 98% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/ConnectionConfig.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/ConnectionConfig.java index 7cca84f498..d2170448ea 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/ConnectionConfig.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/ConnectionConfig.java @@ -25,12 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; -import com.amazon.opendistroforelasticsearch.jdbc.auth.AuthenticationType; -import com.amazon.opendistroforelasticsearch.jdbc.logging.LogLevel; -import com.amazon.opendistroforelasticsearch.jdbc.internal.util.AwsHostNameUtil; -import com.amazon.opendistroforelasticsearch.jdbc.internal.util.UrlParser; +import org.opensearch.jdbc.auth.AuthenticationType; +import org.opensearch.jdbc.logging.LogLevel; +import org.opensearch.jdbc.internal.util.AwsHostNameUtil; +import org.opensearch.jdbc.internal.util.UrlParser; import com.amazonaws.auth.AWSCredentialsProvider; import java.io.PrintWriter; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/ConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/ConnectionProperty.java similarity index 99% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/ConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/ConnectionProperty.java index e272850004..82d45c6972 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/ConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/ConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; /** * Represents a Connection configuration property. diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/ConnectionPropertyException.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/ConnectionPropertyException.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/ConnectionPropertyException.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/ConnectionPropertyException.java index 8c2570a01b..ed3c69e1b7 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/ConnectionPropertyException.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/ConnectionPropertyException.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; import java.sql.SQLException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/FetchSizeProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/FetchSizeProperty.java similarity index 88% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/FetchSizeProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/FetchSizeProperty.java index 23d85e9944..cef5c18c26 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/FetchSizeProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/FetchSizeProperty.java @@ -9,7 +9,7 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class FetchSizeProperty extends IntConnectionProperty { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/HostConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/HostConnectionProperty.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/HostConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/HostConnectionProperty.java index eb8ac6212a..49f82d0167 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/HostConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/HostConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class HostConnectionProperty extends StringConnectionProperty { public static final String KEY = "host"; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/HostnameVerificationConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/HostnameVerificationConnectionProperty.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/HostnameVerificationConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/HostnameVerificationConnectionProperty.java index 800c78ca54..ec6f1ad76d 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/HostnameVerificationConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/HostnameVerificationConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class HostnameVerificationConnectionProperty extends BoolConnectionProperty { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/IntConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/IntConnectionProperty.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/IntConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/IntConnectionProperty.java index 66c2f89a15..d89f52890b 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/IntConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/IntConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class IntConnectionProperty extends ConnectionProperty { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/KeyStoreLocationConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/KeyStoreLocationConnectionProperty.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/KeyStoreLocationConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/KeyStoreLocationConnectionProperty.java index ed372d4c56..f9a49891c5 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/KeyStoreLocationConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/KeyStoreLocationConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class KeyStoreLocationConnectionProperty extends StringConnectionProperty { public static final String KEY = "keyStoreLocation"; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/KeyStorePasswordConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/KeyStorePasswordConnectionProperty.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/KeyStorePasswordConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/KeyStorePasswordConnectionProperty.java index e635070e8f..e058f0b53e 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/KeyStorePasswordConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/KeyStorePasswordConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class KeyStorePasswordConnectionProperty extends StringConnectionProperty { public static final String KEY = "keyStorePassword"; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/KeyStoreTypeConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/KeyStoreTypeConnectionProperty.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/KeyStoreTypeConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/KeyStoreTypeConnectionProperty.java index 2f7bf8126e..c9058fff33 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/KeyStoreTypeConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/KeyStoreTypeConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class KeyStoreTypeConnectionProperty extends StringConnectionProperty { public static final String KEY = "keyStoreType"; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/LogLevelConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/LogLevelConnectionProperty.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/LogLevelConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/LogLevelConnectionProperty.java index 18fe00b6d9..73f117f25d 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/LogLevelConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/LogLevelConnectionProperty.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; -import com.amazon.opendistroforelasticsearch.jdbc.logging.LogLevel; +import org.opensearch.jdbc.logging.LogLevel; import java.util.Locale; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/LogOutputConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/LogOutputConnectionProperty.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/LogOutputConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/LogOutputConnectionProperty.java index b3d9ca66e6..5dea44630f 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/LogOutputConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/LogOutputConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class LogOutputConnectionProperty extends StringConnectionProperty { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/LoginTimeoutConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/LoginTimeoutConnectionProperty.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/LoginTimeoutConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/LoginTimeoutConnectionProperty.java index 209e4140fc..c8c13a49e7 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/LoginTimeoutConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/LoginTimeoutConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; /** * Login / Read timeout in seconds diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/PasswordConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/PasswordConnectionProperty.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/PasswordConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/PasswordConnectionProperty.java index 87fc16c320..1e63e3cc2f 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/PasswordConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/PasswordConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class PasswordConnectionProperty extends StringConnectionProperty { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/PathConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/PathConnectionProperty.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/PathConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/PathConnectionProperty.java index cea688793a..8e3349b788 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/PathConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/PathConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; /** * The Path connection property. diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/PortConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/PortConnectionProperty.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/PortConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/PortConnectionProperty.java index efeb849fb2..14af818dc4 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/PortConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/PortConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class PortConnectionProperty extends IntConnectionProperty { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/RegionConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/RegionConnectionProperty.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/RegionConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/RegionConnectionProperty.java index c2a19f22bb..363623b7bc 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/RegionConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/RegionConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class RegionConnectionProperty extends StringConnectionProperty { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/RequestCompressionConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/RequestCompressionConnectionProperty.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/RequestCompressionConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/RequestCompressionConnectionProperty.java index b67c2b2ba7..70f2be8bbe 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/RequestCompressionConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/RequestCompressionConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class RequestCompressionConnectionProperty extends BoolConnectionProperty { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/StringConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/StringConnectionProperty.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/StringConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/StringConnectionProperty.java index c2dc4bff99..2eaa0d6cd2 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/StringConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/StringConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class StringConnectionProperty extends ConnectionProperty { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/TrustSelfSignedConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/TrustSelfSignedConnectionProperty.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/TrustSelfSignedConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/TrustSelfSignedConnectionProperty.java index 4a62c211f4..92f63e3c4e 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/TrustSelfSignedConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/TrustSelfSignedConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class TrustSelfSignedConnectionProperty extends BoolConnectionProperty { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/TrustStoreLocationConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/TrustStoreLocationConnectionProperty.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/TrustStoreLocationConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/TrustStoreLocationConnectionProperty.java index 9bd8cec933..a3391caf83 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/TrustStoreLocationConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/TrustStoreLocationConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class TrustStoreLocationConnectionProperty extends StringConnectionProperty { public static final String KEY = "trustStoreLocation"; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/TrustStorePasswordConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/TrustStorePasswordConnectionProperty.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/TrustStorePasswordConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/TrustStorePasswordConnectionProperty.java index de4e83fe85..57adcf2ca9 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/TrustStorePasswordConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/TrustStorePasswordConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class TrustStorePasswordConnectionProperty extends StringConnectionProperty { public static final String KEY = "trustStorePassword"; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/TrustStoreTypeConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/TrustStoreTypeConnectionProperty.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/TrustStoreTypeConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/TrustStoreTypeConnectionProperty.java index 73ebedd1a0..41455001c2 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/TrustStoreTypeConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/TrustStoreTypeConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class TrustStoreTypeConnectionProperty extends StringConnectionProperty { public static final String KEY = "trustStoreType"; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/UseSSLConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/UseSSLConnectionProperty.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/UseSSLConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/UseSSLConnectionProperty.java index 69e3c0ecf4..da1f8bad2c 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/UseSSLConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/UseSSLConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class UseSSLConnectionProperty extends BoolConnectionProperty { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/UserConnectionProperty.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/UserConnectionProperty.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/UserConnectionProperty.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/config/UserConnectionProperty.java index 9cb7b8c70d..8ca7c3b702 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/config/UserConnectionProperty.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/config/UserConnectionProperty.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; public class UserConnectionProperty extends StringConnectionProperty { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/JdbcWrapper.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/JdbcWrapper.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/JdbcWrapper.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/internal/JdbcWrapper.java index 37f3affb1a..5bcfb67667 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/JdbcWrapper.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/JdbcWrapper.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal; +package org.opensearch.jdbc.internal; import java.sql.SQLException; import java.sql.Wrapper; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/Version.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/Version.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/Version.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/internal/Version.java index 5fd530cb32..bdf7d96fe8 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/Version.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/Version.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal; +package org.opensearch.jdbc.internal; public enum Version { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/exceptions/ObjectClosedException.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/exceptions/ObjectClosedException.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/exceptions/ObjectClosedException.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/internal/exceptions/ObjectClosedException.java index 2f56ee504a..4d6aad9dac 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/exceptions/ObjectClosedException.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/exceptions/ObjectClosedException.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal.exceptions; +package org.opensearch.jdbc.internal.exceptions; import java.sql.SQLException; import java.sql.SQLNonTransientException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/results/ColumnMetaData.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/results/ColumnMetaData.java similarity index 92% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/results/ColumnMetaData.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/internal/results/ColumnMetaData.java index 45cb4515b9..8ac1cf34f4 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/results/ColumnMetaData.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/results/ColumnMetaData.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal.results; +package org.opensearch.jdbc.internal.results; -import com.amazon.opendistroforelasticsearch.jdbc.types.OpenSearchType; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ColumnDescriptor; +import org.opensearch.jdbc.types.OpenSearchType; +import org.opensearch.jdbc.protocol.ColumnDescriptor; public class ColumnMetaData { private String name; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/results/Cursor.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/results/Cursor.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/results/Cursor.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/internal/results/Cursor.java index ebdb672c0e..d360864963 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/results/Cursor.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/results/Cursor.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal.results; +package org.opensearch.jdbc.internal.results; import java.util.HashMap; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/results/Row.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/results/Row.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/results/Row.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/internal/results/Row.java index 993490fef3..329f8140f4 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/results/Row.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/results/Row.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal.results; +package org.opensearch.jdbc.internal.results; import java.util.List; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/results/Schema.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/results/Schema.java similarity index 93% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/results/Schema.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/internal/results/Schema.java index d57ffcf5ed..3314ce03a4 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/results/Schema.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/results/Schema.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal.results; +package org.opensearch.jdbc.internal.results; -import com.amazon.opendistroforelasticsearch.jdbc.types.OpenSearchType; +import org.opensearch.jdbc.types.OpenSearchType; import java.util.List; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/AwsHostNameUtil.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/util/AwsHostNameUtil.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/AwsHostNameUtil.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/internal/util/AwsHostNameUtil.java index 356da0fb5c..8ccfe3bffe 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/AwsHostNameUtil.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/util/AwsHostNameUtil.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal.util; +package org.opensearch.jdbc.internal.util; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/JavaUtil.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/util/JavaUtil.java similarity index 93% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/JavaUtil.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/internal/util/JavaUtil.java index 6ec116e27c..805735c390 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/JavaUtil.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/util/JavaUtil.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal.util; +package org.opensearch.jdbc.internal.util; public class JavaUtil { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/SqlParser.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/util/SqlParser.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/SqlParser.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/internal/util/SqlParser.java index 75571bca74..17bafd3358 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/SqlParser.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/util/SqlParser.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal.util; +package org.opensearch.jdbc.internal.util; /** diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/UrlParser.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/util/UrlParser.java similarity index 91% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/UrlParser.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/internal/util/UrlParser.java index d259943c0b..3248474cbd 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/UrlParser.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/internal/util/UrlParser.java @@ -25,13 +25,13 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal.util; +package org.opensearch.jdbc.internal.util; -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.HostConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.PathConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.PortConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.UseSSLConnectionProperty; +import org.opensearch.jdbc.config.ConnectionProperty; +import org.opensearch.jdbc.config.HostConnectionProperty; +import org.opensearch.jdbc.config.PathConnectionProperty; +import org.opensearch.jdbc.config.PortConnectionProperty; +import org.opensearch.jdbc.config.UseSSLConnectionProperty; import java.net.URI; import java.net.URISyntaxException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/FilePrintWriterLogger.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/FilePrintWriterLogger.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/FilePrintWriterLogger.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/logging/FilePrintWriterLogger.java index 364e0155be..206de7efcb 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/FilePrintWriterLogger.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/FilePrintWriterLogger.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.logging; +package org.opensearch.jdbc.logging; import java.io.IOException; import java.io.PrintWriter; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/Layout.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/Layout.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/Layout.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/logging/Layout.java index 09ad3869f1..2729f20ff7 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/Layout.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/Layout.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.logging; +package org.opensearch.jdbc.logging; public interface Layout { String formatLogEntry(LogLevel severity, String message); diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/LogLevel.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/LogLevel.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/LogLevel.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/logging/LogLevel.java index ce1184b06e..35dd0d2079 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/LogLevel.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/LogLevel.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.logging; +package org.opensearch.jdbc.logging; /** * Enumeration of possible Logging levels diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/Logger.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/Logger.java similarity index 98% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/Logger.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/logging/Logger.java index e52d05ef0a..a3d7b1bc9f 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/Logger.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/Logger.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.logging; +package org.opensearch.jdbc.logging; import java.util.function.Supplier; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/LoggerFactory.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/LoggerFactory.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/LoggerFactory.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/logging/LoggerFactory.java index 39cd8bf35c..8fd4e32973 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/LoggerFactory.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/LoggerFactory.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.logging; +package org.opensearch.jdbc.logging; import java.io.IOException; import java.io.PrintWriter; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/LoggingSource.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/LoggingSource.java similarity index 98% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/LoggingSource.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/logging/LoggingSource.java index 3490eb705e..053c35a168 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/LoggingSource.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/LoggingSource.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.logging; +package org.opensearch.jdbc.logging; import java.sql.SQLException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/NoOpLogger.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/NoOpLogger.java similarity index 98% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/NoOpLogger.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/logging/NoOpLogger.java index d3d2600800..6cb1712b30 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/NoOpLogger.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/NoOpLogger.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.logging; +package org.opensearch.jdbc.logging; /** * An No-Op logger that indicates to a caller that all log levels are diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/PrintWriterLogger.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/PrintWriterLogger.java similarity index 98% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/PrintWriterLogger.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/logging/PrintWriterLogger.java index 8358dd8204..fa92abda18 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/PrintWriterLogger.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/PrintWriterLogger.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.logging; +package org.opensearch.jdbc.logging; import java.io.PrintWriter; import java.io.StringWriter; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/StandardLayout.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/StandardLayout.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/StandardLayout.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/logging/StandardLayout.java index 52dfd8bd9e..f14e2ba53a 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/logging/StandardLayout.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/logging/StandardLayout.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.logging; +package org.opensearch.jdbc.logging; /** * The default log entry layout for driver emitted logs diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/ClusterMetadata.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/ClusterMetadata.java similarity index 88% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/ClusterMetadata.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/ClusterMetadata.java index 0d3c3bb7dc..904fc470e3 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/ClusterMetadata.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/ClusterMetadata.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol; +package org.opensearch.jdbc.protocol; -import com.amazon.opendistroforelasticsearch.jdbc.OpenSearchVersion; +import org.opensearch.jdbc.OpenSearchVersion; public interface ClusterMetadata { String getClusterName(); diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/ColumnDescriptor.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/ColumnDescriptor.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/ColumnDescriptor.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/ColumnDescriptor.java index d49b2405e1..e45807c6ea 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/ColumnDescriptor.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/ColumnDescriptor.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol; +package org.opensearch.jdbc.protocol; public interface ColumnDescriptor { /** diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/ConnectionResponse.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/ConnectionResponse.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/ConnectionResponse.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/ConnectionResponse.java index bf2e031388..89cbef7f34 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/ConnectionResponse.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/ConnectionResponse.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol; +package org.opensearch.jdbc.protocol; public interface ConnectionResponse { ClusterMetadata getClusterMetadata(); diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/JdbcDateTimeFormatter.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/JdbcDateTimeFormatter.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/JdbcDateTimeFormatter.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/JdbcDateTimeFormatter.java index 7fae2a2822..afea997fc2 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/JdbcDateTimeFormatter.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/JdbcDateTimeFormatter.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol; +package org.opensearch.jdbc.protocol; import java.sql.Timestamp; import java.time.format.DateTimeFormatter; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/JdbcQueryParam.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/JdbcQueryParam.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/JdbcQueryParam.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/JdbcQueryParam.java index b44bf61b7a..b0b1786725 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/JdbcQueryParam.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/JdbcQueryParam.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol; +package org.opensearch.jdbc.protocol; public class JdbcQueryParam implements Parameter { private Object value; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/JdbcQueryRequest.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/JdbcQueryRequest.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/JdbcQueryRequest.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/JdbcQueryRequest.java index b3dc7b35e0..f12b4e1f7d 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/JdbcQueryRequest.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/JdbcQueryRequest.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol; +package org.opensearch.jdbc.protocol; import java.util.List; import java.util.Objects; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/Parameter.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/Parameter.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/Parameter.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/Parameter.java index 3d00a6163b..8d502201ad 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/Parameter.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/Parameter.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol; +package org.opensearch.jdbc.protocol; public interface Parameter { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/Protocol.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/Protocol.java similarity index 88% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/Protocol.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/Protocol.java index da567ea9e5..732464852b 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/Protocol.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/Protocol.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol; +package org.opensearch.jdbc.protocol; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.ResponseException; +import org.opensearch.jdbc.protocol.exceptions.ResponseException; import java.io.IOException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/ProtocolFactory.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/ProtocolFactory.java similarity index 83% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/ProtocolFactory.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/ProtocolFactory.java index f877ed04ce..13f72e4013 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/ProtocolFactory.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/ProtocolFactory.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol; +package org.opensearch.jdbc.protocol; -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.transport.Transport; +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.transport.Transport; public interface ProtocolFactory

{ P getProtocol(ConnectionConfig config, T transport); diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/QueryRequest.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/QueryRequest.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/QueryRequest.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/QueryRequest.java index 8bac3bdfa7..d2049ae32c 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/QueryRequest.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/QueryRequest.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol; +package org.opensearch.jdbc.protocol; import java.util.List; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/QueryResponse.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/QueryResponse.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/QueryResponse.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/QueryResponse.java index d8b4935fe8..85b158d184 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/QueryResponse.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/QueryResponse.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol; +package org.opensearch.jdbc.protocol; import java.util.List; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/RequestError.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/RequestError.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/RequestError.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/RequestError.java index e7ed793260..0f917f3ef3 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/RequestError.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/RequestError.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol; +package org.opensearch.jdbc.protocol; public interface RequestError { String getReason(); diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/exceptions/InternalServerErrorException.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/exceptions/InternalServerErrorException.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/exceptions/InternalServerErrorException.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/exceptions/InternalServerErrorException.java index 2d7c042aa6..b85977eab7 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/exceptions/InternalServerErrorException.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/exceptions/InternalServerErrorException.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions; +package org.opensearch.jdbc.protocol.exceptions; import java.sql.SQLNonTransientException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/exceptions/MalformedResponseException.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/exceptions/MalformedResponseException.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/exceptions/MalformedResponseException.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/exceptions/MalformedResponseException.java index 02b5015ee3..ebe17bd83a 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/exceptions/MalformedResponseException.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/exceptions/MalformedResponseException.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions; +package org.opensearch.jdbc.protocol.exceptions; /** * Exception thrown when an malformed response is received from the diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/exceptions/ResponseException.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/exceptions/ResponseException.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/exceptions/ResponseException.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/exceptions/ResponseException.java index 9f0ee30cb7..85b5648ffc 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/exceptions/ResponseException.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/exceptions/ResponseException.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions; +package org.opensearch.jdbc.protocol.exceptions; import java.io.IOException; import java.sql.SQLException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/HttpException.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/HttpException.java similarity index 93% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/HttpException.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/HttpException.java index ad8b33780c..a2d78538fc 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/HttpException.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/HttpException.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.ResponseException; +import org.opensearch.jdbc.protocol.exceptions.ResponseException; /** * Exception thrown when an unexpected HTTP response code is diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/HttpResponseHandler.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/HttpResponseHandler.java similarity index 87% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/HttpResponseHandler.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/HttpResponseHandler.java index 4c0ec6c19b..11b70d1306 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/HttpResponseHandler.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/HttpResponseHandler.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.ResponseException; +import org.opensearch.jdbc.protocol.exceptions.ResponseException; import org.apache.http.HttpResponse; public interface HttpResponseHandler { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JdbcCursorQueryRequest.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JdbcCursorQueryRequest.java similarity index 90% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JdbcCursorQueryRequest.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JdbcCursorQueryRequest.java index 15d02be2dd..c24700572e 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JdbcCursorQueryRequest.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JdbcCursorQueryRequest.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.JdbcQueryParam;; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryRequest; +import org.opensearch.jdbc.protocol.JdbcQueryParam;; +import org.opensearch.jdbc.protocol.QueryRequest; import java.util.List; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonClusterMetadata.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonClusterMetadata.java similarity index 92% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonClusterMetadata.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonClusterMetadata.java index cb11c41611..b64714ecdf 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonClusterMetadata.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonClusterMetadata.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ClusterMetadata; +import org.opensearch.jdbc.protocol.ClusterMetadata; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -69,4 +69,4 @@ public void setClusterUUID(String clusterUUID) { public void setVersion(JsonOpenSearchVersion version) { this.version = version; } -} \ No newline at end of file +} diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonConnectionResponse.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonConnectionResponse.java similarity index 84% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonConnectionResponse.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonConnectionResponse.java index e7a2c93635..997b1ae0cc 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonConnectionResponse.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonConnectionResponse.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ConnectionResponse; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ClusterMetadata; +import org.opensearch.jdbc.protocol.ConnectionResponse; +import org.opensearch.jdbc.protocol.ClusterMetadata; public class JsonConnectionResponse implements ConnectionResponse { private ClusterMetadata clusterMetadata; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonCursorHttpProtocol.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonCursorHttpProtocol.java similarity index 86% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonCursorHttpProtocol.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonCursorHttpProtocol.java index 5ee7dc6ec9..42eed282b4 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonCursorHttpProtocol.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonCursorHttpProtocol.java @@ -25,12 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryRequest; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryResponse; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.ResponseException; -import com.amazon.opendistroforelasticsearch.jdbc.transport.http.HttpTransport; +import org.opensearch.jdbc.protocol.QueryRequest; +import org.opensearch.jdbc.protocol.QueryResponse; +import org.opensearch.jdbc.protocol.exceptions.ResponseException; +import org.opensearch.jdbc.transport.http.HttpTransport; import org.apache.http.client.methods.CloseableHttpResponse; import java.io.IOException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonCursorHttpProtocolFactory.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonCursorHttpProtocolFactory.java similarity index 83% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonCursorHttpProtocolFactory.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonCursorHttpProtocolFactory.java index 55b3033321..75622bc931 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonCursorHttpProtocolFactory.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonCursorHttpProtocolFactory.java @@ -25,11 +25,11 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ProtocolFactory; -import com.amazon.opendistroforelasticsearch.jdbc.transport.http.HttpTransport; +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.protocol.ProtocolFactory; +import org.opensearch.jdbc.transport.http.HttpTransport; /** * Factory to create JsonCursorHttpProtocol objects diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonCursorQueryRequest.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonCursorQueryRequest.java similarity index 88% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonCursorQueryRequest.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonCursorQueryRequest.java index 2a48cc417d..ddce12a623 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonCursorQueryRequest.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonCursorQueryRequest.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.Parameter; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryRequest; +import org.opensearch.jdbc.protocol.Parameter; +import org.opensearch.jdbc.protocol.QueryRequest; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonHttpProtocol.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonHttpProtocol.java similarity index 87% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonHttpProtocol.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonHttpProtocol.java index aeea0d8db8..da5fbe23f1 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonHttpProtocol.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonHttpProtocol.java @@ -25,16 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; - -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ClusterMetadata; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ConnectionResponse; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.Protocol; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryRequest; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryResponse; -import com.amazon.opendistroforelasticsearch.jdbc.transport.http.HttpParam; -import com.amazon.opendistroforelasticsearch.jdbc.transport.http.HttpTransport; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.ResponseException; +package org.opensearch.jdbc.protocol.http; + +import org.opensearch.jdbc.protocol.ClusterMetadata; +import org.opensearch.jdbc.protocol.ConnectionResponse; +import org.opensearch.jdbc.protocol.Protocol; +import org.opensearch.jdbc.protocol.QueryRequest; +import org.opensearch.jdbc.protocol.QueryResponse; +import org.opensearch.jdbc.transport.http.HttpParam; +import org.opensearch.jdbc.transport.http.HttpTransport; +import org.opensearch.jdbc.protocol.exceptions.ResponseException; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.http.Header; import org.apache.http.HttpHeaders; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonHttpProtocolFactory.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonHttpProtocolFactory.java similarity index 81% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonHttpProtocolFactory.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonHttpProtocolFactory.java index ebde4c57a2..f0c7b8f98c 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonHttpProtocolFactory.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonHttpProtocolFactory.java @@ -25,11 +25,11 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ProtocolFactory; -import com.amazon.opendistroforelasticsearch.jdbc.transport.http.HttpTransport; +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.protocol.ProtocolFactory; +import org.opensearch.jdbc.transport.http.HttpTransport; public class JsonHttpProtocolFactory implements ProtocolFactory { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonHttpResponseHandler.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonHttpResponseHandler.java similarity index 96% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonHttpResponseHandler.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonHttpResponseHandler.java index 03e91e70dc..0be564e927 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonHttpResponseHandler.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonHttpResponseHandler.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.MalformedResponseException; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.ResponseException; +import org.opensearch.jdbc.protocol.exceptions.MalformedResponseException; +import org.opensearch.jdbc.protocol.exceptions.ResponseException; import com.fasterxml.jackson.core.JsonProcessingException; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonOpenSearchVersion.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonOpenSearchVersion.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonOpenSearchVersion.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonOpenSearchVersion.java index 8ff28bfc70..4d23bd1c3c 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonOpenSearchVersion.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonOpenSearchVersion.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.OpenSearchVersion; +import org.opensearch.jdbc.OpenSearchVersion; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonQueryRequest.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonQueryRequest.java similarity index 89% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonQueryRequest.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonQueryRequest.java index 9264119ead..6858698661 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonQueryRequest.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonQueryRequest.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.Parameter; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryRequest; +import org.opensearch.jdbc.protocol.Parameter; +import org.opensearch.jdbc.protocol.QueryRequest; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonQueryResponse.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonQueryResponse.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonQueryResponse.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonQueryResponse.java index 7f741ae510..6e7bf3c028 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonQueryResponse.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/protocol/http/JsonQueryResponse.java @@ -25,11 +25,11 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ColumnDescriptor; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryResponse; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.RequestError; +import org.opensearch.jdbc.protocol.ColumnDescriptor; +import org.opensearch.jdbc.protocol.QueryResponse; +import org.opensearch.jdbc.protocol.RequestError; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/Transport.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/Transport.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/Transport.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/transport/Transport.java index 44c6ad3926..0f3a90bf09 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/Transport.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/Transport.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport; +package org.opensearch.jdbc.transport; public interface Transport { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/TransportException.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/TransportException.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/TransportException.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/transport/TransportException.java index 35d9f39011..9e0caad373 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/TransportException.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/TransportException.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport; +package org.opensearch.jdbc.transport; import java.io.IOException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/TransportFactory.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/TransportFactory.java similarity index 83% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/TransportFactory.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/transport/TransportFactory.java index 7f32350a63..d56386d54c 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/TransportFactory.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/TransportFactory.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport; +package org.opensearch.jdbc.transport; -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.logging.Logger; +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.logging.Logger; public interface TransportFactory { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/ApacheHttpClientConnectionFactory.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/ApacheHttpClientConnectionFactory.java similarity index 99% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/ApacheHttpClientConnectionFactory.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/ApacheHttpClientConnectionFactory.java index 2ebaecc100..78690720bb 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/ApacheHttpClientConnectionFactory.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/ApacheHttpClientConnectionFactory.java @@ -52,7 +52,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport.http; +package org.opensearch.jdbc.transport.http; import org.apache.commons.logging.Log; import org.apache.http.HttpRequest; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/ApacheHttpTransport.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/ApacheHttpTransport.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/ApacheHttpTransport.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/ApacheHttpTransport.java index 38f579092a..77cea439fe 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/ApacheHttpTransport.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/ApacheHttpTransport.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport.http; - -import com.amazon.opendistroforelasticsearch.jdbc.auth.AuthenticationType; -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.logging.Logger; -import com.amazon.opendistroforelasticsearch.jdbc.logging.LoggingSource; -import com.amazon.opendistroforelasticsearch.jdbc.transport.TransportException; -import com.amazon.opendistroforelasticsearch.jdbc.transport.http.auth.aws.AWSRequestSigningApacheInterceptor; +package org.opensearch.jdbc.transport.http; + +import org.opensearch.jdbc.auth.AuthenticationType; +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.logging.Logger; +import org.opensearch.jdbc.logging.LoggingSource; +import org.opensearch.jdbc.transport.TransportException; +import org.opensearch.jdbc.transport.http.auth.aws.AWSRequestSigningApacheInterceptor; import com.amazonaws.auth.AWS4Signer; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.auth.DefaultAWSCredentialsProviderChain; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/ApacheHttpTransportFactory.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/ApacheHttpTransportFactory.java similarity index 78% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/ApacheHttpTransportFactory.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/ApacheHttpTransportFactory.java index 4b1757a4d9..26013b80d2 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/ApacheHttpTransportFactory.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/ApacheHttpTransportFactory.java @@ -25,12 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport.http; +package org.opensearch.jdbc.transport.http; -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.logging.Logger; -import com.amazon.opendistroforelasticsearch.jdbc.transport.TransportException; -import com.amazon.opendistroforelasticsearch.jdbc.transport.TransportFactory; +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.logging.Logger; +import org.opensearch.jdbc.transport.TransportException; +import org.opensearch.jdbc.transport.TransportFactory; public class ApacheHttpTransportFactory implements TransportFactory { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/HttpParam.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/HttpParam.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/HttpParam.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/HttpParam.java index 941865df68..ef5da81bab 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/HttpParam.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/HttpParam.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport.http; +package org.opensearch.jdbc.transport.http; public class HttpParam { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/HttpTransport.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/HttpTransport.java similarity index 85% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/HttpTransport.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/HttpTransport.java index 8fff485ee7..94b80c8ebe 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/HttpTransport.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/HttpTransport.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport.http; +package org.opensearch.jdbc.transport.http; -import com.amazon.opendistroforelasticsearch.jdbc.transport.Transport; -import com.amazon.opendistroforelasticsearch.jdbc.transport.TransportException; +import org.opensearch.jdbc.transport.Transport; +import org.opensearch.jdbc.transport.TransportException; import org.apache.http.Header; import org.apache.http.client.methods.CloseableHttpResponse; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/JclLoggerAdapter.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/JclLoggerAdapter.java similarity index 94% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/JclLoggerAdapter.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/JclLoggerAdapter.java index 8e1b89aa8b..6d133f243e 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/JclLoggerAdapter.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/JclLoggerAdapter.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport.http; +package org.opensearch.jdbc.transport.http; -import com.amazon.opendistroforelasticsearch.jdbc.logging.Logger; -import com.amazon.opendistroforelasticsearch.jdbc.logging.LoggingSource; +import org.opensearch.jdbc.logging.Logger; +import org.opensearch.jdbc.logging.LoggingSource; import org.apache.commons.logging.Log; public class JclLoggerAdapter implements Log, LoggingSource { diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/LoggingInputStream.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/LoggingInputStream.java similarity index 98% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/LoggingInputStream.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/LoggingInputStream.java index a6cc84ccd1..5301878142 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/LoggingInputStream.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/LoggingInputStream.java @@ -51,7 +51,7 @@ * . * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport.http; +package org.opensearch.jdbc.transport.http; import org.apache.http.impl.conn.Wire; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/LoggingManagedHttpClientConnection.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/LoggingManagedHttpClientConnection.java similarity index 98% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/LoggingManagedHttpClientConnection.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/LoggingManagedHttpClientConnection.java index a40bc75896..c0327c8479 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/LoggingManagedHttpClientConnection.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/LoggingManagedHttpClientConnection.java @@ -52,7 +52,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport.http; +package org.opensearch.jdbc.transport.http; import org.apache.commons.logging.Log; import org.apache.http.HttpRequest; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/LoggingOutputStream.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/LoggingOutputStream.java similarity index 98% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/LoggingOutputStream.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/LoggingOutputStream.java index 31952d93ed..f1c992fc22 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/LoggingOutputStream.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/LoggingOutputStream.java @@ -52,7 +52,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport.http; +package org.opensearch.jdbc.transport.http; import org.apache.http.impl.conn.Wire; @@ -126,4 +126,4 @@ public void close() throws IOException { } } -} \ No newline at end of file +} diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptor.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptor.java similarity index 98% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptor.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptor.java index b8bdf782be..563a23750e 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptor.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptor.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport.http.auth.aws; +package org.opensearch.jdbc.transport.http.auth.aws; import com.amazonaws.DefaultRequest; import com.amazonaws.auth.AWSCredentialsProvider; @@ -194,4 +194,4 @@ private static Header[] mapToHeaderArray(final Map mapHeaders) { } return headers; } -} \ No newline at end of file +} diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/BaseTypeConverter.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/BaseTypeConverter.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/BaseTypeConverter.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/BaseTypeConverter.java index 5ed901ac79..7f1b0aecd5 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/BaseTypeConverter.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/BaseTypeConverter.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.Date; import java.sql.SQLException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/BinaryType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/BinaryType.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/BinaryType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/BinaryType.java index de7a7b7e5a..d6f822f1b5 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/BinaryType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/BinaryType.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.SQLException; import java.util.Map; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/BooleanType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/BooleanType.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/BooleanType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/BooleanType.java index 980ad01cb1..9dea3a490c 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/BooleanType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/BooleanType.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.SQLException; import java.util.Map; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/ByteType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/ByteType.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/ByteType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/ByteType.java index a86737de09..d4b0460727 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/ByteType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/ByteType.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.SQLException; import java.util.Map; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/DateType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/DateType.java similarity index 98% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/DateType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/DateType.java index a1639ad386..6806e5842f 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/DateType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/DateType.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.Date; import java.sql.SQLException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/DoubleType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/DoubleType.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/DoubleType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/DoubleType.java index 204120381a..66c37df31a 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/DoubleType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/DoubleType.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.SQLException; import java.util.Map; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/FloatType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/FloatType.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/FloatType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/FloatType.java index 4a0aaecee8..ff1c1e02ca 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/FloatType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/FloatType.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.SQLException; import java.util.Map; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/IntegerType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/IntegerType.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/IntegerType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/IntegerType.java index 2ee2bfdae3..6781662f50 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/IntegerType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/IntegerType.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.SQLException; import java.util.Map; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/LongType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/LongType.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/LongType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/LongType.java index e1fae05b4c..bdab492b16 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/LongType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/LongType.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.math.BigDecimal; import java.math.RoundingMode; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/NumberType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/NumberType.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/NumberType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/NumberType.java index 962f8a5b64..3ba525055c 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/NumberType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/NumberType.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.SQLException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/OpenSearchType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/OpenSearchType.java similarity index 99% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/OpenSearchType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/OpenSearchType.java index 45fabc29ce..a29e054b1a 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/OpenSearchType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/OpenSearchType.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.Date; import java.sql.JDBCType; @@ -238,4 +238,4 @@ public int getPrecision() { public int getDisplaySize() { return displaySize; } -} \ No newline at end of file +} diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/ShortType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/ShortType.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/ShortType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/ShortType.java index 1c389a1d8c..325e653152 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/ShortType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/ShortType.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.SQLException; import java.util.Map; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/StringType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/StringType.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/StringType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/StringType.java index f6e711b5ea..886831225c 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/StringType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/StringType.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.util.Map; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TimeType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/TimeType.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TimeType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/TimeType.java index 424afeca6e..7cef20b1f2 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TimeType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/TimeType.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.SQLException; import java.sql.Time; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TimestampType.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/TimestampType.java similarity index 98% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TimestampType.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/TimestampType.java index a2226c8cdb..62f7500e5c 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TimestampType.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/TimestampType.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.SQLException; import java.sql.Timestamp; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TypeConverter.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/TypeConverter.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TypeConverter.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/TypeConverter.java index 20d5242171..d2ec758dbf 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TypeConverter.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/TypeConverter.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.SQLDataException; import java.sql.SQLException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TypeConverters.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/TypeConverters.java similarity index 99% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TypeConverters.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/TypeConverters.java index 4e0a62df68..502e32d6c0 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TypeConverters.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/TypeConverters.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.Date; import java.sql.JDBCType; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TypeHelper.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/TypeHelper.java similarity index 97% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TypeHelper.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/TypeHelper.java index 9fc891b7cf..ee5084d20a 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/TypeHelper.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/TypeHelper.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import java.sql.SQLDataException; import java.sql.SQLException; diff --git a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/UnrecognizedOpenSearchTypeException.java b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/UnrecognizedOpenSearchTypeException.java similarity index 95% rename from sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/UnrecognizedOpenSearchTypeException.java rename to sql-jdbc/src/main/java/org/opensearch/jdbc/types/UnrecognizedOpenSearchTypeException.java index 88eb96bc64..408f87e770 100644 --- a/sql-jdbc/src/main/java/com/amazon/opendistroforelasticsearch/jdbc/types/UnrecognizedOpenSearchTypeException.java +++ b/sql-jdbc/src/main/java/org/opensearch/jdbc/types/UnrecognizedOpenSearchTypeException.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; public class UnrecognizedOpenSearchTypeException extends IllegalArgumentException { diff --git a/sql-jdbc/src/main/resources/META-INF/services/java.sql.Driver b/sql-jdbc/src/main/resources/META-INF/services/java.sql.Driver index ff2ddb8960..c3705871a5 100644 --- a/sql-jdbc/src/main/resources/META-INF/services/java.sql.Driver +++ b/sql-jdbc/src/main/resources/META-INF/services/java.sql.Driver @@ -1 +1 @@ -com.amazon.opendistroforelasticsearch.jdbc.Driver \ No newline at end of file +org.opensearch.jdbc.Driver \ No newline at end of file diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/ConnectionTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/ConnectionTests.java similarity index 92% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/ConnectionTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/ConnectionTests.java index 6ee3bd9c71..2f011768ea 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/ConnectionTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/ConnectionTests.java @@ -25,19 +25,19 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.config.AuthConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionPropertyException; -import com.amazon.opendistroforelasticsearch.jdbc.config.PasswordConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.RegionConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.RequestCompressionConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.UserConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.JsonHttpProtocol; -import com.amazon.opendistroforelasticsearch.jdbc.test.PerTestWireMockServerExtension; -import com.amazon.opendistroforelasticsearch.jdbc.test.WireMockServerHelpers; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockOpenSearch; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.QueryMock; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.config.AuthConnectionProperty; +import org.opensearch.jdbc.config.ConnectionPropertyException; +import org.opensearch.jdbc.config.PasswordConnectionProperty; +import org.opensearch.jdbc.config.RegionConnectionProperty; +import org.opensearch.jdbc.config.RequestCompressionConnectionProperty; +import org.opensearch.jdbc.config.UserConnectionProperty; +import org.opensearch.jdbc.protocol.http.JsonHttpProtocol; +import org.opensearch.jdbc.test.PerTestWireMockServerExtension; +import org.opensearch.jdbc.test.WireMockServerHelpers; +import org.opensearch.jdbc.test.mocks.MockOpenSearch; +import org.opensearch.jdbc.test.mocks.QueryMock; import com.amazonaws.auth.SdkClock; import com.github.tomakehurst.wiremock.WireMockServer; import org.junit.jupiter.api.Assertions; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/CursorTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/CursorTests.java similarity index 93% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/CursorTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/CursorTests.java index eb8a59740f..3f7ebe35a8 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/CursorTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/CursorTests.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.internal.results.ColumnMetaData; -import com.amazon.opendistroforelasticsearch.jdbc.internal.results.Cursor; -import com.amazon.opendistroforelasticsearch.jdbc.internal.results.Row; -import com.amazon.opendistroforelasticsearch.jdbc.internal.results.Schema; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.JsonQueryResponse; -import com.amazon.opendistroforelasticsearch.jdbc.types.OpenSearchType; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.internal.results.ColumnMetaData; +import org.opensearch.jdbc.internal.results.Cursor; +import org.opensearch.jdbc.internal.results.Row; +import org.opensearch.jdbc.internal.results.Schema; +import org.opensearch.jdbc.protocol.http.JsonQueryResponse; +import org.opensearch.jdbc.types.OpenSearchType; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/DataSourceTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/DataSourceTests.java similarity index 89% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/DataSourceTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/DataSourceTests.java index 50beb64280..3ce82ff24c 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/DataSourceTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/DataSourceTests.java @@ -25,19 +25,19 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.auth.AuthenticationType; -import com.amazon.opendistroforelasticsearch.jdbc.config.AuthConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.config.HostConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.LoginTimeoutConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.PasswordConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.PortConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.UserConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.test.PerTestWireMockServerExtension; -import com.amazon.opendistroforelasticsearch.jdbc.test.WireMockServerHelpers; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.QueryMock; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.auth.AuthenticationType; +import org.opensearch.jdbc.config.AuthConnectionProperty; +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.config.HostConnectionProperty; +import org.opensearch.jdbc.config.LoginTimeoutConnectionProperty; +import org.opensearch.jdbc.config.PasswordConnectionProperty; +import org.opensearch.jdbc.config.PortConnectionProperty; +import org.opensearch.jdbc.config.UserConnectionProperty; +import org.opensearch.jdbc.test.PerTestWireMockServerExtension; +import org.opensearch.jdbc.test.WireMockServerHelpers; +import org.opensearch.jdbc.test.mocks.QueryMock; import com.github.tomakehurst.wiremock.WireMockServer; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/DatabaseMetaDataTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/DatabaseMetaDataTests.java similarity index 93% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/DatabaseMetaDataTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/DatabaseMetaDataTests.java index cc3612343c..9bd8c3f842 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/DatabaseMetaDataTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/DatabaseMetaDataTests.java @@ -25,22 +25,22 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.DatabaseMetaDataImpl.ColumnMetadataStatement; -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.logging.NoOpLogger; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ClusterMetadata; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ConnectionResponse; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.Protocol; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ProtocolFactory; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.ResponseException; -import com.amazon.opendistroforelasticsearch.jdbc.transport.Transport; -import com.amazon.opendistroforelasticsearch.jdbc.transport.TransportFactory; -import com.amazon.opendistroforelasticsearch.jdbc.types.OpenSearchType; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockResultSet; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockResultSetMetaData; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockResultSetRows; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.DatabaseMetaDataImpl.ColumnMetadataStatement; +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.logging.NoOpLogger; +import org.opensearch.jdbc.protocol.ClusterMetadata; +import org.opensearch.jdbc.protocol.ConnectionResponse; +import org.opensearch.jdbc.protocol.Protocol; +import org.opensearch.jdbc.protocol.ProtocolFactory; +import org.opensearch.jdbc.protocol.exceptions.ResponseException; +import org.opensearch.jdbc.transport.Transport; +import org.opensearch.jdbc.transport.TransportFactory; +import org.opensearch.jdbc.types.OpenSearchType; +import org.opensearch.jdbc.test.mocks.MockResultSet; +import org.opensearch.jdbc.test.mocks.MockResultSetMetaData; +import org.opensearch.jdbc.test.mocks.MockResultSetRows; import org.junit.jupiter.api.Test; import java.io.IOException; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/DriverTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/DriverTests.java similarity index 88% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/DriverTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/DriverTests.java index 2fc4cfe1a1..d4ecc2028d 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/DriverTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/DriverTests.java @@ -25,11 +25,11 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; +package org.opensearch.jdbc; -import com.amazon.opendistroforelasticsearch.jdbc.test.PerClassWireMockServerExtension; -import com.amazon.opendistroforelasticsearch.jdbc.test.WireMockServerHelpers; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockOpenSearch; +import org.opensearch.jdbc.test.PerClassWireMockServerExtension; +import org.opensearch.jdbc.test.WireMockServerHelpers; +import org.opensearch.jdbc.test.mocks.MockOpenSearch; import com.github.tomakehurst.wiremock.WireMockServer; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/PreparedStatementTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/PreparedStatementTests.java similarity index 90% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/PreparedStatementTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/PreparedStatementTests.java index 083877e2b9..ec3359cb7a 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/PreparedStatementTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/PreparedStatementTests.java @@ -9,19 +9,19 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.logging.NoOpLogger; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ConnectionResponse; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.Protocol; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ProtocolFactory; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryRequest; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryResponse; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.ResponseException; -import com.amazon.opendistroforelasticsearch.jdbc.test.PerTestWireMockServerExtension; -import com.amazon.opendistroforelasticsearch.jdbc.transport.Transport; -import com.amazon.opendistroforelasticsearch.jdbc.transport.TransportFactory; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.logging.NoOpLogger; +import org.opensearch.jdbc.protocol.ConnectionResponse; +import org.opensearch.jdbc.protocol.Protocol; +import org.opensearch.jdbc.protocol.ProtocolFactory; +import org.opensearch.jdbc.protocol.QueryRequest; +import org.opensearch.jdbc.protocol.QueryResponse; +import org.opensearch.jdbc.protocol.exceptions.ResponseException; +import org.opensearch.jdbc.test.PerTestWireMockServerExtension; +import org.opensearch.jdbc.transport.Transport; +import org.opensearch.jdbc.transport.TransportFactory; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetMetaDataTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/ResultSetMetaDataTests.java similarity index 89% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetMetaDataTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/ResultSetMetaDataTests.java index 8d5e1bc83a..a7e9742fa3 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetMetaDataTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/ResultSetMetaDataTests.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. * */ -package com.amazon.opendistroforelasticsearch.jdbc; +package org.opensearch.jdbc; -import com.amazon.opendistroforelasticsearch.jdbc.DatabaseMetaDataImpl.ResultSetColumnDescriptor; -import com.amazon.opendistroforelasticsearch.jdbc.internal.results.ColumnMetaData; -import com.amazon.opendistroforelasticsearch.jdbc.internal.results.Schema; +import org.opensearch.jdbc.DatabaseMetaDataImpl.ResultSetColumnDescriptor; +import org.opensearch.jdbc.internal.results.ColumnMetaData; +import org.opensearch.jdbc.internal.results.Schema; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/ResultSetTests.java similarity index 91% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/ResultSetTests.java index 53548eb99a..68103104c6 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/ResultSetTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/ResultSetTests.java @@ -25,21 +25,21 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.internal.exceptions.ObjectClosedException; -import com.amazon.opendistroforelasticsearch.jdbc.logging.NoOpLogger; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryResponse; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.JsonHttpProtocol; -import com.amazon.opendistroforelasticsearch.jdbc.test.TestResources; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockOpenSearch; -import com.amazon.opendistroforelasticsearch.jdbc.types.OpenSearchType; -import com.amazon.opendistroforelasticsearch.jdbc.test.PerTestWireMockServerExtension; -import com.amazon.opendistroforelasticsearch.jdbc.test.WireMockServerHelpers; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockResultSet; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockResultSetRows; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockResultSetMetaData; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.QueryMock; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.internal.exceptions.ObjectClosedException; +import org.opensearch.jdbc.logging.NoOpLogger; +import org.opensearch.jdbc.protocol.QueryResponse; +import org.opensearch.jdbc.protocol.http.JsonHttpProtocol; +import org.opensearch.jdbc.test.TestResources; +import org.opensearch.jdbc.test.mocks.MockOpenSearch; +import org.opensearch.jdbc.types.OpenSearchType; +import org.opensearch.jdbc.test.PerTestWireMockServerExtension; +import org.opensearch.jdbc.test.WireMockServerHelpers; +import org.opensearch.jdbc.test.mocks.MockResultSet; +import org.opensearch.jdbc.test.mocks.MockResultSetRows; +import org.opensearch.jdbc.test.mocks.MockResultSetMetaData; +import org.opensearch.jdbc.test.mocks.QueryMock; import com.github.tomakehurst.wiremock.WireMockServer; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/SSLClientAuthTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/SSLClientAuthTests.java similarity index 86% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/SSLClientAuthTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/SSLClientAuthTests.java index 195e858962..27004e7a23 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/SSLClientAuthTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/SSLClientAuthTests.java @@ -25,15 +25,15 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.config.KeyStoreLocationConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.KeyStorePasswordConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.TrustStoreLocationConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.TrustStorePasswordConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.test.TLSServer; -import com.amazon.opendistroforelasticsearch.jdbc.test.TestResources; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockOpenSearch; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.config.KeyStoreLocationConnectionProperty; +import org.opensearch.jdbc.config.KeyStorePasswordConnectionProperty; +import org.opensearch.jdbc.config.TrustStoreLocationConnectionProperty; +import org.opensearch.jdbc.config.TrustStorePasswordConnectionProperty; +import org.opensearch.jdbc.test.TLSServer; +import org.opensearch.jdbc.test.TestResources; +import org.opensearch.jdbc.test.mocks.MockOpenSearch; import org.eclipse.jetty.server.Server; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/SSLConnectionTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/SSLConnectionTests.java similarity index 89% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/SSLConnectionTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/SSLConnectionTests.java index 88120fb01d..7be4672e11 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/SSLConnectionTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/SSLConnectionTests.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.config.TrustSelfSignedConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.TrustStoreLocationConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.TrustStorePasswordConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.test.TLSServer; -import com.amazon.opendistroforelasticsearch.jdbc.test.TestResources; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockOpenSearch; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.config.TrustSelfSignedConnectionProperty; +import org.opensearch.jdbc.config.TrustStoreLocationConnectionProperty; +import org.opensearch.jdbc.config.TrustStorePasswordConnectionProperty; +import org.opensearch.jdbc.test.TLSServer; +import org.opensearch.jdbc.test.TestResources; +import org.opensearch.jdbc.test.mocks.MockOpenSearch; import org.eclipse.jetty.server.Server; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/SSLHostnameVerificationTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/SSLHostnameVerificationTests.java similarity index 89% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/SSLHostnameVerificationTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/SSLHostnameVerificationTests.java index 86d7291ce9..120aa09c22 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/SSLHostnameVerificationTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/SSLHostnameVerificationTests.java @@ -25,13 +25,13 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; +package org.opensearch.jdbc; -import com.amazon.opendistroforelasticsearch.jdbc.config.HostnameVerificationConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.TrustSelfSignedConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.test.TLSServer; -import com.amazon.opendistroforelasticsearch.jdbc.test.TestResources; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockOpenSearch; +import org.opensearch.jdbc.config.HostnameVerificationConnectionProperty; +import org.opensearch.jdbc.config.TrustSelfSignedConnectionProperty; +import org.opensearch.jdbc.test.TLSServer; +import org.opensearch.jdbc.test.TestResources; +import org.opensearch.jdbc.test.mocks.MockOpenSearch; import org.eclipse.jetty.server.Server; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/StatementTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/StatementTests.java similarity index 83% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/StatementTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/StatementTests.java index 4901ec8337..dfbdeeeaf2 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/StatementTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/StatementTests.java @@ -25,23 +25,23 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc; - -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.logging.NoOpLogger; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ConnectionResponse; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.JdbcQueryRequest; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.Protocol; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.ProtocolFactory; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryRequest; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.QueryResponse; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.InternalServerErrorException; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.ResponseException; -import com.amazon.opendistroforelasticsearch.jdbc.test.PerTestWireMockServerExtension; -import com.amazon.opendistroforelasticsearch.jdbc.transport.Transport; -import com.amazon.opendistroforelasticsearch.jdbc.transport.TransportFactory; -import com.amazon.opendistroforelasticsearch.jdbc.test.WireMockServerHelpers; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.QueryMock; +package org.opensearch.jdbc; + +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.logging.NoOpLogger; +import org.opensearch.jdbc.protocol.ConnectionResponse; +import org.opensearch.jdbc.protocol.JdbcQueryRequest; +import org.opensearch.jdbc.protocol.Protocol; +import org.opensearch.jdbc.protocol.ProtocolFactory; +import org.opensearch.jdbc.protocol.QueryRequest; +import org.opensearch.jdbc.protocol.QueryResponse; +import org.opensearch.jdbc.protocol.exceptions.InternalServerErrorException; +import org.opensearch.jdbc.protocol.exceptions.ResponseException; +import org.opensearch.jdbc.test.PerTestWireMockServerExtension; +import org.opensearch.jdbc.transport.Transport; +import org.opensearch.jdbc.transport.TransportFactory; +import org.opensearch.jdbc.test.WireMockServerHelpers; +import org.opensearch.jdbc.test.mocks.QueryMock; import com.github.tomakehurst.wiremock.WireMockServer; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/config/ConnectionConfigTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/config/ConnectionConfigTests.java similarity index 99% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/config/ConnectionConfigTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/config/ConnectionConfigTests.java index 65d66545d2..9d1826323b 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/config/ConnectionConfigTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/config/ConnectionConfigTests.java @@ -25,11 +25,11 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.config; +package org.opensearch.jdbc.config; -import com.amazon.opendistroforelasticsearch.jdbc.auth.AuthenticationType; -import com.amazon.opendistroforelasticsearch.jdbc.internal.util.UrlParser; -import com.amazon.opendistroforelasticsearch.jdbc.logging.LogLevel; +import org.opensearch.jdbc.auth.AuthenticationType; +import org.opensearch.jdbc.internal.util.UrlParser; +import org.opensearch.jdbc.logging.LogLevel; import com.amazonaws.auth.EnvironmentVariableCredentialsProvider; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/AwsHostnameUtilTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/internal/util/AwsHostnameUtilTests.java similarity index 97% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/AwsHostnameUtilTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/internal/util/AwsHostnameUtilTests.java index f4083a9055..6d3d2061be 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/AwsHostnameUtilTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/internal/util/AwsHostnameUtilTests.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal.util; +package org.opensearch.jdbc.internal.util; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/SqlParserTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/internal/util/SqlParserTests.java similarity index 98% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/SqlParserTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/internal/util/SqlParserTests.java index 6253f55ec2..aa72f93f9f 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/SqlParserTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/internal/util/SqlParserTests.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal.util; +package org.opensearch.jdbc.internal.util; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/UrlParserTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/internal/util/UrlParserTests.java similarity index 92% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/UrlParserTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/internal/util/UrlParserTests.java index 05dddaf459..8b734e425a 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/internal/util/UrlParserTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/internal/util/UrlParserTests.java @@ -25,17 +25,17 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.internal.util; +package org.opensearch.jdbc.internal.util; import static org.junit.jupiter.api.Assertions.*; -import com.amazon.opendistroforelasticsearch.jdbc.config.HostConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.PasswordConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.PathConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.PortConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.UseSSLConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.UserConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.test.KeyValuePairs; +import org.opensearch.jdbc.config.HostConnectionProperty; +import org.opensearch.jdbc.config.PasswordConnectionProperty; +import org.opensearch.jdbc.config.PathConnectionProperty; +import org.opensearch.jdbc.config.PortConnectionProperty; +import org.opensearch.jdbc.config.UseSSLConnectionProperty; +import org.opensearch.jdbc.config.UserConnectionProperty; +import org.opensearch.jdbc.test.KeyValuePairs; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/JsonHttpProtocolTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/protocol/JsonHttpProtocolTests.java similarity index 93% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/JsonHttpProtocolTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/protocol/JsonHttpProtocolTests.java index ddbef1aa07..60ac1b28c5 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/JsonHttpProtocolTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/protocol/JsonHttpProtocolTests.java @@ -25,22 +25,22 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol; - -import com.amazon.opendistroforelasticsearch.jdbc.config.ConnectionConfig; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.MalformedResponseException; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.exceptions.ResponseException; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.HttpException; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.JsonHttpProtocol; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.JsonHttpProtocolFactory; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.JsonQueryRequest; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.JsonQueryResponse; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockCloseableHttpResponseBuilder; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockOpenSearch; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockHttpTransport; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.QueryMock; -import com.amazon.opendistroforelasticsearch.jdbc.transport.TransportException; -import com.amazon.opendistroforelasticsearch.jdbc.transport.http.HttpTransport; +package org.opensearch.jdbc.protocol; + +import org.opensearch.jdbc.config.ConnectionConfig; +import org.opensearch.jdbc.protocol.exceptions.MalformedResponseException; +import org.opensearch.jdbc.protocol.exceptions.ResponseException; +import org.opensearch.jdbc.protocol.http.HttpException; +import org.opensearch.jdbc.protocol.http.JsonHttpProtocol; +import org.opensearch.jdbc.protocol.http.JsonHttpProtocolFactory; +import org.opensearch.jdbc.protocol.http.JsonQueryRequest; +import org.opensearch.jdbc.protocol.http.JsonQueryResponse; +import org.opensearch.jdbc.test.mocks.MockCloseableHttpResponseBuilder; +import org.opensearch.jdbc.test.mocks.MockOpenSearch; +import org.opensearch.jdbc.test.mocks.MockHttpTransport; +import org.opensearch.jdbc.test.mocks.QueryMock; +import org.opensearch.jdbc.transport.TransportException; +import org.opensearch.jdbc.transport.http.HttpTransport; import org.apache.http.Header; import org.apache.http.client.methods.CloseableHttpResponse; import org.junit.jupiter.api.Assertions; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonCursorQueryRequestTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/protocol/http/JsonCursorQueryRequestTests.java similarity index 89% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonCursorQueryRequestTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/protocol/http/JsonCursorQueryRequestTests.java index 52dfdd18bd..ad20f0cff6 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/protocol/http/JsonCursorQueryRequestTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/protocol/http/JsonCursorQueryRequestTests.java @@ -9,9 +9,9 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.jdbc.protocol.http; +package org.opensearch.jdbc.protocol.http; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.JdbcQueryRequest; +import org.opensearch.jdbc.protocol.JdbcQueryRequest; import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/KeyValuePairs.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/KeyValuePairs.java similarity index 97% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/KeyValuePairs.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/KeyValuePairs.java index 881ee63a71..b537a37e90 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/KeyValuePairs.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/KeyValuePairs.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.test; +package org.opensearch.jdbc.test; import java.util.AbstractMap; import java.util.Arrays; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/PerClassWireMockServerExtension.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/PerClassWireMockServerExtension.java similarity index 98% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/PerClassWireMockServerExtension.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/PerClassWireMockServerExtension.java index b5c53c61ad..d7c1f45761 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/PerClassWireMockServerExtension.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/PerClassWireMockServerExtension.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.test; +package org.opensearch.jdbc.test; import com.github.tomakehurst.wiremock.WireMockServer; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/PerTestWireMockServerExtension.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/PerTestWireMockServerExtension.java similarity index 98% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/PerTestWireMockServerExtension.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/PerTestWireMockServerExtension.java index 981f8394a0..f15693e459 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/PerTestWireMockServerExtension.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/PerTestWireMockServerExtension.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.test; +package org.opensearch.jdbc.test; import com.github.tomakehurst.wiremock.WireMockServer; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/TLSServer.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/TLSServer.java similarity index 96% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/TLSServer.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/TLSServer.java index 2889ceb6e9..94ca7c918f 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/TLSServer.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/TLSServer.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.test; +package org.opensearch.jdbc.test; -import com.amazon.opendistroforelasticsearch.jdbc.internal.util.UrlParser; -import com.amazon.opendistroforelasticsearch.jdbc.test.mocks.MockOpenSearch; +import org.opensearch.jdbc.internal.util.UrlParser; +import org.opensearch.jdbc.test.mocks.MockOpenSearch; import org.eclipse.jetty.server.ConnectionFactory; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Handler; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/TestResources.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/TestResources.java similarity index 97% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/TestResources.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/TestResources.java index bc9da7bc3a..39b04c04bb 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/TestResources.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/TestResources.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.test; +package org.opensearch.jdbc.test; import java.io.BufferedReader; import java.io.IOException; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/UTCTimeZoneTestExtension.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/UTCTimeZoneTestExtension.java similarity index 96% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/UTCTimeZoneTestExtension.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/UTCTimeZoneTestExtension.java index 4410aed976..7b67c64738 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/UTCTimeZoneTestExtension.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/UTCTimeZoneTestExtension.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.test; +package org.opensearch.jdbc.test; import org.junit.jupiter.api.extension.AfterEachCallback; import org.junit.jupiter.api.extension.BeforeEachCallback; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/WireMockServerHelpers.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/WireMockServerHelpers.java similarity index 90% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/WireMockServerHelpers.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/WireMockServerHelpers.java index c9b01cc44d..59d762a795 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/WireMockServerHelpers.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/WireMockServerHelpers.java @@ -25,11 +25,11 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.test; +package org.opensearch.jdbc.test; -import com.amazon.opendistroforelasticsearch.jdbc.config.HostConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.config.PortConnectionProperty; -import com.amazon.opendistroforelasticsearch.jdbc.internal.util.UrlParser; +import org.opensearch.jdbc.config.HostConnectionProperty; +import org.opensearch.jdbc.config.PortConnectionProperty; +import org.opensearch.jdbc.internal.util.UrlParser; import com.github.tomakehurst.wiremock.WireMockServer; import java.util.Properties; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockCloseableHttpResponseBuilder.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockCloseableHttpResponseBuilder.java similarity index 97% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockCloseableHttpResponseBuilder.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockCloseableHttpResponseBuilder.java index bb6bb8830e..c0a754f1e1 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockCloseableHttpResponseBuilder.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockCloseableHttpResponseBuilder.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.test.mocks; +package org.opensearch.jdbc.test.mocks; import org.apache.http.Header; import org.apache.http.HttpEntity; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockHttpTransport.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockHttpTransport.java similarity index 82% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockHttpTransport.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockHttpTransport.java index 2c4e254160..9b5bf87013 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockHttpTransport.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockHttpTransport.java @@ -25,12 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.test.mocks; +package org.opensearch.jdbc.test.mocks; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.JsonHttpProtocol; -import com.amazon.opendistroforelasticsearch.jdbc.transport.TransportException; -import com.amazon.opendistroforelasticsearch.jdbc.transport.http.HttpParam; -import com.amazon.opendistroforelasticsearch.jdbc.transport.http.HttpTransport; +import org.opensearch.jdbc.protocol.http.JsonHttpProtocol; +import org.opensearch.jdbc.transport.TransportException; +import org.opensearch.jdbc.transport.http.HttpParam; +import org.opensearch.jdbc.transport.http.HttpTransport; import org.apache.http.Header; import org.apache.http.client.methods.CloseableHttpResponse; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockOpenSearch.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockOpenSearch.java similarity index 95% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockOpenSearch.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockOpenSearch.java index f1c8c1c268..5c29f1f3e5 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockOpenSearch.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockOpenSearch.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.test.mocks; +package org.opensearch.jdbc.test.mocks; -import com.amazon.opendistroforelasticsearch.jdbc.OpenSearchConnection; +import org.opensearch.jdbc.OpenSearchConnection; import java.sql.SQLException; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockResultSet.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockResultSet.java similarity index 95% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockResultSet.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockResultSet.java index d3d5967388..54af8bba4a 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockResultSet.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockResultSet.java @@ -9,7 +9,7 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.jdbc.test.mocks; +package org.opensearch.jdbc.test.mocks; import java.sql.ResultSet; import java.sql.SQLException; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockResultSetMetaData.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockResultSetMetaData.java similarity index 98% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockResultSetMetaData.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockResultSetMetaData.java index 1fc40ef317..25181f6f2e 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockResultSetMetaData.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockResultSetMetaData.java @@ -25,10 +25,10 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.test.mocks; +package org.opensearch.jdbc.test.mocks; -import com.amazon.opendistroforelasticsearch.jdbc.internal.JdbcWrapper; -import com.amazon.opendistroforelasticsearch.jdbc.types.OpenSearchType; +import org.opensearch.jdbc.internal.JdbcWrapper; +import org.opensearch.jdbc.types.OpenSearchType; import java.sql.ResultSetMetaData; import java.sql.SQLException; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockResultSetRows.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockResultSetRows.java similarity index 98% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockResultSetRows.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockResultSetRows.java index d0571ea31c..c962f3e3d6 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/MockResultSetRows.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/MockResultSetRows.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.test.mocks; +package org.opensearch.jdbc.test.mocks; import java.sql.ResultSet; import java.sql.SQLException; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/QueryMock.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/QueryMock.java similarity index 96% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/QueryMock.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/QueryMock.java index 619f70f5c6..858f034b32 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/test/mocks/QueryMock.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/test/mocks/QueryMock.java @@ -25,12 +25,12 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.test.mocks; +package org.opensearch.jdbc.test.mocks; -import com.amazon.opendistroforelasticsearch.jdbc.OpenSearchConnection; -import com.amazon.opendistroforelasticsearch.jdbc.protocol.http.JsonHttpProtocol; -import com.amazon.opendistroforelasticsearch.jdbc.test.TestResources; -import com.amazon.opendistroforelasticsearch.jdbc.types.OpenSearchType; +import org.opensearch.jdbc.OpenSearchConnection; +import org.opensearch.jdbc.protocol.http.JsonHttpProtocol; +import org.opensearch.jdbc.test.TestResources; +import org.opensearch.jdbc.types.OpenSearchType; import com.github.tomakehurst.wiremock.WireMockServer; import java.io.IOException; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptorTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptorTests.java similarity index 98% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptorTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptorTests.java index 12044f7d9e..9cdad759d9 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptorTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/transport/http/auth/aws/AWSRequestSigningApacheInterceptorTests.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.transport.http.auth.aws; +package org.opensearch.jdbc.transport.http.auth.aws; import com.amazonaws.SignableRequest; import com.amazonaws.auth.AWSCredentials; @@ -121,4 +121,4 @@ private static AWSRequestSigningApacheInterceptor createInterceptor() { anonymousCredentialsProvider); } -} \ No newline at end of file +} diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/BinaryTypeTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/BinaryTypeTests.java similarity index 96% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/BinaryTypeTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/types/BinaryTypeTests.java index 9aac85d694..9ddaff475d 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/BinaryTypeTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/BinaryTypeTests.java @@ -24,7 +24,7 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/ByteTypeTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/ByteTypeTests.java similarity index 98% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/ByteTypeTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/types/ByteTypeTests.java index 19341cd90f..b99edbd4c7 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/ByteTypeTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/ByteTypeTests.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/DateTypeTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/DateTypeTests.java similarity index 96% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/DateTypeTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/types/DateTypeTests.java index f10f474ee7..9a94239cd4 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/DateTypeTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/DateTypeTests.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; -import com.amazon.opendistroforelasticsearch.jdbc.test.UTCTimeZoneTestExtension; +import org.opensearch.jdbc.test.UTCTimeZoneTestExtension; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/FloatTypeTest.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/FloatTypeTest.java similarity index 98% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/FloatTypeTest.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/types/FloatTypeTest.java index bb58cd7a03..d40f6d0b77 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/FloatTypeTest.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/FloatTypeTest.java @@ -9,7 +9,7 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; @@ -92,4 +92,4 @@ private static Stream validRangeNumberProvider() { ); } -} \ No newline at end of file +} diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/IntegerTypeTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/IntegerTypeTests.java similarity index 98% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/IntegerTypeTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/types/IntegerTypeTests.java index ec08709a3d..46e095bf3b 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/IntegerTypeTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/IntegerTypeTests.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/KeywordTypeTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/KeywordTypeTests.java similarity index 95% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/KeywordTypeTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/types/KeywordTypeTests.java index 4e286fe699..60ec3117e8 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/KeywordTypeTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/KeywordTypeTests.java @@ -9,7 +9,7 @@ * GitHub history for details. */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/LongTypeTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/LongTypeTests.java similarity index 98% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/LongTypeTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/types/LongTypeTests.java index e01237370b..21a97fa184 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/LongTypeTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/LongTypeTests.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/ShortTypeTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/ShortTypeTests.java similarity index 98% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/ShortTypeTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/types/ShortTypeTests.java index ee1a2c845a..c7dfebc359 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/ShortTypeTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/ShortTypeTests.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/TimeTypeTest.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/TimeTypeTest.java similarity index 92% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/TimeTypeTest.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/types/TimeTypeTest.java index 2500e1e8ab..fc286b3685 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/TimeTypeTest.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/TimeTypeTest.java @@ -24,11 +24,11 @@ * permissions and limitations under the License. */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import static org.junit.jupiter.api.Assertions.assertEquals; -import com.amazon.opendistroforelasticsearch.jdbc.test.UTCTimeZoneTestExtension; +import org.opensearch.jdbc.test.UTCTimeZoneTestExtension; import java.sql.Time; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/TimestampTypeTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/TimestampTypeTests.java similarity index 97% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/TimestampTypeTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/types/TimestampTypeTests.java index 386c5becca..18b71848bb 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/TimestampTypeTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/TimestampTypeTests.java @@ -25,9 +25,9 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; -import com.amazon.opendistroforelasticsearch.jdbc.test.UTCTimeZoneTestExtension; +import org.opensearch.jdbc.test.UTCTimeZoneTestExtension; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/TypesTests.java b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/TypesTests.java similarity index 95% rename from sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/TypesTests.java rename to sql-jdbc/src/test/java/org/opensearch/jdbc/types/TypesTests.java index 264d97b6dc..aa3587d904 100644 --- a/sql-jdbc/src/test/java/com/amazon/opendistroforelasticsearch/jdbc/types/TypesTests.java +++ b/sql-jdbc/src/test/java/org/opensearch/jdbc/types/TypesTests.java @@ -25,7 +25,7 @@ * */ -package com.amazon.opendistroforelasticsearch.jdbc.types; +package org.opensearch.jdbc.types; import static java.util.Collections.emptyMap; import static org.junit.jupiter.api.Assertions.assertNull; diff --git a/sql-odbc/docs/dev/Pagination.md b/sql-odbc/docs/dev/Pagination.md index 4e82d53480..ff2a862f67 100644 --- a/sql-odbc/docs/dev/Pagination.md +++ b/sql-odbc/docs/dev/Pagination.md @@ -3,7 +3,7 @@ ## Overview OpenSearch ODBC Driver supports forward-only cursor. This document illustrates how the cursor(pagination) is handled in the driver. -For information on how the pagination is supported on OpenSearch server, check [Opendistro SQL Cursor (Pagination) Support](https://github.com/opensearch-project/sql/blob/main/docs/dev/Pagination.md). +For information on how the pagination is supported on OpenSearch server, check [OpenSearch SQL Cursor (Pagination) Support](https://github.com/opensearch-project/sql/blob/main/docs/dev/Pagination.md). ## Data Flow

diff --git a/sql/build.gradle b/sql/build.gradle index ec0a2cf1bf..dac10195cd 100644 --- a/sql/build.gradle +++ b/sql/build.gradle @@ -36,9 +36,9 @@ plugins { } generateGrammarSource { - arguments += ['-visitor', '-package', 'com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser'] + arguments += ['-visitor', '-package', 'org.opensearch.sql.sql.antlr.parser'] source = sourceSets.main.antlr - outputDirectory = file("build/generated-src/antlr/main/com/amazon/opendistroforelasticsearch/sql/sql/antlr/parser") + outputDirectory = file("build/generated-src/antlr/main/org/opensearch/sql/sql/antlr/parser") } configurations { diff --git a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/SQLService.java b/sql/src/main/java/org/opensearch/sql/sql/SQLService.java similarity index 69% rename from sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/SQLService.java rename to sql/src/main/java/org/opensearch/sql/sql/SQLService.java index dd3fba3caa..b9c155a18b 100644 --- a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/SQLService.java +++ b/sql/src/main/java/org/opensearch/sql/sql/SQLService.java @@ -25,27 +25,27 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql; - -import com.amazon.opendistroforelasticsearch.sql.analysis.AnalysisContext; -import com.amazon.opendistroforelasticsearch.sql.analysis.Analyzer; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan; -import com.amazon.opendistroforelasticsearch.sql.common.response.ResponseListener; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.ExplainResponse; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.QueryResponse; -import com.amazon.opendistroforelasticsearch.sql.expression.DSL; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.planner.Planner; -import com.amazon.opendistroforelasticsearch.sql.planner.logical.LogicalPlan; -import com.amazon.opendistroforelasticsearch.sql.planner.optimizer.LogicalPlanOptimizer; -import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan; -import com.amazon.opendistroforelasticsearch.sql.sql.antlr.SQLSyntaxParser; -import com.amazon.opendistroforelasticsearch.sql.sql.domain.SQLQueryRequest; -import com.amazon.opendistroforelasticsearch.sql.sql.parser.AstBuilder; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; +package org.opensearch.sql.sql; + import lombok.RequiredArgsConstructor; import org.antlr.v4.runtime.tree.ParseTree; +import org.opensearch.sql.analysis.AnalysisContext; +import org.opensearch.sql.analysis.Analyzer; +import org.opensearch.sql.ast.tree.UnresolvedPlan; +import org.opensearch.sql.common.response.ResponseListener; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.executor.ExecutionEngine.ExplainResponse; +import org.opensearch.sql.executor.ExecutionEngine.QueryResponse; +import org.opensearch.sql.expression.DSL; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.planner.Planner; +import org.opensearch.sql.planner.logical.LogicalPlan; +import org.opensearch.sql.planner.optimizer.LogicalPlanOptimizer; +import org.opensearch.sql.planner.physical.PhysicalPlan; +import org.opensearch.sql.sql.antlr.SQLSyntaxParser; +import org.opensearch.sql.sql.domain.SQLQueryRequest; +import org.opensearch.sql.sql.parser.AstBuilder; +import org.opensearch.sql.storage.StorageEngine; /** * SQL service. diff --git a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/antlr/SQLSyntaxParser.java b/sql/src/main/java/org/opensearch/sql/sql/antlr/SQLSyntaxParser.java similarity index 78% rename from sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/antlr/SQLSyntaxParser.java rename to sql/src/main/java/org/opensearch/sql/sql/antlr/SQLSyntaxParser.java index 7521641ce4..d83699dff3 100644 --- a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/antlr/SQLSyntaxParser.java +++ b/sql/src/main/java/org/opensearch/sql/sql/antlr/SQLSyntaxParser.java @@ -25,14 +25,14 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql.antlr; +package org.opensearch.sql.sql.antlr; -import com.amazon.opendistroforelasticsearch.sql.common.antlr.CaseInsensitiveCharStream; -import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxAnalysisErrorListener; -import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLLexer; -import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser; import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.tree.ParseTree; +import org.opensearch.sql.common.antlr.CaseInsensitiveCharStream; +import org.opensearch.sql.common.antlr.SyntaxAnalysisErrorListener; +import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLLexer; +import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser; /** * SQL syntax parser which encapsulates an ANTLR parser. diff --git a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/config/SQLServiceConfig.java b/sql/src/main/java/org/opensearch/sql/sql/config/SQLServiceConfig.java similarity index 72% rename from sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/config/SQLServiceConfig.java rename to sql/src/main/java/org/opensearch/sql/sql/config/SQLServiceConfig.java index cdb1895a96..1e5d8558ef 100644 --- a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/config/SQLServiceConfig.java +++ b/sql/src/main/java/org/opensearch/sql/sql/config/SQLServiceConfig.java @@ -25,16 +25,16 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql.config; +package org.opensearch.sql.sql.config; -import com.amazon.opendistroforelasticsearch.sql.analysis.Analyzer; -import com.amazon.opendistroforelasticsearch.sql.analysis.ExpressionAnalyzer; -import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine; -import com.amazon.opendistroforelasticsearch.sql.expression.config.ExpressionConfig; -import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionRepository; -import com.amazon.opendistroforelasticsearch.sql.sql.SQLService; -import com.amazon.opendistroforelasticsearch.sql.sql.antlr.SQLSyntaxParser; -import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine; +import org.opensearch.sql.analysis.Analyzer; +import org.opensearch.sql.analysis.ExpressionAnalyzer; +import org.opensearch.sql.executor.ExecutionEngine; +import org.opensearch.sql.expression.config.ExpressionConfig; +import org.opensearch.sql.expression.function.BuiltinFunctionRepository; +import org.opensearch.sql.sql.SQLService; +import org.opensearch.sql.sql.antlr.SQLSyntaxParser; +import org.opensearch.sql.storage.StorageEngine; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/domain/SQLQueryRequest.java b/sql/src/main/java/org/opensearch/sql/sql/domain/SQLQueryRequest.java similarity index 96% rename from sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/domain/SQLQueryRequest.java rename to sql/src/main/java/org/opensearch/sql/sql/domain/SQLQueryRequest.java index 9bb6b97220..46496e81d6 100644 --- a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/domain/SQLQueryRequest.java +++ b/sql/src/main/java/org/opensearch/sql/sql/domain/SQLQueryRequest.java @@ -25,9 +25,8 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql.domain; +package org.opensearch.sql.sql.domain; -import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.Format; import com.google.common.base.Strings; import com.google.common.collect.ImmutableSet; import java.util.Collections; @@ -41,6 +40,7 @@ import lombok.ToString; import lombok.experimental.Accessors; import org.json.JSONObject; +import org.opensearch.sql.protocol.response.format.Format; /** * SQL query request. diff --git a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstAggregationBuilder.java b/sql/src/main/java/org/opensearch/sql/sql/parser/AstAggregationBuilder.java similarity index 85% rename from sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstAggregationBuilder.java rename to sql/src/main/java/org/opensearch/sql/sql/parser/AstAggregationBuilder.java index fe616fbaa6..0406a26718 100644 --- a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstAggregationBuilder.java +++ b/sql/src/main/java/org/opensearch/sql/sql/parser/AstAggregationBuilder.java @@ -25,27 +25,27 @@ * */ -package com.amazon.opendistroforelasticsearch.sql.sql.parser; +package org.opensearch.sql.sql.parser; import static java.util.Collections.emptyList; -import com.amazon.opendistroforelasticsearch.sql.ast.Node; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.AggregateFunction; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.Alias; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.QualifiedName; -import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.Aggregation; -import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan; -import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils; -import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException; -import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParserBaseVisitor; -import com.amazon.opendistroforelasticsearch.sql.sql.parser.context.QuerySpecification; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; import org.antlr.v4.runtime.tree.ParseTree; +import org.opensearch.sql.ast.Node; +import org.opensearch.sql.ast.expression.AggregateFunction; +import org.opensearch.sql.ast.expression.Alias; +import org.opensearch.sql.ast.expression.QualifiedName; +import org.opensearch.sql.ast.expression.UnresolvedExpression; +import org.opensearch.sql.ast.tree.Aggregation; +import org.opensearch.sql.ast.tree.UnresolvedPlan; +import org.opensearch.sql.common.utils.StringUtils; +import org.opensearch.sql.exception.SemanticCheckException; +import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParserBaseVisitor; +import org.opensearch.sql.sql.parser.context.QuerySpecification; /** *

SelectExpressionAnalyzerTest
diff --git a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstBuilder.java b/sql/src/main/java/org/opensearch/sql/sql/parser/AstBuilder.java
similarity index 73%
rename from sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstBuilder.java
rename to sql/src/main/java/org/opensearch/sql/sql/parser/AstBuilder.java
index 8d2c6c85a0..bd6a8dc55b 100644
--- a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstBuilder.java
+++ b/sql/src/main/java/org/opensearch/sql/sql/parser/AstBuilder.java
@@ -25,43 +25,43 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser;
-
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.FromClauseContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.HavingClauseContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.SelectClauseContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.SelectElementContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.SubqueryAsRelationContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.TableAsRelationContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.WhereClauseContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.parser.ParserUtils.getTextInQuery;
-import static com.amazon.opendistroforelasticsearch.sql.utils.SystemIndexUtils.TABLE_INFO;
-import static com.amazon.opendistroforelasticsearch.sql.utils.SystemIndexUtils.mappingTable;
+package org.opensearch.sql.sql.parser;
+
 import static java.util.Collections.emptyList;
+import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.FromClauseContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.HavingClauseContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.SelectClauseContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.SelectElementContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.SubqueryAsRelationContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.TableAsRelationContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.WhereClauseContext;
+import static org.opensearch.sql.sql.parser.ParserUtils.getTextInQuery;
+import static org.opensearch.sql.utils.SystemIndexUtils.TABLE_INFO;
+import static org.opensearch.sql.utils.SystemIndexUtils.mappingTable;
 
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.Alias;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.AllFields;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.Function;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Filter;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Limit;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Project;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Relation;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.RelationSubquery;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Values;
-import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxCheckException;
-import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.QuerySpecificationContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParserBaseVisitor;
-import com.amazon.opendistroforelasticsearch.sql.sql.parser.context.ParsingContext;
 import com.google.common.collect.ImmutableList;
 import java.util.Collections;
 import java.util.Optional;
 import lombok.RequiredArgsConstructor;
 import org.antlr.v4.runtime.tree.ParseTree;
+import org.opensearch.sql.ast.expression.Alias;
+import org.opensearch.sql.ast.expression.AllFields;
+import org.opensearch.sql.ast.expression.Function;
+import org.opensearch.sql.ast.expression.UnresolvedExpression;
+import org.opensearch.sql.ast.tree.Filter;
+import org.opensearch.sql.ast.tree.Limit;
+import org.opensearch.sql.ast.tree.Project;
+import org.opensearch.sql.ast.tree.Relation;
+import org.opensearch.sql.ast.tree.RelationSubquery;
+import org.opensearch.sql.ast.tree.UnresolvedPlan;
+import org.opensearch.sql.ast.tree.Values;
+import org.opensearch.sql.common.antlr.SyntaxCheckException;
+import org.opensearch.sql.common.utils.StringUtils;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.QuerySpecificationContext;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParserBaseVisitor;
+import org.opensearch.sql.sql.parser.context.ParsingContext;
 
 /**
  * Abstract syntax tree (AST) builder.
diff --git a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstExpressionBuilder.java b/sql/src/main/java/org/opensearch/sql/sql/parser/AstExpressionBuilder.java
similarity index 61%
rename from sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstExpressionBuilder.java
rename to sql/src/main/java/org/opensearch/sql/sql/parser/AstExpressionBuilder.java
index 3c1ba0e94d..a6262e1bfe 100644
--- a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstExpressionBuilder.java
+++ b/sql/src/main/java/org/opensearch/sql/sql/parser/AstExpressionBuilder.java
@@ -25,73 +25,46 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser;
-
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.stringLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.IS_NOT_NULL;
-import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.IS_NULL;
-import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.LIKE;
-import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.NOT_LIKE;
-import static com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName.REGEXP;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.BinaryComparisonPredicateContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.BooleanContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.CaseFuncAlternativeContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.CaseFunctionCallContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.ColumnFilterContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.ConvertedDataTypeContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.CountStarFunctionCallContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.DataTypeFunctionCallContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.DateLiteralContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.IsNullPredicateContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.LikePredicateContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.MathExpressionAtomContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.NotExpressionContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.NullLiteralContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.OverClauseContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.QualifiedNameContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.RegexpPredicateContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.RegularAggregateFunctionCallContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.ScalarFunctionCallContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.ScalarWindowFunctionContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.ShowDescribePatternContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.SignedDecimalContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.SignedRealContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.StringContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.StringLiteralContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.TableFilterContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.TimeLiteralContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.TimestampLiteralContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.WindowFunctionClauseContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.parser.ParserUtils.createSortOption;
-
-import com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.AggregateFunction;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.AllFields;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.And;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.Case;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.Cast;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.Function;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.Interval;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.IntervalUnit;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.Not;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.Or;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.QualifiedName;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.When;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.WindowFunction;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption;
-import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.AndExpressionContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.ColumnNameContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.FunctionArgsContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.IdentContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.IntervalLiteralContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.NestedExpressionAtomContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.OrExpressionContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.TableNameContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParserBaseVisitor;
+package org.opensearch.sql.sql.parser;
+
+import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName;
+import static org.opensearch.sql.ast.dsl.AstDSL.stringLiteral;
+import static org.opensearch.sql.expression.function.BuiltinFunctionName.IS_NOT_NULL;
+import static org.opensearch.sql.expression.function.BuiltinFunctionName.IS_NULL;
+import static org.opensearch.sql.expression.function.BuiltinFunctionName.LIKE;
+import static org.opensearch.sql.expression.function.BuiltinFunctionName.NOT_LIKE;
+import static org.opensearch.sql.expression.function.BuiltinFunctionName.REGEXP;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.BinaryComparisonPredicateContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.BooleanContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.CaseFuncAlternativeContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.CaseFunctionCallContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.ColumnFilterContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.ConvertedDataTypeContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.CountStarFunctionCallContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.DataTypeFunctionCallContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.DateLiteralContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.IsNullPredicateContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.LikePredicateContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.MathExpressionAtomContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.NotExpressionContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.NullLiteralContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.OverClauseContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.QualifiedNameContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.RegexpPredicateContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.RegularAggregateFunctionCallContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.ScalarFunctionCallContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.ScalarWindowFunctionContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.ShowDescribePatternContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.SignedDecimalContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.SignedRealContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.StringContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.StringLiteralContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.TableFilterContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.TimeLiteralContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.TimestampLiteralContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.WindowFunctionClauseContext;
+import static org.opensearch.sql.sql.parser.ParserUtils.createSortOption;
+
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
@@ -99,6 +72,33 @@
 import org.antlr.v4.runtime.RuleContext;
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.lang3.tuple.Pair;
+import org.opensearch.sql.ast.dsl.AstDSL;
+import org.opensearch.sql.ast.expression.AggregateFunction;
+import org.opensearch.sql.ast.expression.AllFields;
+import org.opensearch.sql.ast.expression.And;
+import org.opensearch.sql.ast.expression.Case;
+import org.opensearch.sql.ast.expression.Cast;
+import org.opensearch.sql.ast.expression.Function;
+import org.opensearch.sql.ast.expression.Interval;
+import org.opensearch.sql.ast.expression.IntervalUnit;
+import org.opensearch.sql.ast.expression.Not;
+import org.opensearch.sql.ast.expression.Or;
+import org.opensearch.sql.ast.expression.QualifiedName;
+import org.opensearch.sql.ast.expression.UnresolvedExpression;
+import org.opensearch.sql.ast.expression.When;
+import org.opensearch.sql.ast.expression.WindowFunction;
+import org.opensearch.sql.ast.tree.Sort.SortOption;
+import org.opensearch.sql.common.utils.StringUtils;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.AndExpressionContext;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.ColumnNameContext;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.FunctionArgsContext;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.IdentContext;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.IntervalLiteralContext;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.NestedExpressionAtomContext;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.OrExpressionContext;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.TableNameContext;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParserBaseVisitor;
 
 /**
  * Expression builder to parse text to expression in AST.
diff --git a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstHavingFilterBuilder.java b/sql/src/main/java/org/opensearch/sql/sql/parser/AstHavingFilterBuilder.java
similarity index 82%
rename from sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstHavingFilterBuilder.java
rename to sql/src/main/java/org/opensearch/sql/sql/parser/AstHavingFilterBuilder.java
index b40d5b1a85..4c985a3526 100644
--- a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstHavingFilterBuilder.java
+++ b/sql/src/main/java/org/opensearch/sql/sql/parser/AstHavingFilterBuilder.java
@@ -25,13 +25,13 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser;
+package org.opensearch.sql.sql.parser;
 
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.QualifiedNameContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.QualifiedNameContext;
 
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression;
-import com.amazon.opendistroforelasticsearch.sql.sql.parser.context.QuerySpecification;
 import lombok.RequiredArgsConstructor;
+import org.opensearch.sql.ast.expression.UnresolvedExpression;
+import org.opensearch.sql.sql.parser.context.QuerySpecification;
 
 /**
  * AST Having filter builder that builds HAVING clause condition expressions
diff --git a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstSortBuilder.java b/sql/src/main/java/org/opensearch/sql/sql/parser/AstSortBuilder.java
similarity index 68%
rename from sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstSortBuilder.java
rename to sql/src/main/java/org/opensearch/sql/sql/parser/AstSortBuilder.java
index 5bdc56d50d..af4bcc6364 100644
--- a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstSortBuilder.java
+++ b/sql/src/main/java/org/opensearch/sql/sql/parser/AstSortBuilder.java
@@ -25,27 +25,27 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser;
+package org.opensearch.sql.sql.parser;
 
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.booleanLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder.NULL_FIRST;
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.DESC;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.OrderByClauseContext;
+import static org.opensearch.sql.ast.dsl.AstDSL.booleanLiteral;
+import static org.opensearch.sql.ast.tree.Sort.NullOrder.NULL_FIRST;
+import static org.opensearch.sql.ast.tree.Sort.SortOrder.DESC;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.OrderByClauseContext;
 
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.Argument;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.Field;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParserBaseVisitor;
-import com.amazon.opendistroforelasticsearch.sql.sql.parser.context.QuerySpecification;
 import com.google.common.collect.ImmutableList;
 import java.util.ArrayList;
 import java.util.List;
 import lombok.RequiredArgsConstructor;
+import org.opensearch.sql.ast.expression.Argument;
+import org.opensearch.sql.ast.expression.Field;
+import org.opensearch.sql.ast.expression.UnresolvedExpression;
+import org.opensearch.sql.ast.tree.Sort;
+import org.opensearch.sql.ast.tree.Sort.NullOrder;
+import org.opensearch.sql.ast.tree.Sort.SortOption;
+import org.opensearch.sql.ast.tree.Sort.SortOrder;
+import org.opensearch.sql.ast.tree.UnresolvedPlan;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParserBaseVisitor;
+import org.opensearch.sql.sql.parser.context.QuerySpecification;
 
 /**
  * AST sort builder that builds Sort AST node from ORDER BY clause. During this process, the item
diff --git a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/ParserUtils.java b/sql/src/main/java/org/opensearch/sql/sql/parser/ParserUtils.java
similarity index 84%
rename from sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/ParserUtils.java
rename to sql/src/main/java/org/opensearch/sql/sql/parser/ParserUtils.java
index c133d8f6dc..e864572ffd 100644
--- a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/ParserUtils.java
+++ b/sql/src/main/java/org/opensearch/sql/sql/parser/ParserUtils.java
@@ -26,12 +26,12 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser;
+package org.opensearch.sql.sql.parser;
 
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder;
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption;
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.OrderByElementContext;
+import static org.opensearch.sql.ast.tree.Sort.NullOrder;
+import static org.opensearch.sql.ast.tree.Sort.SortOption;
+import static org.opensearch.sql.ast.tree.Sort.SortOrder;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.OrderByElementContext;
 
 import lombok.experimental.UtilityClass;
 import org.antlr.v4.runtime.ParserRuleContext;
diff --git a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/context/ParsingContext.java b/sql/src/main/java/org/opensearch/sql/sql/parser/context/ParsingContext.java
similarity index 95%
rename from sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/context/ParsingContext.java
rename to sql/src/main/java/org/opensearch/sql/sql/parser/context/ParsingContext.java
index ef16de66d1..a76e507cfa 100644
--- a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/context/ParsingContext.java
+++ b/sql/src/main/java/org/opensearch/sql/sql/parser/context/ParsingContext.java
@@ -25,7 +25,7 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser.context;
+package org.opensearch.sql.sql.parser.context;
 
 import java.util.ArrayDeque;
 import java.util.Deque;
diff --git a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/context/QuerySpecification.java b/sql/src/main/java/org/opensearch/sql/sql/parser/context/QuerySpecification.java
similarity index 78%
rename from sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/context/QuerySpecification.java
rename to sql/src/main/java/org/opensearch/sql/sql/parser/context/QuerySpecification.java
index 2717e4c364..bb4a46e33d 100644
--- a/sql/src/main/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/context/QuerySpecification.java
+++ b/sql/src/main/java/org/opensearch/sql/sql/parser/context/QuerySpecification.java
@@ -25,31 +25,18 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser.context;
-
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.FilteredAggregationFunctionCallContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.GroupByElementContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.OrderByElementContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.SelectClauseContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.SelectElementContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.SubqueryAsRelationContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.WindowFunctionClauseContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.parser.ParserUtils.createSortOption;
-import static com.amazon.opendistroforelasticsearch.sql.sql.parser.ParserUtils.getTextInQuery;
-
-import com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.DataType;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.Literal;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.QualifiedName;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption;
-import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils;
-import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.AggregateFunctionCallContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.QuerySpecificationContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.SelectSpecContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParserBaseVisitor;
-import com.amazon.opendistroforelasticsearch.sql.sql.parser.AstExpressionBuilder;
+package org.opensearch.sql.sql.parser.context;
+
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.FilteredAggregationFunctionCallContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.GroupByElementContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.OrderByElementContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.SelectClauseContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.SelectElementContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.SubqueryAsRelationContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.WindowFunctionClauseContext;
+import static org.opensearch.sql.sql.parser.ParserUtils.createSortOption;
+import static org.opensearch.sql.sql.parser.ParserUtils.getTextInQuery;
+
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedHashSet;
@@ -60,6 +47,19 @@
 import lombok.Getter;
 import lombok.ToString;
 import org.antlr.v4.runtime.tree.ParseTree;
+import org.opensearch.sql.ast.dsl.AstDSL;
+import org.opensearch.sql.ast.expression.DataType;
+import org.opensearch.sql.ast.expression.Literal;
+import org.opensearch.sql.ast.expression.QualifiedName;
+import org.opensearch.sql.ast.expression.UnresolvedExpression;
+import org.opensearch.sql.ast.tree.Sort.SortOption;
+import org.opensearch.sql.common.utils.StringUtils;
+import org.opensearch.sql.exception.SemanticCheckException;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.AggregateFunctionCallContext;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.QuerySpecificationContext;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.SelectSpecContext;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParserBaseVisitor;
+import org.opensearch.sql.sql.parser.AstExpressionBuilder;
 
 /**
  * Query specification domain that collects basic info for a simple query.
diff --git a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/SQLServiceTest.java b/sql/src/test/java/org/opensearch/sql/sql/SQLServiceTest.java
similarity index 88%
rename from sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/SQLServiceTest.java
rename to sql/src/test/java/org/opensearch/sql/sql/SQLServiceTest.java
index edbb3983af..37e56c623a 100644
--- a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/SQLServiceTest.java
+++ b/sql/src/test/java/org/opensearch/sql/sql/SQLServiceTest.java
@@ -25,24 +25,16 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql;
+package org.opensearch.sql.sql;
 
-import static com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.QueryResponse;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.fail;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
+import static org.opensearch.sql.executor.ExecutionEngine.QueryResponse;
 
-import com.amazon.opendistroforelasticsearch.sql.common.response.ResponseListener;
-import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine;
-import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.ExplainResponse;
-import com.amazon.opendistroforelasticsearch.sql.executor.ExecutionEngine.ExplainResponseNode;
-import com.amazon.opendistroforelasticsearch.sql.planner.physical.PhysicalPlan;
-import com.amazon.opendistroforelasticsearch.sql.sql.config.SQLServiceConfig;
-import com.amazon.opendistroforelasticsearch.sql.sql.domain.SQLQueryRequest;
-import com.amazon.opendistroforelasticsearch.sql.storage.StorageEngine;
 import java.util.Collections;
 import org.json.JSONObject;
 import org.junit.jupiter.api.BeforeEach;
@@ -50,6 +42,14 @@
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
+import org.opensearch.sql.common.response.ResponseListener;
+import org.opensearch.sql.executor.ExecutionEngine;
+import org.opensearch.sql.executor.ExecutionEngine.ExplainResponse;
+import org.opensearch.sql.executor.ExecutionEngine.ExplainResponseNode;
+import org.opensearch.sql.planner.physical.PhysicalPlan;
+import org.opensearch.sql.sql.config.SQLServiceConfig;
+import org.opensearch.sql.sql.domain.SQLQueryRequest;
+import org.opensearch.sql.storage.StorageEngine;
 import org.springframework.context.annotation.AnnotationConfigApplicationContext;
 
 @ExtendWith(MockitoExtension.class)
@@ -220,4 +220,4 @@ public void onFailure(Exception e) {
         });
   }
 
-}
\ No newline at end of file
+}
diff --git a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/antlr/SQLSyntaxParserTest.java b/sql/src/test/java/org/opensearch/sql/sql/antlr/SQLSyntaxParserTest.java
similarity index 97%
rename from sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/antlr/SQLSyntaxParserTest.java
rename to sql/src/test/java/org/opensearch/sql/sql/antlr/SQLSyntaxParserTest.java
index 1ed9a1eb1f..53de19a0fd 100644
--- a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/antlr/SQLSyntaxParserTest.java
+++ b/sql/src/test/java/org/opensearch/sql/sql/antlr/SQLSyntaxParserTest.java
@@ -25,13 +25,13 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.antlr;
+package org.opensearch.sql.sql.antlr;
 
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
-import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxCheckException;
 import org.junit.jupiter.api.Test;
+import org.opensearch.sql.common.antlr.SyntaxCheckException;
 
 class SQLSyntaxParserTest {
 
@@ -160,4 +160,4 @@ public void canParseOrderByClause() {
         "SELECT name, age FROM test ORDER BY name ASC NULLS FIRST, age DESC NULLS LAST"));
   }
 
-}
\ No newline at end of file
+}
diff --git a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/config/SQLServiceConfigTest.java b/sql/src/test/java/org/opensearch/sql/sql/config/SQLServiceConfigTest.java
similarity index 94%
rename from sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/config/SQLServiceConfigTest.java
rename to sql/src/test/java/org/opensearch/sql/sql/config/SQLServiceConfigTest.java
index ab697ab7bb..e75918b521 100644
--- a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/config/SQLServiceConfigTest.java
+++ b/sql/src/test/java/org/opensearch/sql/sql/config/SQLServiceConfigTest.java
@@ -25,7 +25,7 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.config;
+package org.opensearch.sql.sql.config;
 
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
@@ -39,4 +39,4 @@ public void shouldReturnSQLService() {
     assertNotNull(config.sqlService());
   }
 
-}
\ No newline at end of file
+}
diff --git a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/domain/SQLQueryRequestTest.java b/sql/src/test/java/org/opensearch/sql/sql/domain/SQLQueryRequestTest.java
similarity index 97%
rename from sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/domain/SQLQueryRequestTest.java
rename to sql/src/test/java/org/opensearch/sql/sql/domain/SQLQueryRequestTest.java
index 9fe9bbab09..fc34333bfd 100644
--- a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/domain/SQLQueryRequestTest.java
+++ b/sql/src/test/java/org/opensearch/sql/sql/domain/SQLQueryRequestTest.java
@@ -25,18 +25,18 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.domain;
+package org.opensearch.sql.sql.domain;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import com.amazon.opendistroforelasticsearch.sql.protocol.response.format.Format;
 import com.google.common.collect.ImmutableMap;
 import java.util.Map;
 import org.json.JSONObject;
 import org.junit.jupiter.api.Test;
+import org.opensearch.sql.protocol.response.format.Format;
 
 public class SQLQueryRequestTest {
 
@@ -210,4 +210,4 @@ SQLQueryRequest build() {
     }
   }
 
-}
\ No newline at end of file
+}
diff --git a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstAggregationBuilderTest.java b/sql/src/test/java/org/opensearch/sql/sql/parser/AstAggregationBuilderTest.java
similarity index 89%
rename from sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstAggregationBuilderTest.java
rename to sql/src/test/java/org/opensearch/sql/sql/parser/AstAggregationBuilderTest.java
index 816e42ad96..1d9516f816 100644
--- a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstAggregationBuilderTest.java
+++ b/sql/src/test/java/org/opensearch/sql/sql/parser/AstAggregationBuilderTest.java
@@ -25,13 +25,8 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser;
+package org.opensearch.sql.sql.parser;
 
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.aggregate;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.alias;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.function;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.intLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName;
 import static java.util.Collections.emptyList;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.allOf;
@@ -39,17 +34,12 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.opensearch.sql.ast.dsl.AstDSL.aggregate;
+import static org.opensearch.sql.ast.dsl.AstDSL.alias;
+import static org.opensearch.sql.ast.dsl.AstDSL.function;
+import static org.opensearch.sql.ast.dsl.AstDSL.intLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName;
 
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Aggregation;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan;
-import com.amazon.opendistroforelasticsearch.sql.common.antlr.CaseInsensitiveCharStream;
-import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxAnalysisErrorListener;
-import com.amazon.opendistroforelasticsearch.sql.exception.SemanticCheckException;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLLexer;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.QuerySpecificationContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.parser.context.QuerySpecification;
 import java.util.Arrays;
 import java.util.List;
 import java.util.function.Function;
@@ -60,6 +50,16 @@
 import org.junit.jupiter.api.DisplayNameGeneration;
 import org.junit.jupiter.api.DisplayNameGenerator;
 import org.junit.jupiter.api.Test;
+import org.opensearch.sql.ast.expression.UnresolvedExpression;
+import org.opensearch.sql.ast.tree.Aggregation;
+import org.opensearch.sql.ast.tree.UnresolvedPlan;
+import org.opensearch.sql.common.antlr.CaseInsensitiveCharStream;
+import org.opensearch.sql.common.antlr.SyntaxAnalysisErrorListener;
+import org.opensearch.sql.exception.SemanticCheckException;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLLexer;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.QuerySpecificationContext;
+import org.opensearch.sql.sql.parser.context.QuerySpecification;
 
 @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class)
 class AstAggregationBuilderTest {
@@ -304,4 +304,4 @@ private QuerySpecificationContext parse(String query) {
     return parser.querySpecification();
   }
 
-}
\ No newline at end of file
+}
diff --git a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstBuilderTest.java b/sql/src/test/java/org/opensearch/sql/sql/parser/AstBuilderTest.java
similarity index 90%
rename from sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstBuilderTest.java
rename to sql/src/test/java/org/opensearch/sql/sql/parser/AstBuilderTest.java
index bf99958be6..bc1fdfb89c 100644
--- a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstBuilderTest.java
+++ b/sql/src/test/java/org/opensearch/sql/sql/parser/AstBuilderTest.java
@@ -25,39 +25,39 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser;
-
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.agg;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.aggregate;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.alias;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.argument;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.booleanLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.doubleLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.field;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.filter;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.function;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.intLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.limit;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.project;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.relation;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.relationSubquery;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.sort;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.stringLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.values;
-import static com.amazon.opendistroforelasticsearch.sql.utils.SystemIndexUtils.TABLE_INFO;
-import static com.amazon.opendistroforelasticsearch.sql.utils.SystemIndexUtils.mappingTable;
+package org.opensearch.sql.sql.parser;
+
 import static java.util.Collections.emptyList;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.opensearch.sql.ast.dsl.AstDSL.agg;
+import static org.opensearch.sql.ast.dsl.AstDSL.aggregate;
+import static org.opensearch.sql.ast.dsl.AstDSL.alias;
+import static org.opensearch.sql.ast.dsl.AstDSL.argument;
+import static org.opensearch.sql.ast.dsl.AstDSL.booleanLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.doubleLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.field;
+import static org.opensearch.sql.ast.dsl.AstDSL.filter;
+import static org.opensearch.sql.ast.dsl.AstDSL.function;
+import static org.opensearch.sql.ast.dsl.AstDSL.intLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.limit;
+import static org.opensearch.sql.ast.dsl.AstDSL.project;
+import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName;
+import static org.opensearch.sql.ast.dsl.AstDSL.relation;
+import static org.opensearch.sql.ast.dsl.AstDSL.relationSubquery;
+import static org.opensearch.sql.ast.dsl.AstDSL.sort;
+import static org.opensearch.sql.ast.dsl.AstDSL.stringLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.values;
+import static org.opensearch.sql.utils.SystemIndexUtils.TABLE_INFO;
+import static org.opensearch.sql.utils.SystemIndexUtils.mappingTable;
 
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.AllFields;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan;
-import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxCheckException;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.SQLSyntaxParser;
 import com.google.common.collect.ImmutableList;
 import org.antlr.v4.runtime.tree.ParseTree;
 import org.junit.jupiter.api.Test;
+import org.opensearch.sql.ast.expression.AllFields;
+import org.opensearch.sql.ast.tree.UnresolvedPlan;
+import org.opensearch.sql.common.antlr.SyntaxCheckException;
+import org.opensearch.sql.sql.antlr.SQLSyntaxParser;
 
 class AstBuilderTest {
 
@@ -693,4 +693,4 @@ private UnresolvedPlan buildAST(String query) {
     return parseTree.accept(new AstBuilder(query));
   }
 
-}
\ No newline at end of file
+}
diff --git a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstExpressionBuilderTest.java b/sql/src/test/java/org/opensearch/sql/sql/parser/AstExpressionBuilderTest.java
similarity index 79%
rename from sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstExpressionBuilderTest.java
rename to sql/src/test/java/org/opensearch/sql/sql/parser/AstExpressionBuilderTest.java
index 810acffab9..c6a5aeec8c 100644
--- a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstExpressionBuilderTest.java
+++ b/sql/src/test/java/org/opensearch/sql/sql/parser/AstExpressionBuilderTest.java
@@ -25,43 +25,43 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser;
-
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.aggregate;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.and;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.booleanLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.caseWhen;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.dateLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.doubleLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.function;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.intLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.intervalLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.not;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.nullLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.or;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.stringLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.timeLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.timestampLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.when;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.window;
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder.NULL_LAST;
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.ASC;
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.DESC;
+package org.opensearch.sql.sql.parser;
+
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.opensearch.sql.ast.dsl.AstDSL.aggregate;
+import static org.opensearch.sql.ast.dsl.AstDSL.and;
+import static org.opensearch.sql.ast.dsl.AstDSL.booleanLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.caseWhen;
+import static org.opensearch.sql.ast.dsl.AstDSL.dateLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.doubleLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.function;
+import static org.opensearch.sql.ast.dsl.AstDSL.intLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.intervalLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.not;
+import static org.opensearch.sql.ast.dsl.AstDSL.nullLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.or;
+import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName;
+import static org.opensearch.sql.ast.dsl.AstDSL.stringLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.timeLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.timestampLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.when;
+import static org.opensearch.sql.ast.dsl.AstDSL.window;
+import static org.opensearch.sql.ast.tree.Sort.NullOrder.NULL_LAST;
+import static org.opensearch.sql.ast.tree.Sort.SortOrder.ASC;
+import static org.opensearch.sql.ast.tree.Sort.SortOrder.DESC;
 
-import com.amazon.opendistroforelasticsearch.sql.ast.Node;
-import com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.DataType;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption;
-import com.amazon.opendistroforelasticsearch.sql.common.antlr.CaseInsensitiveCharStream;
-import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxAnalysisErrorListener;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLLexer;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser;
 import com.google.common.collect.ImmutableList;
 import org.antlr.v4.runtime.CommonTokenStream;
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.junit.jupiter.api.Test;
+import org.opensearch.sql.ast.Node;
+import org.opensearch.sql.ast.dsl.AstDSL;
+import org.opensearch.sql.ast.expression.DataType;
+import org.opensearch.sql.ast.tree.Sort.SortOption;
+import org.opensearch.sql.common.antlr.CaseInsensitiveCharStream;
+import org.opensearch.sql.common.antlr.SyntaxAnalysisErrorListener;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLLexer;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser;
 
 class AstExpressionBuilderTest {
 
@@ -392,4 +392,4 @@ private Node buildExprAst(String expr) {
     return parser.expression().accept(astExprBuilder);
   }
 
-}
\ No newline at end of file
+}
diff --git a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstHavingFilterBuilderTest.java b/sql/src/test/java/org/opensearch/sql/sql/parser/AstHavingFilterBuilderTest.java
similarity index 79%
rename from sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstHavingFilterBuilderTest.java
rename to sql/src/test/java/org/opensearch/sql/sql/parser/AstHavingFilterBuilderTest.java
index 3e253989ed..12929a4bf3 100644
--- a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstHavingFilterBuilderTest.java
+++ b/sql/src/test/java/org/opensearch/sql/sql/parser/AstHavingFilterBuilderTest.java
@@ -25,19 +25,17 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser;
+package org.opensearch.sql.sql.parser;
 
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.aggregate;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.IdentContext;
-import static com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.QualifiedNameContext;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
+import static org.opensearch.sql.ast.dsl.AstDSL.aggregate;
+import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.IdentContext;
+import static org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.QualifiedNameContext;
 
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression;
-import com.amazon.opendistroforelasticsearch.sql.sql.parser.context.QuerySpecification;
 import com.google.common.collect.ImmutableList;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.DisplayNameGeneration;
@@ -46,6 +44,8 @@
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
+import org.opensearch.sql.ast.expression.UnresolvedExpression;
+import org.opensearch.sql.sql.parser.context.QuerySpecification;
 
 @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class)
 @ExtendWith(MockitoExtension.class)
@@ -73,4 +73,4 @@ void should_replace_alias_with_select_expression() {
     when(querySpec.getSelectItemByAlias(any())).thenReturn(expression);
     assertEquals(expression, builder.visitQualifiedName(qualifiedName));
   }
-}
\ No newline at end of file
+}
diff --git a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstQualifiedNameBuilderTest.java b/sql/src/test/java/org/opensearch/sql/sql/parser/AstQualifiedNameBuilderTest.java
similarity index 86%
rename from sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstQualifiedNameBuilderTest.java
rename to sql/src/test/java/org/opensearch/sql/sql/parser/AstQualifiedNameBuilderTest.java
index bfe6c5eeba..ea780eeb7b 100644
--- a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstQualifiedNameBuilderTest.java
+++ b/sql/src/test/java/org/opensearch/sql/sql/parser/AstQualifiedNameBuilderTest.java
@@ -25,21 +25,21 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser;
+package org.opensearch.sql.sql.parser;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
-import com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL;
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.UnresolvedExpression;
-import com.amazon.opendistroforelasticsearch.sql.common.antlr.CaseInsensitiveCharStream;
-import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxAnalysisErrorListener;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLLexer;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser;
 import java.util.function.Function;
 import lombok.RequiredArgsConstructor;
 import org.antlr.v4.runtime.CommonTokenStream;
 import org.antlr.v4.runtime.tree.RuleNode;
 import org.junit.jupiter.api.Test;
+import org.opensearch.sql.ast.dsl.AstDSL;
+import org.opensearch.sql.ast.expression.UnresolvedExpression;
+import org.opensearch.sql.common.antlr.CaseInsensitiveCharStream;
+import org.opensearch.sql.common.antlr.SyntaxAnalysisErrorListener;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLLexer;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser;
 
 public class AstQualifiedNameBuilderTest {
 
diff --git a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstSortBuilderTest.java b/sql/src/test/java/org/opensearch/sql/sql/parser/AstSortBuilderTest.java
similarity index 73%
rename from sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstSortBuilderTest.java
rename to sql/src/test/java/org/opensearch/sql/sql/parser/AstSortBuilderTest.java
index 7215131b26..881c66bacf 100644
--- a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/AstSortBuilderTest.java
+++ b/sql/src/test/java/org/opensearch/sql/sql/parser/AstSortBuilderTest.java
@@ -25,28 +25,22 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser;
+package org.opensearch.sql.sql.parser;
 
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.argument;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.booleanLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.field;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName;
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder.NULL_FIRST;
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder.NULL_LAST;
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.ASC;
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.DESC;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.mockito.AdditionalAnswers.returnsFirstArg;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.when;
+import static org.opensearch.sql.ast.dsl.AstDSL.argument;
+import static org.opensearch.sql.ast.dsl.AstDSL.booleanLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.field;
+import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName;
+import static org.opensearch.sql.ast.tree.Sort.NullOrder.NULL_FIRST;
+import static org.opensearch.sql.ast.tree.Sort.NullOrder.NULL_LAST;
+import static org.opensearch.sql.ast.tree.Sort.SortOrder.ASC;
+import static org.opensearch.sql.ast.tree.Sort.SortOrder.DESC;
 
-import com.amazon.opendistroforelasticsearch.sql.ast.expression.Argument;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption;
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.UnresolvedPlan;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.OrderByClauseContext;
-import com.amazon.opendistroforelasticsearch.sql.sql.parser.context.QuerySpecification;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import java.util.List;
@@ -56,6 +50,12 @@
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
+import org.opensearch.sql.ast.expression.Argument;
+import org.opensearch.sql.ast.tree.Sort;
+import org.opensearch.sql.ast.tree.Sort.SortOption;
+import org.opensearch.sql.ast.tree.UnresolvedPlan;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.OrderByClauseContext;
+import org.opensearch.sql.sql.parser.context.QuerySpecification;
 
 @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class)
 @ExtendWith(MockitoExtension.class)
@@ -105,4 +105,4 @@ void can_build_sort_node() {
     });
   }
 
-}
\ No newline at end of file
+}
diff --git a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/context/QuerySpecificationTest.java b/sql/src/test/java/org/opensearch/sql/sql/parser/context/QuerySpecificationTest.java
similarity index 80%
rename from sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/context/QuerySpecificationTest.java
rename to sql/src/test/java/org/opensearch/sql/sql/parser/context/QuerySpecificationTest.java
index 9e947fbac8..62ad1dbea3 100644
--- a/sql/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/parser/context/QuerySpecificationTest.java
+++ b/sql/src/test/java/org/opensearch/sql/sql/parser/context/QuerySpecificationTest.java
@@ -25,24 +25,18 @@
  *
  */
 
-package com.amazon.opendistroforelasticsearch.sql.sql.parser.context;
-
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.aggregate;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.alias;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.filteredAggregate;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.function;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.intLiteral;
-import static com.amazon.opendistroforelasticsearch.sql.ast.dsl.AstDSL.qualifiedName;
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.NullOrder;
-import static com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder;
+package org.opensearch.sql.sql.parser.context;
+
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.opensearch.sql.ast.dsl.AstDSL.aggregate;
+import static org.opensearch.sql.ast.dsl.AstDSL.alias;
+import static org.opensearch.sql.ast.dsl.AstDSL.filteredAggregate;
+import static org.opensearch.sql.ast.dsl.AstDSL.function;
+import static org.opensearch.sql.ast.dsl.AstDSL.intLiteral;
+import static org.opensearch.sql.ast.dsl.AstDSL.qualifiedName;
+import static org.opensearch.sql.ast.tree.Sort.NullOrder;
+import static org.opensearch.sql.ast.tree.Sort.SortOrder;
 
-import com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOption;
-import com.amazon.opendistroforelasticsearch.sql.common.antlr.CaseInsensitiveCharStream;
-import com.amazon.opendistroforelasticsearch.sql.common.antlr.SyntaxAnalysisErrorListener;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLLexer;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser;
-import com.amazon.opendistroforelasticsearch.sql.sql.antlr.parser.OpenSearchSQLParser.QuerySpecificationContext;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
@@ -50,6 +44,12 @@
 import org.junit.jupiter.api.DisplayNameGeneration;
 import org.junit.jupiter.api.DisplayNameGenerator;
 import org.junit.jupiter.api.Test;
+import org.opensearch.sql.ast.tree.Sort.SortOption;
+import org.opensearch.sql.common.antlr.CaseInsensitiveCharStream;
+import org.opensearch.sql.common.antlr.SyntaxAnalysisErrorListener;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLLexer;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser;
+import org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser.QuerySpecificationContext;
 
 @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class)
 class QuerySpecificationTest {
@@ -169,4 +169,4 @@ private QuerySpecificationContext parse(String query) {
     return parser.querySpecification();
   }
 
-}
\ No newline at end of file
+}