FYI, it’s not reproduced with Calcite 1.35
> On 7 Nov 2023, at 03:10, Julian Hyde <[email protected]> wrote:
>
> Did you find an existing Jira case? If not, could you log one? You should
> create a minimal test case and figure out what are the essential features
> that are necessary to reproduce this problem. Ideally convert it to run on a
> built-in schema such as Scott (emp and dept tables). This will help someone
> fix the case, help someone suggest a workaround, and help others identify
> that they are hitting the same issue.
>
>> On Nov 6, 2023, at 3:51 AM, Egor Ryashin <[email protected]> wrote:
>>
>> Hi all,
>>
>> I’ve just run into this exception:
>> Type mismatch: rowtype of new rel: RecordType(VARCHAR pub, VARCHAR pub0,
>> DOUBLE NOT NULL $f2) NOT NULL rowtype of set: RecordType(VARCHAR pub,
>> VARCHAR pub0, DOUBLE rate) NOT NULL
>>
>>
>> executing this SQL:
>> SELECT base."pub”,
>> Any_value(base.”rate”),
>> Any_value(comparison."rate")
>> FROM (
>> SELECT "pub",
>> Min(total)/Max(price) AS "rate"
>> FROM "test_data"
>> WHERE "__time" >= timestamp '2022-03-01 00:00:00'
>> GROUP BY "pub"
>> ORDER BY TRUE,
>> 2 limit 500 ) base
>> left outer join
>> (
>> SELECT "pub",
>> min(total)/max(price) AS "rate"
>> FROM "test_data"
>> WHERE "__time" < timestamp '2022-03-01 00:00:00'
>> GROUP BY "pub" ) comparison
>> ON base."pub" = comparison."pub"
>> GROUP BY 1
>>
>> looking through JIRA I concluded that bug is still an issue, I wonder if
>> there’s a known workaround for that?
>>
>>
>>
>