[
https://issues.apache.org/jira/browse/CALCITE-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16988239#comment-16988239
]
Julian Hyde commented on CALCITE-3549:
--------------------------------------
Imagine that two people are connected to the same schema in which a view is
defined, and their connections have different Lex conventions. Should each
person expand the view in their connection's Lex convention? No.
The context for parsing the view should be fixed. That means defined in the
schema, falling back to fixed defaults, not inherited from the connection using
it. This applies to the SQL dialect (lex convention) but also to the path used
to resolve functions used in the view.
> Lex config for view expanding is not supported
> ----------------------------------------------
>
> Key: CALCITE-3549
> URL: https://issues.apache.org/jira/browse/CALCITE-3549
> Project: Calcite
> Issue Type: Improvement
> Reporter: Jin Xing
> Priority: Major
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> UT as below:
> {code:java}
> // JdbcTest.java
> @Test public void testDEV() {
> modelWithView("select * from EMPLOYEES where deptno = 10", null)
> .with(Lex.JAVA)
> .query("select * from adhoc.V order by name desc")
> .returns("");
> }
> {code}
> Failed with
> {code:java}
> org.apache.calcite.sql.validate.SqlValidatorException: Column 'DEPTNO' not
> found in any table; did you mean 'deptno'?
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)