diff --git a/.github/workflows/sql-test-and-build-workflow.yml b/.github/workflows/sql-test-and-build-workflow.yml index 32b4a10ce9..3d94bcc006 100644 --- a/.github/workflows/sql-test-and-build-workflow.yml +++ b/.github/workflows/sql-test-and-build-workflow.yml @@ -2,9 +2,6 @@ name: SQL Java CI on: [push, pull_request] -env: - OPENSEARCH_VERSION: '2.0.0-SNAPSHOT' - jobs: build: strategy: @@ -24,7 +21,7 @@ jobs: java-version: ${{ matrix.java }} - name: Build with Gradle - run: ./gradlew build assemble -Dopensearch.version=${{ env.OPENSEARCH_VERSION }} + run: ./gradlew build assemble - name: Run backward compatibility tests run: ./bwctest.sh diff --git a/build.gradle b/build.gradle index 15c14df69e..9c5842490c 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { ext { - opensearch_version = System.getProperty("opensearch.version", "2.0.0-SNAPSHOT") + opensearch_version = System.getProperty("opensearch.version", "2.0.0-alpha1-SNAPSHOT") } repositories { @@ -37,10 +37,15 @@ repositories { ext { isSnapshot = "true" == System.getProperty("build.snapshot", "true") + buildVersionQualifier = System.getProperty("build.version_qualifier", "alpha1") } allprojects { - version = opensearch_version - "-SNAPSHOT" + ".0" + version = opensearch_version.tokenize('-')[0] + '.0' + if (buildVersionQualifier) { + version += "-${buildVersionQualifier}" + } + if (isSnapshot) { version += "-SNAPSHOT" } diff --git a/bwctest.sh b/bwctest.sh index 07365399b7..76d603c941 100755 --- a/bwctest.sh +++ b/bwctest.sh @@ -34,7 +34,7 @@ function setup_bwc_artifact() { # then converts to plugin version by appending ".0" (e.g. 1.2.0.0-SNAPSHOT), # assuming one line in build.gradle is 'opensearch_version= System.getProperty("opensearch.version", "")'. plugin_version=$(grep 'opensearch_version = System.getProperty' build.gradle | \ - grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+[^"]*' | sed -e 's/\([0-9]\)\([^0-9]*\)$/\1.0\2/') + grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+[^"]*' | sed -e 's/\(.*\)\(\.[0-9]\)/\1\2.0/') plugin_artifact="./plugin/build/distributions/opensearch-sql-$plugin_version.zip" bwc_artifact_dir="./integ-test/src/test/resources/bwc/$plugin_version" diff --git a/integ-test/build.gradle b/integ-test/build.gradle index de0b4d635f..9f37b910b2 100644 --- a/integ-test/build.gradle +++ b/integ-test/build.gradle @@ -53,8 +53,9 @@ 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:31.0.1-jre' - resolutionStrategy.force 'com.fasterxml.jackson.core:jackson-core:2.12.6' - resolutionStrategy.force 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.12.6' + resolutionStrategy.force 'com.fasterxml.jackson.core:jackson-core:2.13.2' + resolutionStrategy.force 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.13.2' + resolutionStrategy.force 'com.fasterxml.jackson.core:jackson-databind:2.13.2.2' } dependencies { diff --git a/integ-test/src/test/java/org/opensearch/sql/legacy/JoinAliasWriterRuleIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/JoinAliasWriterRuleIT.java index 4519fab58f..31c77fa7c0 100644 --- a/integ-test/src/test/java/org/opensearch/sql/legacy/JoinAliasWriterRuleIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/JoinAliasWriterRuleIT.java @@ -81,6 +81,7 @@ public void bothTableAliasNoCommonColumns() throws IOException { } @Test + @Ignore public void tableNamesWithTypeName() throws IOException { sameExplain( query( diff --git a/integ-test/src/test/java/org/opensearch/sql/legacy/QueryIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/QueryIT.java index 00813818c2..96ce82a75e 100644 --- a/integ-test/src/test/java/org/opensearch/sql/legacy/QueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/QueryIT.java @@ -755,7 +755,7 @@ public void dateSearchBraces() throws IOException { JSONObject response = executeQuery( String.format(Locale.ROOT, - "SELECT odbc_time FROM %s/odbc WHERE odbc_time < {ts '2015-03-15 00:00:00.000'}", + "SELECT odbc_time FROM %s WHERE odbc_time < {ts '2015-03-15 00:00:00.000'}", TestsConstants.TEST_INDEX_ODBC)); JSONArray hits = getHits(response); for (int i = 0; i < hits.length(); i++) { diff --git a/integ-test/src/test/java/org/opensearch/sql/legacy/SourceFieldIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/SourceFieldIT.java index 7ad0114944..91c8321c95 100644 --- a/integ-test/src/test/java/org/opensearch/sql/legacy/SourceFieldIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/SourceFieldIT.java @@ -32,7 +32,7 @@ protected void init() throws Exception { @Test public void includeTest() throws IOException { SearchHits response = query(String.format( - "SELECT include('*name','*ge'),include('b*'),include('*ddre*'),include('gender') FROM %s/account LIMIT 1000", + "SELECT include('*name','*ge'),include('b*'),include('*ddre*'),include('gender') FROM %s LIMIT 1000", TEST_INDEX_ACCOUNT)); for (SearchHit hit : response.getHits()) { Set keySet = hit.getSourceAsMap().keySet(); @@ -48,7 +48,7 @@ public void includeTest() throws IOException { public void excludeTest() throws IOException { SearchHits response = query(String.format( - "SELECT exclude('*name','*ge'),exclude('b*'),exclude('*ddre*'),exclude('gender') FROM %s/account LIMIT 1000", + "SELECT exclude('*name','*ge'),exclude('b*'),exclude('*ddre*'),exclude('gender') FROM %s LIMIT 1000", TEST_INDEX_ACCOUNT)); for (SearchHit hit : response.getHits()) { @@ -65,7 +65,7 @@ public void excludeTest() throws IOException { public void allTest() throws IOException { SearchHits response = query(String.format( - "SELECT exclude('*name','*ge'),include('b*'),exclude('*ddre*'),include('gender') FROM %s/account LIMIT 1000", + "SELECT exclude('*name','*ge'),include('b*'),exclude('*ddre*'),include('gender') FROM %s LIMIT 1000", TEST_INDEX_ACCOUNT)); for (SearchHit hit : response.getHits()) { diff --git a/legacy/build.gradle b/legacy/build.gradle index 888409e1ee..f605ced7ba 100644 --- a/legacy/build.gradle +++ b/legacy/build.gradle @@ -104,6 +104,5 @@ dependencies { testImplementation group: 'org.hamcrest', name: 'hamcrest-core', version:'2.2' testImplementation group: 'org.mockito', name: 'mockito-inline', version:'3.12.4' testImplementation group: 'junit', name: 'junit', version: '4.13.2' - testImplementation group: "org.opensearch.client", name: 'transport', version: "${opensearch_version}" } diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/domain/From.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/From.java index 033d3da67a..6455df727c 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/domain/From.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/From.java @@ -14,7 +14,6 @@ */ public class From { private String index; - private String type; private String alias; /** @@ -23,22 +22,7 @@ public class From { * @param from The part after the FROM keyword. */ public From(String from) { - if (from.startsWith("<")) { - index = from; - if (!from.endsWith(">")) { - int i = from.lastIndexOf('/'); - if (-1 < i) { - index = from.substring(0, i); - type = from.substring(i + 1); - } - } - return; - } - String[] parts = from.split("/"); - this.index = parts[0].trim(); - if (parts.length == 2) { - this.type = parts[1].trim(); - } + index = from; } public From(String from, String alias) { @@ -54,14 +38,6 @@ public void setIndex(String index) { this.index = index; } - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - public String getAlias() { return alias; } @@ -73,9 +49,6 @@ public void setAlias(String alias) { @Override public String toString() { StringBuilder str = new StringBuilder(index); - if (type != null) { - str.append('/').append(type); - } if (alias != null) { str.append(" AS ").append(alias); } diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/domain/Query.java b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Query.java index 0140984495..b0538591b8 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/domain/Query.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/domain/Query.java @@ -44,25 +44,4 @@ public String[] getIndexArr() { } return indexArr; } - - /** - * Get the types the query refer to. - * - * @return list of strings, the types names - */ - public String[] getTypeArr() { - List list = new ArrayList<>(); - From index = null; - for (int i = 0; i < from.size(); i++) { - index = from.get(i); - if (index.getType() != null && index.getType().trim().length() > 0) { - list.add(index.getType()); - } - } - if (list.size() == 0) { - return null; - } - - return list.toArray(new String[list.size()]); - } } diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMapping.java b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMapping.java index 9389b0fe8f..bc6c26a6d6 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMapping.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/FieldMapping.java @@ -118,8 +118,8 @@ public String path() { */ @SuppressWarnings("unchecked") public String type() { - FieldMappingMetadata metaData = typeMappings.getOrDefault(fieldName, FieldMappingMetadata.NULL); - if (metaData.isNull()) { + FieldMappingMetadata metaData = typeMappings.get(fieldName); + if (metaData == null) { return DescribeResultSet.DEFAULT_OBJECT_DATATYPE; } diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/IndexMappings.java b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/IndexMappings.java index 73eafe741d..a1b54faddf 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/IndexMappings.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/esdomain/mapping/IndexMappings.java @@ -48,7 +48,7 @@ public IndexMappings() { public IndexMappings(Metadata metaData) { this.indexMappings = buildMappings(metaData.indices(), - indexMetaData -> new FieldMappings(indexMetaData.getMappings().valuesIt().next())); + indexMetaData -> new FieldMappings(indexMetaData.mapping())); } public IndexMappings(ImmutableOpenMap mappings) { diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/BindingTupleResultSet.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/BindingTupleResultSet.java index b50ac49894..c3b5d2e84d 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/BindingTupleResultSet.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/BindingTupleResultSet.java @@ -36,7 +36,7 @@ public static Schema buildSchema(List columnNodes) { node.getAlias(), node.getType())) .collect(Collectors.toList()); - return new Schema("dummy", "dummy", columnList); + return new Schema(columnList); } @VisibleForTesting diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/Schema.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/Schema.java index 8e39ef291f..e02841fcd6 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/Schema.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/Schema.java @@ -18,7 +18,6 @@ public class Schema implements Iterable { private String indexName; - private String typeName; private List columns; private static Set types; @@ -27,9 +26,8 @@ public class Schema implements Iterable { types = getTypes(); } - public Schema(String indexName, String typeName, List columns) { + public Schema(String indexName, List columns) { this.indexName = indexName; - this.typeName = typeName; this.columns = columns; } @@ -46,10 +44,6 @@ public String getIndexName() { return indexName; } - public String getTypeName() { - return typeName; - } - public List getHeaders() { return columns.stream() .map(column -> column.getName()) diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/SelectResultSet.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/SelectResultSet.java index 47fbed3414..8e9d48ce06 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/SelectResultSet.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/format/SelectResultSet.java @@ -69,7 +69,6 @@ public class SelectResultSet extends ResultSet { private boolean selectAll; private String indexName; - private String typeName; private List columns = new ArrayList<>(); private ColumnTypeProvider outputColumnType; @@ -105,7 +104,7 @@ public SelectResultSet(Client client, } else { loadFromEsState(query); } - this.schema = new Schema(indexName, typeName, columns); + this.schema = new Schema(indexName, columns); this.head = schema.getHeaders(); this.dateFieldFormatter = new DateFieldFormatter(indexName, columns, fieldAliasMap); @@ -142,7 +141,7 @@ public void populateResultSetFromCursor(Cursor cursor) { private void populateResultSetFromDefaultCursor(DefaultCursor cursor) { this.columns = cursor.getColumns(); - this.schema = new Schema(null, null, columns); + this.schema = new Schema(columns); this.head = schema.getHeaders(); this.dateFieldFormatter = new DateFieldFormatter( cursor.getIndexPattern(), @@ -163,7 +162,6 @@ private void populateResultSetFromDefaultCursor(DefaultCursor cursor) { */ private void loadFromEsState(Query query) { String indexName = fetchIndexName(query); - String typeName = fetchTypeName(query); String[] fieldNames = fetchFieldsAsArray(query); // Reset boolean in the case of JOIN query where multiple calls to loadFromEsState() are made @@ -171,42 +169,20 @@ private void loadFromEsState(Query query) { GetFieldMappingsRequest request = new GetFieldMappingsRequest() .indices(indexName) - .types(emptyArrayIfNull(typeName)) .fields(selectAllFieldsIfEmpty(fieldNames)) .local(true); GetFieldMappingsResponse response = client.admin().indices() .getFieldMappings(request) .actionGet(); - Map>> mappings = response.mappings(); - if (mappings.isEmpty()) { + Map> mappings = response.mappings(); + if (mappings.isEmpty() || !mappings.containsKey(indexName)) { throw new IllegalArgumentException(String.format("Index type %s does not exist", query.getFrom())); } + Map typeMappings = mappings.get(indexName); - // Assumption is all indices share the same mapping which is validated in TermFieldRewriter. - Map> indexMappings = mappings.values().iterator().next(); - - // if index mappings size is 0 and the expression is a cast: that means that we are casting by alias - // if so, add the original field that was being looked at to the mapping (how?) - - /* - * There are three cases regarding type name to consider: - * 1. If the correct type name was given, its typeMapping is retrieved - * 2. If the incorrect type name was given then the response is null - * 3. If no type name is given, the indexMapping is searched for a typeMapping - */ - Map typeMappings = new HashMap<>(); - if (indexMappings.containsKey(typeName)) { - typeMappings = indexMappings.get(typeName); - } else { - // Assuming OpenSearch version 6.x, there can be only one type per index so this for loop should grab the only type - for (String type : indexMappings.keySet()) { - typeMappings = indexMappings.get(type); - } - } this.indexName = this.indexName == null ? indexName : (this.indexName + "|" + indexName); - this.typeName = this.typeName == null ? typeName : (this.typeName + "|" + typeName); this.columns.addAll(renameColumnWithTableAlias(query, populateColumns(query, fieldNames, typeMappings))); } @@ -289,10 +265,6 @@ private String fetchIndexName(Query query) { return query.getFrom().get(0).getIndex(); } - private String fetchTypeName(Query query) { - return query.getFrom().get(0).getType(); - } - /** * queryResult is checked to see if it's of type Aggregation in which case the aggregation fields in GROUP BY * are returned as well. This prevents returning a Schema of all fields when SELECT * is called with diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/parser/SqlParserTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/parser/SqlParserTest.java index 40e5498866..354c6ff8a1 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/parser/SqlParserTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/parser/SqlParserTest.java @@ -251,10 +251,10 @@ private boolean fieldExist(List fields, String fieldName) { public void joinParseFromsAreSplitedCorrectly() throws SqlParseException { String query = "SELECT a.firstname ,a.lastname , a.gender , d.holdersName ,d.name FROM " + TestsConstants.TEST_INDEX_ACCOUNT + - "/account a " + + " a " + "LEFT JOIN " + TEST_INDEX_DOG + - "/dog d on d.holdersName = a.firstname" + + " d on d.holdersName = a.firstname" + " WHERE a.firstname = 'eliran' AND " + " (a.age > 10 OR a.balance > 2000)" + " AND d.age > 1"; @@ -264,17 +264,16 @@ public void joinParseFromsAreSplitedCorrectly() throws SqlParseException { Assert.assertNotNull(t1From); Assert.assertEquals(1, t1From.size()); - Assert.assertTrue(checkFrom(t1From.get(0), TestsConstants.TEST_INDEX_ACCOUNT, "account", "a")); + Assert.assertTrue(checkFrom(t1From.get(0), TestsConstants.TEST_INDEX_ACCOUNT, "a")); List t2From = joinSelect.getSecondTable().getFrom(); Assert.assertNotNull(t2From); Assert.assertEquals(1, t2From.size()); - Assert.assertTrue(checkFrom(t2From.get(0), TEST_INDEX_DOG, "dog", "d")); + Assert.assertTrue(checkFrom(t2From.get(0), TEST_INDEX_DOG, "d")); } - private boolean checkFrom(From from, String index, String type, String alias) { - return from.getAlias().equals(alias) && from.getIndex().equals(index) - && from.getType().equals(type); + private boolean checkFrom(From from, String index, String alias) { + return from.getAlias().equals(alias) && from.getIndex().equals(index); } @Test @@ -462,14 +461,13 @@ public void indexWithSpacesWithinBrackets() throws SqlParseException { @Test public void indexWithSpacesWithTypeWithinBrackets() throws SqlParseException { - String query = "SELECT insert_time FROM [Test Index]/type1 WHERE age > 3"; + String query = "SELECT insert_time FROM [Test Index] WHERE age > 3"; SQLExpr sqlExpr = queryToExpr(query); Select select = parser.parseSelect((SQLQueryExpr) sqlExpr); List fromList = select.getFrom(); Assert.assertEquals(1, fromList.size()); From from = fromList.get(0); Assert.assertEquals("Test Index", from.getIndex()); - Assert.assertEquals("type1", from.getType()); } @@ -487,17 +485,17 @@ public void fieldWithSpacesWithinBrackets() throws SqlParseException { @Test public void twoIndices() throws SqlParseException { - String query = "SELECT insert_time FROM index1/type1 , index2/type2 WHERE age > 3"; + String query = "SELECT insert_time FROM index1, index2 WHERE age > 3"; SQLExpr sqlExpr = queryToExpr(query); Select select = parser.parseSelect((SQLQueryExpr) sqlExpr); List fromList = select.getFrom(); Assert.assertEquals(2, fromList.size()); From from1 = fromList.get(0); From from2 = fromList.get(1); - boolean preservedOrder = from1.getIndex().equals("index1") && from1.getType().equals("type1") - && from2.getIndex().equals("index2") && from2.getType().equals("type2"); - boolean notPreservedOrder = from1.getIndex().equals("index2") && from1.getType().equals("type2") - && from2.getIndex().equals("index1") && from2.getType().equals("type1"); + boolean preservedOrder = from1.getIndex().equals("index1") + && from2.getIndex().equals("index2"); + boolean notPreservedOrder = from1.getIndex().equals("index2") + && from2.getIndex().equals("index1"); Assert.assertTrue(preservedOrder || notPreservedOrder); } diff --git a/opensearch/build.gradle b/opensearch/build.gradle index bbc2a0ba82..e8570d4610 100644 --- a/opensearch/build.gradle +++ b/opensearch/build.gradle @@ -32,9 +32,9 @@ dependencies { api project(':core') api group: 'org.opensearch', name: 'opensearch', version: "${opensearch_version}" implementation "io.github.resilience4j:resilience4j-retry:1.5.0" - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.12.6' - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.6' - implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: '2.12.6' + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.13.2' + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.2.2' + implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: '2.13.2' implementation group: 'org.json', name: 'json', version:'20180813' compileOnly group: 'org.opensearch.client', name: 'opensearch-rest-high-level-client', version: "${opensearch_version}" implementation group: 'org.opensearch', name:'opensearch-ml-client', version: '1.3.0.0-SNAPSHOT' diff --git a/plugin/build.gradle b/plugin/build.gradle index 7fa24f62a5..d0ffedbcaf 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -57,11 +57,12 @@ configurations.all { // conflict with spring-jcl exclude group: "commons-logging", module: "commons-logging" // enforce 2.12.6, https://github.com/opensearch-project/sql/issues/424 - resolutionStrategy.force 'com.fasterxml.jackson.core:jackson-core:2.12.6' + resolutionStrategy.force 'com.fasterxml.jackson.core:jackson-core:2.13.2' // 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:31.0.1-jre' - resolutionStrategy.force 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.12.6' + resolutionStrategy.force 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.13.2' + resolutionStrategy.force 'com.fasterxml.jackson.core:jackson-databind:2.13.2.2' } dependencies { diff --git a/protocol/build.gradle b/protocol/build.gradle index 428b244795..7cca4aa0a9 100644 --- a/protocol/build.gradle +++ b/protocol/build.gradle @@ -30,9 +30,9 @@ plugins { dependencies { implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.12.6' - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.6' - implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: '2.12.6' + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.13.2' + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.2.2' + implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: '2.13.2' implementation 'com.google.code.gson:gson:2.8.9' implementation project(':core') implementation project(':opensearch') @@ -43,6 +43,10 @@ dependencies { testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4' } +configurations.all { + resolutionStrategy.force 'com.fasterxml.jackson.core:jackson-databind:2.13.2.2' +} + test { useJUnitPlatform() testLogging { diff --git a/sql-jdbc/build.gradle b/sql-jdbc/build.gradle index 9042968e7c..843651e40c 100644 --- a/sql-jdbc/build.gradle +++ b/sql-jdbc/build.gradle @@ -46,7 +46,7 @@ repositories { dependencies { implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.6' - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.6' + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.2.2' implementation group: 'com.amazonaws', name: 'aws-java-sdk-core', version: '1.11.452' testImplementation('org.junit.jupiter:junit-jupiter-api:5.3.1') diff --git a/workbench/public/components/Main/__snapshots__/main.test.tsx.snap b/workbench/public/components/Main/__snapshots__/main.test.tsx.snap index d3e6f1b31d..f40a1813a7 100644 --- a/workbench/public/components/Main/__snapshots__/main.test.tsx.snap +++ b/workbench/public/components/Main/__snapshots__/main.test.tsx.snap @@ -25,7 +25,7 @@ exports[`
spec click clear button 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" >
spec click clear button 1`] = ` query-language-swtich
-
- - -
-
+ +
+ +
@@ -121,7 +115,7 @@ exports[`
spec click clear button 1`] = ` />
spec click clear button 1`] = ` data-test-subj="codeEditorContainer" style="width: 100%; height: 7rem;" > -

spec click clear button 1`] = ` > When you're done, press Escape to stop editing.

-
+
spec click clear button 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" > -
-
+ +
+ +
@@ -500,7 +486,7 @@ exports[`
spec click run button, and response causes an error 1`] = ` />
spec click run button, and response causes an error 1`] = ` data-test-subj="codeEditorContainer" style="width: 100%; height: 7rem;" > -

spec click run button, and response causes an error 1`] = ` > When you're done, press Escape to stop editing.

-
+
spec click run button, and response causes an error 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" > -
-
+ +
+ +
@@ -879,7 +857,7 @@ exports[`
spec click run button, and response is not ok 1`] = ` />
spec click run button, and response is not ok 1`] = ` data-test-subj="codeEditorContainer" style="width: 100%; height: 7rem;" > -

spec click run button, and response is not ok 1`] = ` > When you're done, press Escape to stop editing.

-
+
spec click run button, and response is not ok 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" > -
-
+ +
+ +
@@ -1258,7 +1228,7 @@ exports[`
spec click run button, and response is ok 1`] = ` />
spec click run button, and response is ok 1`] = ` data-test-subj="codeEditorContainer" style="width: 100%; height: 7rem;" > -

spec click run button, and response is ok 1`] = ` > When you're done, press Escape to stop editing.

-
+
spec click run button, and response is ok 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" > -
-
+ +
+ +
@@ -1637,7 +1599,7 @@ exports[`
spec click run button, response fills null and missing values />
spec click run button, response fills null and missing values data-test-subj="codeEditorContainer" style="width: 100%; height: 7rem;" > -

spec click run button, response fills null and missing values > When you're done, press Escape to stop editing.

-
+
spec click run button, response fills null and missing values class="euiFlexItem euiFlexItem--flexGrowZero" > -
-
+ +
+ +
@@ -2019,7 +1973,7 @@ exports[`
spec click translation button, and response is ok 1`] = ` />
spec click translation button, and response is ok 1`] = ` data-test-subj="codeEditorContainer" style="width: 100%; height: 7rem;" > -

spec click translation button, and response is ok 1`] = ` > When you're done, press Escape to stop editing.

-
+
spec click translation button, and response is ok 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" > -
-
+ +
+ +
@@ -2398,7 +2344,7 @@ exports[`
spec renders the component 1`] = ` />
spec renders the component 1`] = ` data-test-subj="codeEditorContainer" style="width: 100%; height: 7rem;" > -

spec renders the component 1`] = ` > When you're done, press Escape to stop editing.

-
+
spec renders the component 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" >
spec renders the component 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero sql-editor-buttons" >
spec tests the action buttons 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero sql-editor-buttons" > -
-
+ +
+ +
diff --git a/workbench/public/components/QueryResults/__snapshots__/QueryResults.test.tsx.snap b/workbench/public/components/QueryResults/__snapshots__/QueryResults.test.tsx.snap index 9411b874ea..ece3aaed62 100644 --- a/workbench/public/components/QueryResults/__snapshots__/QueryResults.test.tsx.snap +++ b/workbench/public/components/QueryResults/__snapshots__/QueryResults.test.tsx.snap @@ -7,7 +7,7 @@ exports[` spec renders the component with no data 2`] = `undefin exports[` spec renders the component to test tabs down arrow 1`] = `
spec renders the component to test tabs down > spec renders the component to test tabs down scope="col" style="width: 27px;" > -
-
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > category -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > currency -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > customer_first_name -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > customer_full_name -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > customer_gender -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > customer_id -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > customer_last_name -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > customer_phone -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > day_of_week -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > day_of_week_i -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > email -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > manufacturer -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > order_date -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > order_id -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > products -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > sku -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > taxful_total_price -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > taxless_total_price -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > total_quantity -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > total_unique_products -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > type -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > user -
+ spec renders the component to test tabs down scope="col" style="width: 155px;" > -
spec renders the component to test tabs down > geoip -
+ @@ -774,7 +774,7 @@ exports[` spec renders the component to test tabs down >
spec renders component with mock QueryResults data class="euiSideNavItemButton__content" > @@ -5631,17 +5617,17 @@ exports[` spec renders component with mock QueryResults data > category - EuiIconMock
@@ -5657,13 +5643,14 @@ exports[` spec renders component with mock QueryResults data > manufacturer @@ -5683,7 +5670,8 @@ exports[` spec renders component with mock QueryResults data class="euiSideNavItemButton__content" >
spec renders component with mock QueryResults data > products - EuiIconMock @@ -5782,17 +5770,17 @@ exports[` spec renders component with mock QueryResults data > sku - EuiIconMock @@ -5808,17 +5796,17 @@ exports[` spec renders component with mock QueryResults data > geoip - EuiIconMock @@ -5844,7 +5832,7 @@ exports[` spec renders component with mock QueryResults data > @@ -10042,7 +10030,7 @@ exports[` spec renders component with mock QueryResults data >
spec renders the component 2`] = ` data-test-subj="codeEditorContainer" style="width: 100%;" > -

spec renders the component 2`] = ` > When you're done, press Escape to stop editing.

-
+
spec renders the component 1`] = `
spec renders the component 1`] = ` data-test-subj="codeEditorContainer" style="width: 100%; height: 7rem;" > -

spec renders the component 1`] = ` > When you're done, press Escape to stop editing.

-
+
spec renders the component 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" >
spec tests the action buttons 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" >
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > category -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > currency -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > customer_first_name -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > customer_full_name -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > customer_gender -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > customer_id -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > customer_last_name -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > customer_phone -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > day_of_week -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > day_of_week_i -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > email -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > manufacturer -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > order_date -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > order_id -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > products -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > sku -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > taxful_total_price -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > taxless_total_price -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > total_quantity -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > total_unique_products -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > type -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > user -
+
spec renders component with mock QueryResults data scope="col" style="width: 155px;" > -
spec renders component with mock QueryResults data > geoip -
+