I am using Apache Calcite
to execute queries on different data sources.
The model file that I am using is
inline: {
version: '1.0',
defaultSchema: 'sakila',
schemas: [
{
name: 'sakila',
type: 'custom',
factory: 'org.apache.calcite.adapter.jdbc.JdbcSchema$Factory',
operand: {
jdbcDriver: 'org.postgresql.Driver',
jdbcUrl: 'jdbc:postgresql://localhost:5432/sakila',
jdbcUser: 'postgres',
jdbcPassword: 'postgres'
}
}
]
}
And the query is
select
"sakila"."actor"."first_name" as "actor_first_name"
from
"sakila"."actor"
The above query is not working due to the double quotes applied for tables and columns. So, I had to remove the quotes and the following query works fine.
select
sakila.actor.first_name as actor_first_name
from
sakila.actor
Here, the question is the query parser is not allowing some queries if they don't have double quotes. And in some cases like above it is not requiring quotes to execute properly. Can anyone throw some insight on why exactly it is so?