[jira] [Commented] (CALCITE-2208) MaterializedViewTable.MATERIALIZATION_CONNECTION breaks lex and case sensitivity for end user

2019-03-26 Thread Danny Chan (JIRA)


[ 
https://issues.apache.org/jira/browse/CALCITE-2208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16801626#comment-16801626
 ] 

Danny Chan commented on CALCITE-2208:
-

[~julianhyde] I have fixed this in 
[#pull1133|https://github.com/apache/calcite/pull/1133].

The main diff is to use the current active connection config to initialize a 
parser config so that users can always define their parser trait.

I add a SqlParser.Config instance in MaterializedViewTableMacro, this config 
comes from the connection config and is used to create MaterializedViewTable.

> MaterializedViewTable.MATERIALIZATION_CONNECTION breaks lex and case 
> sensitivity for end user
> -
>
> Key: CALCITE-2208
> URL: https://issues.apache.org/jira/browse/CALCITE-2208
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.15.0, 1.16.0
>Reporter: Piotr Bojko
>Assignee: Danny Chan
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> MaterializedViewTable.MATERIALIZATION_CONNECTION used for validating views 
> uses ORACLE lex by default. Calcite expands the view sql to uppercase so when 
> schemas used in such view sql are used are declared in lowercase - Calcite 
> does not find needed objects to resolve and validate the view sql.
> It does really not work even when end user creates connection with 
> lex=oracle, but uses uppercase for the names of its tables. 
> It would be best when MaterializedViewTable.MATERIALIZATION_CONNECTION would 
> be replaced by connection of an end user or dynamically created connection 
> with passed lex from end user connection. 
> Quick and dirty solution is to create 
> MaterializedViewTable.MATERIALIZATION_CONNECTION with caseSensitive=false;



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CALCITE-2208) MaterializedViewTable.MATERIALIZATION_CONNECTION breaks lex and case sensitivity for end user

2019-03-24 Thread Julian Hyde (JIRA)


[ 
https://issues.apache.org/jira/browse/CALCITE-2208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16800186#comment-16800186
 ] 

Julian Hyde commented on CALCITE-2208:
--

The author of [https://github.com/apache/calcite/pull/1123] has closed the PR.

Also, as I commented, I don't think 
[https://github.com/apache/calcite/pull/647] is suitable.

Therefore I am removing the 'pull-request-available' label.

> MaterializedViewTable.MATERIALIZATION_CONNECTION breaks lex and case 
> sensitivity for end user
> -
>
> Key: CALCITE-2208
> URL: https://issues.apache.org/jira/browse/CALCITE-2208
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.15.0, 1.16.0
>Reporter: Piotr Bojko
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> MaterializedViewTable.MATERIALIZATION_CONNECTION used for validating views 
> uses ORACLE lex by default. Calcite expands the view sql to uppercase so when 
> schemas used in such view sql are used are declared in lowercase - Calcite 
> does not find needed objects to resolve and validate the view sql.
> It does really not work even when end user creates connection with 
> lex=oracle, but uses uppercase for the names of its tables. 
> It would be best when MaterializedViewTable.MATERIALIZATION_CONNECTION would 
> be replaced by connection of an end user or dynamically created connection 
> with passed lex from end user connection. 
> Quick and dirty solution is to create 
> MaterializedViewTable.MATERIALIZATION_CONNECTION with caseSensitive=false;



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CALCITE-2208) MaterializedViewTable.MATERIALIZATION_CONNECTION breaks lex and case sensitivity for end user

2019-03-21 Thread Lai Zhou (JIRA)


[ 
https://issues.apache.org/jira/browse/CALCITE-2208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16798023#comment-16798023
 ] 

Lai Zhou commented on CALCITE-2208:
---

[~julianhyde], I make a pr for this issue,the changes:

1. Schemas now uses the config of current connection to make context.
2. CalcitePrepareImpl now uses the context's config rather than a default config
to create a SqlParser in the 'parse_' method.

> MaterializedViewTable.MATERIALIZATION_CONNECTION breaks lex and case 
> sensitivity for end user
> -
>
> Key: CALCITE-2208
> URL: https://issues.apache.org/jira/browse/CALCITE-2208
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.15.0, 1.16.0
>Reporter: Piotr Bojko
>Priority: Major
>
> MaterializedViewTable.MATERIALIZATION_CONNECTION used for validating views 
> uses ORACLE lex by default. Calcite expands the view sql to uppercase so when 
> schemas used in such view sql are used are declared in lowercase - Calcite 
> does not find needed objects to resolve and validate the view sql.
> It does really not work even when end user creates connection with 
> lex=oracle, but uses uppercase for the names of its tables. 
> It would be best when MaterializedViewTable.MATERIALIZATION_CONNECTION would 
> be replaced by connection of an end user or dynamically created connection 
> with passed lex from end user connection. 
> Quick and dirty solution is to create 
> MaterializedViewTable.MATERIALIZATION_CONNECTION with caseSensitive=false;



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CALCITE-2208) MaterializedViewTable.MATERIALIZATION_CONNECTION breaks lex and case sensitivity for end user

