Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-18711

Trim the blank space for TableOptions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.11.0
    • None
    • Table SQL / API
    • None

    Description

      If ddl table options have space before or after key or value, it will fail to create table source.

      For example,

      "CREATE TABLE " + INPUT_TABLE + "(" +
         "id BIGINT," +
         "timestamp6_col TIMESTAMP(6)," +
         "timestamp9_col TIMESTAMP(9)," +
         "time_col TIME," +
         "real_col FLOAT," +
         "double_col DOUBLE," +
         "decimal_col DECIMAL(10, 4)" +
         ") WITH (" +
         "  'connector'=' jdbc'," +
         "  'url '='" + DB_URL + "'," +
         "  'table-name'='" + INPUT_TABLE + "'" +
         ")"
      

      If there have blank space before jdbc or blank space after url, it will fail.
      I think If we can trim it, will be better for users.
      My idea is we can just trim keys and values on MergeTableLikeUtil#mergeOptions
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            hailong wang hailong wang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: