[ https://issues.apache.org/jira/browse/CALCITE-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maryann Xue resolved CALCITE-1571. ---------------------------------- Resolution: Fixed Fix Version/s: 1.12.0 Thank you, [~julianhyde], for the review! Fixed in https://git1-us-west.apache.org/repos/asf?p=calcite.git;a=commit;h=2c2b883. > Could not resolve VIEW with SimpleCalciteSchema > ----------------------------------------------- > > Key: CALCITE-1571 > URL: https://issues.apache.org/jira/browse/CALCITE-1571 > Project: Calcite > Issue Type: Bug > Components: core > Affects Versions: 1.11.0 > Reporter: Maryann Xue > Assignee: Maryann Xue > Fix For: 1.12.0 > > > The current implementation (ever since its first version) of > SimpleCalciteSchema.getImplicitTableBasedOnNullaryFunction() is wrong, but > it was not revealed until [~julianhyde]'s check-in for CALCITE-1563. > The implementation 1) did not use "tableName" in finding the functions at > all; 2) was caching based. > {code} > protected TableEntry getImplicitTableBasedOnNullaryFunction(String > tableName, > boolean caseSensitive) { > for (String s : schema.getFunctionNames()) { > for (Function function : schema.getFunctions(s)) { > if (function instanceof TableMacro > && function.getParameters().isEmpty()) { > final Table table = ((TableMacro) > function).apply(ImmutableList.of()); > return tableEntry(tableName, table); > } > } > } > return null; > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)