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

Enable enumeration options to contain escaped characters or commas.

    XMLWordPrintable

Details

    Description

      It is valid to specify an enum column with a value that contains a comma, such as:

      ENUM('fieldA','fieldB','a,b')
      

      In the generated schema, the allowed parameter string-value excludes the `a,b` value due to problems with how the string is parsed using a regex pattern.

      We should look at changing Column to expose something like an enumValues() that returns a List<String> that holds all the string option values. These values should be sourced directly from the antlr parser itself rather than relying on yet another regex pattern to split the typeExpression string like we currently are doing.

      We should look at what MySQL accepts for all valid enum value strings such as escaped characters and make sure that we properly handle parsing of those as well.

      Part of the discussion originated from https://issues.jboss.org/browse/DBZ-1203 and this is mean to be a follow-up for that original issue.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: