Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove opensearch.sql.engine.new.enabled setting #70

Merged
merged 5 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions docs/dev/NewSQLEngine.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ For the following features unsupported in the new engine, the query will be forw

You can find all the limitations in [Limitations](/docs/user/limitations/limitations.rst).

### 3.4 What if Something Wrong

No panic! You can roll back to old query engine easily by a plugin setting change. Simply run the command to disable it by [plugin setting](/docs/user/admin/settings.rst#opendistro-sql-engine-new-enabled). Same as other cluster setting change, no need to restart OpenSearch and the change will take effect on next incoming query. Later on please report the issue to us.


---
## 4.How it's Implemented
Expand Down
44 changes: 0 additions & 44 deletions docs/user/admin/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -510,50 +510,6 @@ Result set::
}
}

opensearch.sql.engine.new.enabled
=================================

Description
-----------

We are migrating existing functionalities to a new query engine under development. User can choose to enable the new engine if interested or disable if any issue found.

1. The default value is true.
2. This setting is node scope.
3. This setting can be updated dynamically.


Example
-------

You can update the setting with a new value like this.

SQL query::

>> curl -H 'Content-Type: application/json' -X PUT localhost:9200/_opensearch/_sql/settings -d '{
"transient" : {
"opensearch.sql.engine.new.enabled" : "false"
}
}'

Result set::

{
"acknowledged" : true,
"persistent" : { },
"transient" : {
"opensearch" : {
"sql" : {
"engine" : {
"new" : {
"enabled" : "false"
}
}
}
}
}
}


opensearch.query.size_limit
===========================
Expand Down
2 changes: 0 additions & 2 deletions docs/user/dql/expressions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Introduction

Expressions, particularly value expressions, are those which return a scalar value. Expressions have different types and forms. For example, there are literal values as atom expression and arithmetic, predicate and function expression built on top of them. And also expressions can be used in different clauses, such as using arithmetic expression in ``SELECT``, ``WHERE`` or ``HAVING`` clause.

Note that before you try out examples using the SQL features in this doc, you need to enable the new query engine by following the steps in ``opensearch.sql.engine.new.enabled`` section in `Plugin Settings <../admin/settings.rst>`_.

Literal Values
==============

Expand Down
35 changes: 0 additions & 35 deletions docs/user/dql/newsql.rst

This file was deleted.

35 changes: 1 addition & 34 deletions integ-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,39 +97,8 @@ testClusters.all {
plugin ":plugin"
}

// Run only legacy SQL ITs with new SQL engine disabled
integTest {
dependsOn (':plugin:bundlePlugin',':integ-test:integTestWithNewEngine')

systemProperty 'tests.security.manager', 'false'
systemProperty('project.root', project.projectDir.absolutePath)

systemProperty "https", System.getProperty("https")
systemProperty "user", System.getProperty("user")
systemProperty "password", System.getProperty("password")

// Enable new SQL engine
systemProperty 'enableNewEngine', 'false'

// Set default query size limit
systemProperty 'defaultQuerySizeLimit', '10000'

// Tell the test JVM if the cluster JVM is running under a debugger so that tests can use longer timeouts for
// requests. The 'doFirst' delays reading the debug setting on the cluster till execution time.
doFirst { systemProperty 'cluster.debug', getDebug()}

if (System.getProperty("test.debug") != null) {
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005'
}

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
task integTestWithNewEngine(type: RestIntegTestTask) {
integTest {
dependsOn ':plugin:bundlePlugin'

systemProperty 'tests.security.manager', 'false'
Expand Down Expand Up @@ -167,8 +136,6 @@ task integTestWithNewEngine(type: RestIntegTestTask) {
}




task docTest(type: RestIntegTestTask) {
dependsOn ':plugin:bundlePlugin'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
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 java.util.Arrays;
import java.util.EnumSet;
Expand Down Expand Up @@ -159,16 +158,6 @@ public void cursorDefaultContextKeepAliveSetting() {
);
}

@Section(10)
public void sqlNewQueryEngineSetting() {
docSetting(
SQL_NEW_ENGINE_ENABLED,
"We are migrating existing functionalities to a new query engine under development. " +
"User can choose to enable the new engine if interested or disable if any issue found.",
true
);
}

/**
* Generate content for sample queries with setting changed to new value.
* Finally setting will be reverted to avoid potential impact on other test cases.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public void noGroupKeyAvgOnIntegerShouldPass() {

@Test
public void hasGroupKeyAvgOnIntegerShouldPass() {
Assume.assumeTrue(isNewQueryEngineEabled());
JSONObject response = executeJdbcRequest(String.format(
"SELECT gender, AVG(age) as avg " +
"FROM %s " +
Expand Down Expand Up @@ -193,8 +192,6 @@ public void AddLiteralOnGroupKeyShouldPass() {

@Test
public void logWithAddLiteralOnGroupKeyShouldPass() {
Assume.assumeTrue(isNewQueryEngineEabled());

JSONObject response = executeJdbcRequest(String.format(
"SELECT gender, Log(age+10) as logAge, max(balance) as max " +
"FROM %s " +
Expand Down Expand Up @@ -272,8 +269,6 @@ public void groupByDateWithAliasShouldPass() {

@Test
public void aggregateCastStatementShouldNotReturnZero() {
Assume.assumeTrue(isNewQueryEngineEabled());

JSONObject response = executeJdbcRequest(String.format(
"SELECT SUM(CAST(male AS INT)) AS male_sum FROM %s",
Index.BANK.getName()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
import org.json.JSONArray;
import org.json.JSONObject;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Ignore;
import org.junit.Test;

Expand Down Expand Up @@ -482,8 +481,6 @@ public void orderByAscTest() {

@Test
public void orderByAliasAscTest() {
Assume.assumeTrue(isNewQueryEngineEabled());

JSONObject response = executeJdbcRequest(String.format("SELECT COUNT(*) as count FROM %s " +
"GROUP BY gender ORDER BY count", TEST_INDEX_ACCOUNT));

Expand All @@ -506,8 +503,6 @@ public void orderByDescTest() throws IOException {

@Test
public void orderByAliasDescTest() throws IOException {
Assume.assumeTrue(isNewQueryEngineEabled());

JSONObject response = executeJdbcRequest(String.format("SELECT COUNT(*) as count FROM %s " +
"GROUP BY gender ORDER BY count DESC", TEST_INDEX_ACCOUNT));

Expand All @@ -519,8 +514,6 @@ public void orderByAliasDescTest() throws IOException {

@Test
public void orderByGroupFieldWithAlias() throws IOException {
Assume.assumeTrue(isNewQueryEngineEabled());

// ORDER BY field name
JSONObject response = executeJdbcRequest(String.format("SELECT gender as g, COUNT(*) as count "
+ "FROM %s GROUP BY gender ORDER BY gender", TEST_INDEX_ACCOUNT));
Expand Down
Loading