2018-03-08 Thread Julian Hyde (JIRA)

[ 
https://issues.apache.org/jira/browse/CALCITE-2208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16392095#comment-16392095
 ] 

Julian Hyde commented on CALCITE-2208:
--

The materialized view doesn't belong to the current connection, nor does it 
necessarily "belong to the schema". The current implementation is 
quick-and-dirty but it doesn't need to be replaced with a different 
quick-and-dirty.

Materialized views are not exactly the same as views, but I'll remark that for 
a view, the right thing is to remember the environment where the view was 
created (e.g. the lexical convention in use, and the access control 
environment) and apply the same environment when the view is used (i.e. 
expanded in a query). Maybe for materialized views we need to capture the 
environment when they were created. MATERIALIZATION_CONNECTION should be a 
connection factory (perhaps pooling behind the scenes, perhaps not) that can 
create connections with a particular environment. Perhaps they're not even 
full-blown connections, just a context in which a query can be prepared.

> MaterializedViewTable.MATERIALIZATION_CONNECTION breaks lex and case 
> sensitivity for end user
> -
>
> Key: CALCITE-2208
> URL: https://issues.apache.org/jira/browse/CALCITE-2208
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.15.0, 1.16.0
>Reporter: Piotr Bojko
>Assignee: Julian Hyde
>Priority: Major
>
> MaterializedViewTable.MATERIALIZATION_CONNECTION used for validating views 
> uses ORACLE lex by default. Calcite expands the view sql to uppercase so when 
> schemas used in such view sql are used are declared in lowercase - Calcite 
> does not find needed objects to resolve and validate the view sql.
> It does really not work even when end user creates connection with 
> lex=oracle, but uses uppercase for the names of its tables. 
> It would be best when MaterializedViewTable.MATERIALIZATION_CONNECTION would 
> be replaced by connection of an end user or dynamically created connection 
> with passed lex from end user connection. 
> Quick and dirty solution is to create 
> MaterializedViewTable.MATERIALIZATION_CONNECTION with caseSensitive=false;



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CALCITE-2208) MaterializedViewTable.MATERIALIZATION_CONNECTION breaks lex and case sensitivity for end user

2018-03-08 Thread Piotr Bojko (JIRA)

[ 
https://issues.apache.org/jira/browse/CALCITE-2208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16391309#comment-16391309
 ] 

Piotr Bojko commented on CALCITE-2208:
--

See https://github.com/apache/calcite/pull/647

> MaterializedViewTable.MATERIALIZATION_CONNECTION breaks lex and case 
> sensitivity for end user
> -
>
> Key: CALCITE-2208
> URL: https://issues.apache.org/jira/browse/CALCITE-2208
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.15.0, 1.16.0
>Reporter: Piotr Bojko
>Assignee: Julian Hyde
>Priority: Major
>
> MaterializedViewTable.MATERIALIZATION_CONNECTION used for validating views 
> uses ORACLE lex by default. Calcite expands the view sql to uppercase so when 
> schemas used in such view sql are used are declared in lowercase - Calcite 
> does not find needed objects to resolve and validate the view sql.
> It does really not work even when end user creates connection with 
> lex=oracle, but uses uppercase for the names of its tables. 
> It would be best when MaterializedViewTable.MATERIALIZATION_CONNECTION would 
> be replaced by connection of an end user or dynamically created connection 
> with passed lex from end user connection. 
> Quick and dirty solution is to create 
> MaterializedViewTable.MATERIALIZATION_CONNECTION with caseSensitive=false;



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CALCITE-2208) MaterializedViewTable.MATERIALIZATION_CONNECTION breaks lex and case sensitivity for end user

2018-03-08 Thread Piotr Bojko (JIRA)

[ 
https://issues.apache.org/jira/browse/CALCITE-2208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16391266#comment-16391266
 ] 

Piotr Bojko commented on CALCITE-2208:
--

I am planning to add the mentioned workaround when working on CALCITE-2194 - 
disabling case sensitivity on MaterializedViewTable.MATERIALIZATION_CONNECTION

> MaterializedViewTable.MATERIALIZATION_CONNECTION breaks lex and case 
> sensitivity for end user
> -
>
> Key: CALCITE-2208
> URL: https://issues.apache.org/jira/browse/CALCITE-2208
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.15.0, 1.16.0
>Reporter: Piotr Bojko
>Assignee: Julian Hyde
>Priority: Major
>
> MaterializedViewTable.MATERIALIZATION_CONNECTION used for validating views 
> uses ORACLE lex by default. Calcite expands the view sql to uppercase so when 
> schemas used in such view sql are used are declared in lowercase - Calcite 
> does not find needed objects to resolve and validate the view sql.
> It does really not work even when end user creates connection with 
> lex=oracle, but uses uppercase for the names of its tables. 
> It would be best when MaterializedViewTable.MATERIALIZATION_CONNECTION would 
> be replaced by connection of an end user or dynamically created connection 
> with passed lex from end user connection. 
> Quick and dirty solution is to create 
> MaterializedViewTable.MATERIALIZATION_CONNECTION with caseSensitive=false;



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)