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

Mariadb columnstore CAST() not working for VARCHAR

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • None
    • Icebox
    • MariaDB Server
    • None
    • github.com/mariadb-corporation/mariadb-columnstore-docker.gi‌​t
      mariadb-columnstore-1.0.9-1-centos7.x86_64.rpm.tar.gz

    Description

      I'm using Pentho Kettle to load data into the DW.

      Some pdi steps generate SQL queries for lookup data.

      The following is a snippet of a generated SQL where the CAST() function throw a exception if we try to cast for VARCHAR:

      MariaDB [dbtest]> SELECT dpro_id
          -> FROM dbtest.d_prov
          -> WHERE ( CAST('NotNull' AS VARCHAR(256)) IS NULL ) 
          -> ;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VARCHAR(256)) IS NULL )' at line 3
      

      But the same SQL works if we try to cast for CHAR:

      MariaDB [dbtest]> SELECT dpro_id
          -> FROM dbtest.d_prov
          -> WHERE ( CAST('NotNull' AS CHAR) IS NULL ) 
          -> ;
      Empty set (0.04 sec)
      
      

      Best Regards.

      Attachments

        Activity

          People

            LinuxJedi Andrew Hutchings (Inactive)
            kleysonr Kleyson Rios
            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.