Sorry, my mistake. The query is valid.
I read the quotes around ‘k’ as back-ticks, `k`. In which case `k` would be a
an identifier rather than a character literal, and there is no object in scope
called `k`.
Julian
> On Aug 18, 2022, at 6:41 PM, Benchao Li wrote:
>
> Julian,
>
> The query
Julian,
The query is invalid. When validating B there is no K in scope.
I'm not sure that I understand this statement, could you kindly elaborate a
little more?
Julian Hyde 于2022年8月18日周四 23:32写道:
> The query is invalid. When validating B there is no K in scope. This
> should be throwing a
The query is invalid. When validating B there is no K in scope. This should be
throwing a validation error in all Calcite versions. If it happens to run in
some Calcite versions that is more luck than design.
Can you log a jira case please?
Julian
> On Aug 18, 2022, at 6:00 AM, Egor Ryashin
true, the version was rather old, thank you.
> On 18 Aug 2022, at 02:12, Benchao Li wrote:
>
> Egor,
>
> What's the Calcite version are you using?
> I tried your code in 1.30.0 and 1.31.0, they both work fine.
>
> Egor Ryashin 于2022年8月17日周三 22:40写道:
>
>> Hi all,
>>
>> I’m trying to figure
Egor,
What's the Calcite version are you using?
I tried your code in 1.30.0 and 1.31.0, they both work fine.
Egor Ryashin 于2022年8月17日周三 22:40写道:
> Hi all,
>
> I’m trying to figure out why this conversion fails:
>
> WITH `A` AS (SELECT `TABLE_NAME`
> FROM `main`.`TABLES`), `B` AS (SELECT 'k' AS
Hi all,
I’m trying to figure out why this conversion fails:
WITH `A` AS (SELECT `TABLE_NAME`
FROM `main`.`TABLES`), `B` AS (SELECT 'k' AS `K`) (SELECT *
FROM `A`
INNER JOIN `B` ON `A`.`TABLE_NAME` = `B`.`K`)
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 1 out of
bounds