calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enrico Olivelli <>
Subject Aliases for schemas
Date Tue, 14 Nov 2017 12:59:28 GMT
(I am playing with the planner, you know)
I have several "schema" in my system, like "one", "two"
So my root schema is built this way:
final SchemaPlus rootSchema = Frameworks.createRootSchema(true);
        for (String tableSpace : listTableSpaces()) {
            SchemaPlus schema = rootSchema.add(tableSpace, new

Queries like
SELECT * from one.mytable
SELECT * from two.mytable

get parsed and validated.

But I would like to set a "default" schema to be used when the query does
not explicitly refer to a schema, like
SELECT * from mytable

which I would expect to be parsed as
SELECT * from one.mytable

Is it possible ?

Bonus question, separate from the former, it seems that the parser
complaints if I try to use a schema with name "default", using MYSQL5_5
compatinility for instance. Is there any tweak to make it work ?

Calcite is really great!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message