Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2886

Union ALL with Char column not present in the table in Query 1 but in Query 2 throw exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.8.0
    • Labels:
      None

      Description

      To reproduce:

      create table person ( id bigint not null primary key, firstname char(10), lastname varchar(10) );
      upsert into person values( 1, 'john', 'doe');
      upsert into person values( 2, 'jane', 'doe');

      – fixed value for char(10)
      select id, 'foo' firstname, lastname from person union all select * from person;
      java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal data. Expected length of at least 106 bytes, but had 13

      – fixed value for bigint
      select cast( 10 AS bigint) id, 'foo' firstname, lastname from person union all select * from person;
      java.lang.RuntimeException: java.sql.SQLException: ERROR 201 (22000): Illegal data. Expected length of at least 106 bytes, but had 13

        Attachments

        1. UnionAllIT.java.diff
          3 kB
          Alicia Ying Shu
        2. PHOENIX-2886-v4.patch
          24 kB
          Alicia Ying Shu
        3. PHOENIX-2886-v3.patch
          17 kB
          Alicia Ying Shu
        4. PHOENIX-2886-v2.patch
          16 kB
          Sergey Soldatov
        5. PHOENIX-2886-v1.patch
          16 kB
          Alicia Ying Shu
        6. PHOENIX-2886.patch
          15 kB
          Alicia Ying Shu

          Activity

            People

            • Assignee:
              aliciashu Alicia Ying Shu
              Reporter:
              aliciashu Alicia Ying Shu
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: