[ 
https://issues.apache.org/jira/browse/IGNITE-8152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17058164#comment-17058164
 ] 

Alexey commented on IGNITE-8152:
--------------------------------

[Taras|https://issues.apache.org/jira/secure/ViewProfile.jspa?name=tledkov-gridgain],
 thanks for the comments!


But if I correctly understood the current ticket, the user had the following 
problem:
using construction \{ new SqlFieldsQuery ("some sql"). setSchema (""); } 
the system throws an exception that "a scheme with an empty name cannot be 
used".

And that an empty scheme is really - just a user error, and he wanted to use 
the default scheme.
It is this problem that my patch solves - replacing "" to the default scheme.

Of course, I can add code that at the stage of creating the 
scheme(SchemaManager#createSchema) will check the name of the scheme for 
emptiness, 
but it seems to me it's a different task and it is probably more correct to 
create another ticket for this.

What do you think?

> Forbid empty sql schema name
> ----------------------------
>
>                 Key: IGNITE-8152
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8152
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Pavel Kuznetsov
>            Assignee: Alexey
>            Priority: Major
>              Labels: newbie
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Currently we allow empty schema name (quoted) in cache configuration
> org.apache.ignite.configuration.CacheConfiguration#setSqlSchema :
> {noformat}
> When sqlSchema is not specified, quoted cacheName is used instead.
> sqlSchema could not be an empty string. Has to be "\"\"" instead.
> Params:
> sqlSchema - Schema name for current cache according to SQL ANSI-99. Should 
> not be null.
> {noformat}
> Specifying schema \"\" results in empty string schema name.
> No schema in sql query is treated as PUBLIC, but \"\" is regular schema name.
> It's better to disallow usage of \"\" schema



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

Reply via email to