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

Query fail when using Null-safe equal comparison (Columnstore table only)

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 6.4.2
    • Icebox
    • DMLProc
    • None
    • Centos 7
      MariaDB 10.8.4
      Columnstore 6.4.3 (though it is not listed in affected versions, see releasenum below)

    Description

      The following query is auto generated by Tableau and uses Null-safe operator which fails with the error below. When changed to normal equal operator, it runs fine.
      This is only happens for ColumnStore table. It is not an issue on MyISAM table.

      MariaDB [com_db]> SELECT t0.hour_ct AS hour_ct, t0.temp0, t1.dimension_0,
      -> t1.measure__1 AS sum_Calculation_1524749987192848385_ok
      -> FROM (
      -> SELECT hour_ct AS hour_ct,
      > ADDDATE( DATE_FORMAT( hour_ct, '%Y%m-%d 00:00:00' ), INTERVAL 0 SECOND ) AS temp0
      -> FROM com_db.DC_MNI_mvcore_video_hourly
      -> WHERE ((hour_ct >= TIMESTAMP('2022-08-07 00:00:00')) AND (hour_ct < TIMESTAMP('2022-08-08 00:00:00')))
      -> GROUP BY 1,2
      -> ) t0
      -> INNER JOIN (
      > SELECT ADDDATE( DATE_FORMAT( hour_ct, '%Y%m-%d 00:00:00' ), INTERVAL 0 SECOND ) AS dimension_0,
      -> COUNT(DISTINCT hour_ct) AS measure__1
      -> FROM com_db.DC_MNI_mvcore_video_hourly
      -> WHERE ((hour_ct >= TIMESTAMP('2022-08-01 00:00:00')) AND (hour_ct < TIMESTAMP('2022-08-08 00:00:00')))
      -> GROUP BY 1
      -> ) t1 ON (t0.temp0 <=> t1.dimension_0);
      ERROR 1815 (HY000): Internal error: MCS-1000: 'sub-query' and 'sub-query' are not joined.
      MariaDB [com_db]>
      MariaDB [com_db]>
      MariaDB [com_db]> SELECT t0.hour_ct AS hour_ct, t0.temp0, t1.dimension_0,
      -> t1.measure__1 AS sum_Calculation_1524749987192848385_ok
      -> FROM (
      -> SELECT hour_ct AS hour_ct,
      > ADDDATE( DATE_FORMAT( hour_ct, '%Y%m-%d 00:00:00' ), INTERVAL 0 SECOND ) AS temp0
      -> FROM com_db.DC_MNI_mvcore_video_hourly
      -> WHERE ((hour_ct >= TIMESTAMP('2022-08-07 00:00:00')) AND (hour_ct < TIMESTAMP('2022-08-08 00:00:00')))
      -> GROUP BY 1,2
      -> ) t0
      -> INNER JOIN (
      > SELECT ADDDATE( DATE_FORMAT( hour_ct, '%Y%m-%d 00:00:00' ), INTERVAL 0 SECOND ) AS dimension_0,
      -> COUNT(DISTINCT hour_ct) AS measure__1
      -> FROM com_db.DC_MNI_mvcore_video_hourly
      -> WHERE ((hour_ct >= TIMESTAMP('2022-08-01 00:00:00')) AND (hour_ct < TIMESTAMP('2022-08-08 00:00:00')))
      -> GROUP BY 1
      -> ) t1 ON (t0.temp0 = t1.dimension_0);
      -------------------------------------------------------------------------------------------------+

      hour_ct temp0 dimension_0 sum_Calculation_1524749987192848385_ok

      -------------------------------------------------------------------------------------------------+

      2022-08-07 17:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 04:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 21:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 06:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 05:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 00:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 20:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 11:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 01:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 08:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 16:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 12:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 03:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 14:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 23:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 18:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 13:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 15:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 19:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 07:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 22:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 09:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 02:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24
      2022-08-07 10:00:00 2022-08-07 00:00:00 2022-08-07 00:00:00 24

      -------------------------------------------------------------------------------------------------+
      24 rows in set (0.612 sec)

      [root@f68eac01f002 columnstore]# pwd
      /usr/share/columnstore
      [root@f68eac01f002 columnstore]# cat releasenum
      version=6.4.3
      release=1

      Attachments

        Activity

          People

            Unassigned Unassigned
            mbsoul Majdi Bsoul
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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