Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-9034

MySQL parser fails when using a JSON_TABLE in a join clause

XMLWordPrintable

      Given the following SQL:

        INSERT IGNORE INTO provider_email_address
        (
          org_id,
          provider_id,
          email_address_id,
          is_selected,is_communication_allowed,
          is_refunded,
          refunded_time,
          is_system_credentials_used
        )
        SELECT
          u.org_id,
          char_to_binary(jt.provider_id),
          pea.id,
          tbe.is_selected,
          IFNULL(tbe.is_communication_allowed, TRUE),
          tbe.is_refunded,
          IF(tbe.is_refunded, UTC_TIMESTAMP(6), null),
          tbe.is_system_credentials_used
        FROM temp_bulk_emails tbe
        JOIN person_email_address pea ON pea.email_address = tbe.email_address
        JOIN user u ON u.id = tbe.binary_user_id
        JOIN JSON_TABLE(tbe.providers, '$[*]'
        COLUMNS (provider_id VARCHAR(255) PATH '$')) jt ON 1 = 1
        WHERE tbe.providers IS NOT NULL;
      

      The MySQL parser fails to permit the join on the JSON_TABLE.

              ccranfor@redhat.com Chris Cranford
              ccranfor@redhat.com Chris Cranford
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: