Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-677

Columnstore executes join on incompatible types

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.0.8, 1.1.0
    • 1.1.0
    • ExeMgr
    • 2017-8, 2017-9

    Description

      create table join1  (x varchar(2), y varchar(10)) engine=columnstore;
      create table join2  (x varchar(2), y date, z int) engine=columnstore;
       
      insert into join1 values("11", "2017-01-01");
      insert into join1 values("12", "2017-01-02");
      insert into join2 values("11", "2017-01-01", 22);
      insert into join2 values("12", "2017-02-01", 23);
      

      Join on two columns

      select a.*, b.*
      from join1 a
      left join join2 b
      on a.x = b.x and a.y = b.y
      

      Produce

      x	y	x	y	z
      11	2017-01-01	11	2017-01-01	22
      

      But join on single column:

      select a.*, b.*
      from join1 a
      left join join2 b
      on a.y = b.y
      

      Results in error:

      Internal error: IDB-1002: 'b' and 'a' have incompatible column type specified for join condition.

      In think in both cases we should have error. I also observed on larger table that even if in first case query was executes results are sometimes incorrect (even it it is left join it behave like ordinary join)

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              Matzz Mateusz Zakarczemny
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.