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

LDI using cpimport pads char column values with spaces

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.0.1, 1.0.2
    • 1.0.3
    • DMLProc
    • None
    • 1.0.3

    Description

      When LDI uses cpimport to load data in the background (infinidb_use_import_for_batchinsert=1, which is the default setting in my.cnf), the loaded data is incorrect.

      After loading the dbt3.region table with 5 rows,

      -------------------------------------------------------------------------------------------------------------------------------------------

      r_regionkey r_name r_comment

      -------------------------------------------------------------------------------------------------------------------------------------------

      0 AFRICA lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to
      1 AMERICA hs use ironic, even requests. s
      2 ASIA ges. thinly even pinto beans ca
      3 EUROPE ly final courts cajole furiously final excuse
      4 MIDDLE EAST uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl

      ------------------------——————————————————————————————————————————————————————————

      The following query returned no data:

      select * from region where r_name = 'MIDDLE EAST';
      Empty set (0.05 sec)

      If should return:

      ------------------------------------------------------------------------------------------------------------------------------------

      r_regionkey r_name r_comment

      ------------------------------------------------------------------------------------------------------------------------------------

      4 MIDDLE EAST uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl

      ------------------------------------------------------------------------------------------------------------------------------------
      1 row in set (0.29 sec)

      If I use the other methods to load data into the table, the query worked correctly.

      1. Insert
      2. LDI without using cpimport
      3. cpimport

      Further investigation revealed that LDI with cpimport loads data with space padded to char strings:

      Good table

      MariaDB [mytest]> select r_regionkey, r_name, hex(r_name) from region;
      ----------------------------------------------

      r_regionkey r_name hex(r_name)

      ----------------------------------------------

      0 AFRICA 414652494341
      1 AMERICA 414D4552494341
      2 ASIA 41534941
      3 EUROPE 4555524F5045
      4 MIDDLE EAST 4D4944444C452045415354

      ----------------------------------------------
      5 rows in set (0.82 sec)

      Bad table

      MariaDB [mytest]> select r_regionkey, r_name, hex(r_name) from badregion;
      --------------------------------------------------------------------------

      r_regionkey r_name hex(r_name)

      --------------------------------------------------------------------------

      0 AFRICA 41465249434120202020202020202020202020202020202020
      1 AMERICA 414D4552494341202020202020202020202020202020202020
      2 ASIA 41534941202020202020202020202020202020202020202020
      3 EUROPE 4555524F504520202020202020202020202020202020202020
      4 MIDDLE EAST 4D4944444C4520454153542020202020202020202020202020

      --------------------------------------------------------------------------
      5 rows in set (1.07 sec)

      This issue has caused much pain in my effort to get the DBT3 queries to work and to get DBT3 performance stats. One good thing came out from it is the it triggered the issue as described in MCOL-240, ExeMgr gets restarted if the subquery returned a NULL value.

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              dleeyh Daniel Lee (Inactive)
              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.