diff --git a/x-pack/plugin/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/jdbc/JdbcDatabaseMetaData.java b/x-pack/plugin/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/jdbc/JdbcDatabaseMetaData.java index 5cb63a3376348..d2e24f3edac4a 100644 --- a/x-pack/plugin/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/jdbc/JdbcDatabaseMetaData.java +++ b/x-pack/plugin/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/jdbc/JdbcDatabaseMetaData.java @@ -368,7 +368,7 @@ public boolean isCatalogAtStart() throws SQLException { @Override public String getCatalogSeparator() throws SQLException { - return "."; + return ":"; } @Override diff --git a/x-pack/plugin/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/jdbc/JdbcDatabaseMetaDataTests.java b/x-pack/plugin/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/jdbc/JdbcDatabaseMetaDataTests.java new file mode 100644 index 0000000000000..cfa6e797260cb --- /dev/null +++ b/x-pack/plugin/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/jdbc/JdbcDatabaseMetaDataTests.java @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +package org.elasticsearch.xpack.sql.jdbc.jdbc; + +import org.elasticsearch.test.ESTestCase; + +public class JdbcDatabaseMetaDataTests extends ESTestCase { + + private JdbcDatabaseMetaData md = new JdbcDatabaseMetaData(null); + + public void testSeparators() throws Exception { + assertEquals(":", md.getCatalogSeparator()); + assertEquals("\"", md.getIdentifierQuoteString()); + assertEquals("\\", md.getSearchStringEscape()); + + } +}