You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Vladimir Steshin (Jira)" <ji...@apache.org> on 2020/02/19 15:16:00 UTC

[jira] [Created] (IGNITE-12704) Fail of recognition of default scheme in SQL queries.

Vladimir Steshin created IGNITE-12704:
-----------------------------------------

             Summary: Fail of recognition of default scheme in SQL queries.
                 Key: IGNITE-12704
                 URL: https://issues.apache.org/jira/browse/IGNITE-12704
             Project: Ignite
          Issue Type: Bug
            Reporter: Vladimir Steshin


Got a connectionConnection conn = ...;

// execute() - is just a helper function. Creates prepared statement, pass params...

// Get all the tables.
List<List<?>> lst = execute(conn, "select SCHEMA_NAME, TABLE_NAME from
SYS.TABLES");

for( List<?> row : lst ){
        String schemaName = (String)row.get(0);
        String tableName = (String)row.get(1);

        // Shows: "schema: default, table: PERSON"
        System.out.println("schema: " +  schemName + ", table: " +
tableName));

        // Fails with with: java.sql.SQLException: Failed to parse query.
Схема "DEFAULT" не найдена
        execute( conn, "drop table "+schemaName + "."+tableName+"'" );
}

I think this case should fail with error like "only cache created tables
can be removed with drop table. ", not with "scheme not found."
SQL-engine is supposed to accept and understand values it returns itself.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)