Volodymyr Vysotskyi created CALCITE-2084:
--------------------------------------------
Summary: SqlValidatorImpl.findTable() method incorrectly handles
table schema with few schema levels
Key: CALCITE-2084
URL: https://issues.apache.org/jira/browse/CALCITE-2084
Project: Calcite
Issue Type: Bug
Reporter: Volodymyr Vysotskyi
Assignee: Julian Hyde
[{{SqlValidatorImpl.findTable()}}|https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3423]
method contains code
{code:java}
String schemaName = names.get(0);
String tableName = names.get(1);
CalciteSchema schema =
catalogReader.getRootSchema().getSubSchemaMap().get(schemaName);
if (schema == null) {
return null;
}
CalciteSchema.TableEntry entry = schema.getTable(tableName,
catalogReader.nameMatcher().isCaseSensitive());
{code}
where {{names}} is a list with schema paths and table name.
For the cases when a table in the schema, which nested into another schema
(schema1.schema2.table, etc), a required table could not be found.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)