questdb/questdb

SQL: Join Column Type Mismatch

オープン

#1,679 opened on 2021/12/13

 (21 件のコメント) (0 件のリアクション) (1 人の担当者)Java (972 件のフォーク)batch import
Good first issueSQL

Repository metrics

Stars
 (13,403 個のスター)
PR merge metrics
 (平均マージ 5d 13h) (30d で 108 merged PRs)

説明

Describe the bug

When 2 tables joined on INT and LONG columns error shown that there is join column mismatch

To reproduce

select x, y
from long_sequence(100) ls
join (
  select cast(x as int) y from long_sequence(100)
) as ls2
on ls.x = ls2.y

Expected Behavior

INT can be be upcast to LONG and equality should be checked as LONG equality so that above query returns 100 rows

Environment

- **QuestDB version**: 6.1.2
- **OS**: any
- **Browser**: any

Additional context

Comparing mixed data types works for many numeric types in WHERE. Same should be in JOIN condition

コントリビューターガイド