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

DDL property 'format.fields.#.type' should ignore case

    XMLWordPrintableJSON

    Details

      Description

      When define DDL as follow:

      create table RubberOrders(
        b int
      ) with (
       'connector.type' = 'filesystem',
       'format.type' = 'csv',                        
       'connector.path' = '##',
       'format.fields.0.name' = 'b',
       'format.fields.0.type' = 'int'
      )
      

      It has an exception:

      Could not parse type information at position 0: Unsupported type: int
      Input type string: int 
      at org.apache.flink.table.utils.TypeStringUtils$TokenConverter.parsingError(TypeStringUtils.java:491) at org.apache.flink.table.utils.TypeStringUtils$TokenConverter.convertType(TypeStringUtils.java:318) at org.apache.flink.table.utils.TypeStringUtils$TokenConverter.convert(TypeStringUtils.java:261) at org.apache.flink.table.utils.TypeStringUtils.readTypeInfo(TypeStringUtils.java:169) at org.apache.flink.table.descriptors.DescriptorProperties.lambda$validateType$32(DescriptorProperties.java:1149) at org.apache.flink.table.descriptors.DescriptorProperties.validateOptional(DescriptorProperties.java:1357) at org.apache.flink.table.descriptors.DescriptorProperties.validateType(DescriptorProperties.java:1143) at org.apache.flink.table.descriptors.DescriptorProperties.lambda$validateTableSchema$26(DescriptorProperties.java:1011) at org.apache.flink.table.descriptors.DescriptorProperties.validateFixedIndexedProperties(DescriptorProperties.java:998) at org.apache.flink.table.descriptors.DescriptorProperties.validateTableSchema(DescriptorProperties.java:1017)
      

      For the reason we did not ignore case in TypeStringUtils.convertType method.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                hailong wang hailong wang
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m