test_class.file: core/src/test/java/com/dtstack/flink/sql/util/DataTypeUtilsTest.java
test_class.identifier: DataTypeUtilsTest
test_case.body: @Test
      public void convertToArray() {
          String[] normalFieldNames = new String[] { "id", "name" };
          TypeInformation[] normalTypes = new TypeInformation[] {Types.INT(), Types.STRING()};
          RowTypeInfo rowTypeInfo = new RowTypeInfo(normalTypes, normalFieldNames);
          TypeInformation normalAtomicType = Types.OBJECT_ARRAY(Types.STRING());
          TypeInformation normalCompositeType = Types.OBJECT_ARRAY(rowTypeInfo);
  
          String atomicStrWithBlank = " ARRAY< STRING\n > ";
          String compositeTypeStrWithBlank = " ARRAY<  ROW< id  INT, name  STRING >  > ";
  
          TypeInformation atomicArrayTypeWithBlank = DataTypeUtils.convertToArray(atomicStrWithBlank);
          TypeInformation compositeTypeArrayTypeWithBlank = DataTypeUtils.convertToArray(compositeTypeStrWithBlank);
  
          Assert.assertTrue(normalAtomicType.equals(atomicArrayTypeWithBlank));
          Assert.assertTrue(normalCompositeType.equals(compositeTypeArrayTypeWithBlank));
  
  
          String atomicStr = "ARRAY<STRING>";
          String compositeTypeStr = "ARRAY<ROW<id INT, name STRING>>";
  
          TypeInformation atomicArrayType = DataTypeUtils.convertToArray(atomicStr);
          TypeInformation compositeTypeArrayType = DataTypeUtils.convertToArray(compositeTypeStr);
  
          Assert.assertTrue(normalAtomicType.equals(atomicArrayType));
          Assert.assertTrue(normalCompositeType.equals(compositeTypeArrayType));
      }
test_case.class_method_signature: DataTypeUtilsTest.convertToArray()
test_case.full_signature: @Test public void convertToArray()
test_case.identifier: convertToArray
test_case.invocations: INT STRING OBJECT_ARRAY STRING OBJECT_ARRAY convertToArray convertToArray assertTrue equals assertTrue equals convertToArray convertToArray assertTrue equals assertTrue equals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void convertToArray()
focal_class.declarator: COMPOSITE_TYPE_PATTERN = Pattern.compile("(.+?)<(.+)>")
focal_class.modifier: private final static
focal_class.original_string: private final static Pattern COMPOSITE_TYPE_PATTERN = Pattern.compile("(.+?)<(.+)>");
focal_class.type: Pattern
focal_class.var_name: COMPOSITE_TYPE_PATTERN
focal_class.declarator: ARRAY = "ARRAY"
focal_class.modifier: private final static
focal_class.original_string: private final static String ARRAY = "ARRAY";
focal_class.type: String
focal_class.var_name: ARRAY
focal_class.declarator: ROW = "ROW"
focal_class.modifier: private final static
focal_class.original_string: private final static String ROW = "ROW";
focal_class.type: String
focal_class.var_name: ROW
focal_class.declarator: FIELD_DELIMITER = ','
focal_class.modifier: private final static
focal_class.original_string: private final static char FIELD_DELIMITER = ',';
focal_class.type: char
focal_class.var_name: FIELD_DELIMITER
focal_class.declarator: TYPE_DELIMITER = ' '
focal_class.modifier: private final static
focal_class.original_string: private final static char TYPE_DELIMITER = ' ';
focal_class.type: char
focal_class.var_name: TYPE_DELIMITER
focal_class.file: core/src/main/java/com/dtstack/flink/sql/util/DataTypeUtils.java
focal_class.identifier: DataTypeUtils
focal_class.class_method_signature: DataTypeUtils.DataTypeUtils()
focal_class.full_signature: private  DataTypeUtils()
focal_class.identifier: DataTypeUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  DataTypeUtils()
focal_class.class_method_signature: DataTypeUtils.convertToCompositeType(String compositeTypeString)
focal_class.full_signature: public static TypeInformation convertToCompositeType(String compositeTypeString)
focal_class.identifier: convertToCompositeType
focal_class.modifiers: public static
focal_class.parameters: (String compositeTypeString)
focal_class.return: TypeInformation
focal_class.signature: TypeInformation convertToCompositeType(String compositeTypeString)
focal_class.class_method_signature: DataTypeUtils.convertToArray(String arrayTypeString)
focal_class.full_signature: public static TypeInformation convertToArray(String arrayTypeString)
focal_class.identifier: convertToArray
focal_class.modifiers: public static
focal_class.parameters: (String arrayTypeString)
focal_class.return: TypeInformation
focal_class.signature: TypeInformation convertToArray(String arrayTypeString)
focal_class.class_method_signature: DataTypeUtils.convertToRow(String rowTypeString)
focal_class.full_signature: public static RowTypeInfo convertToRow(String rowTypeString)
focal_class.identifier: convertToRow
focal_class.modifiers: public static
focal_class.parameters: (String rowTypeString)
focal_class.return: RowTypeInfo
focal_class.signature: RowTypeInfo convertToRow(String rowTypeString)
focal_class.class_method_signature: DataTypeUtils.genFieldInfo(Iterable<String> fieldInfoStrs)
focal_class.full_signature: private static Tuple2<TypeInformation[], String[]> genFieldInfo(Iterable<String> fieldInfoStrs)
focal_class.identifier: genFieldInfo
focal_class.modifiers: private static
focal_class.parameters: (Iterable<String> fieldInfoStrs)
focal_class.return: Tuple2<TypeInformation[], String[]>
focal_class.signature: Tuple2<TypeInformation[], String[]> genFieldInfo(Iterable<String> fieldInfoStrs)
focal_class.class_method_signature: DataTypeUtils.convertToAtomicType(String string)
focal_class.full_signature: public static TypeInformation convertToAtomicType(String string)
focal_class.identifier: convertToAtomicType
focal_class.modifiers: public static
focal_class.parameters: (String string)
focal_class.return: TypeInformation
focal_class.signature: TypeInformation convertToAtomicType(String string)
focal_class.class_method_signature: DataTypeUtils.splitTypeInfo(String string)
focal_class.full_signature: private static Iterable<String> splitTypeInfo(String string)
focal_class.identifier: splitTypeInfo
focal_class.modifiers: private static
focal_class.parameters: (String string)
focal_class.return: Iterable<String>
focal_class.signature: Iterable<String> splitTypeInfo(String string)
focal_class.class_method_signature: DataTypeUtils.splitCompositeTypeField(String string)
focal_class.full_signature: private static Iterable<String> splitCompositeTypeField(String string)
focal_class.identifier: splitCompositeTypeField
focal_class.modifiers: private static
focal_class.parameters: (String string)
focal_class.return: Iterable<String>
focal_class.signature: Iterable<String> splitCompositeTypeField(String string)
focal_class.class_method_signature: DataTypeUtils.replaceBlank(String s)
focal_class.full_signature: private static String replaceBlank(String s)
focal_class.identifier: replaceBlank
focal_class.modifiers: private static
focal_class.parameters: (String s)
focal_class.return: String
focal_class.signature: String replaceBlank(String s)
focal_class.class_method_signature: DataTypeUtils.matchCompositeType(String s)
focal_class.full_signature: private static Matcher matchCompositeType(String s)
focal_class.identifier: matchCompositeType
focal_class.modifiers: private static
focal_class.parameters: (String s)
focal_class.return: Matcher
focal_class.signature: Matcher matchCompositeType(String s)
focal_class.class_method_signature: DataTypeUtils.normalizeType(String s)
focal_class.full_signature: private static String normalizeType(String s)
focal_class.identifier: normalizeType
focal_class.modifiers: private static
focal_class.parameters: (String s)
focal_class.return: String
focal_class.signature: String normalizeType(String s)
focal_method.body: public static TypeInformation convertToArray(String arrayTypeString) {
          Matcher matcher = matchCompositeType(arrayTypeString);
          final String errorMsg =  arrayTypeString + "convert to array type error!";
          Preconditions.checkState(matcher.find(), errorMsg);
  
          String normalizedType = normalizeType(matcher.group(1));
          Preconditions.checkState(ARRAY.equals(normalizedType), errorMsg);
  
          String elementTypeString = matcher.group(2);
          TypeInformation elementType;
          String normalizedElementType = normalizeType(elementTypeString);
          if (normalizedElementType.startsWith(ROW)) {
              elementType = convertToRow(elementTypeString);
          } else {
              elementType = convertToAtomicType(elementTypeString);
          }
  
          return Types.OBJECT_ARRAY(elementType);
      }
focal_method.class_method_signature: DataTypeUtils.convertToArray(String arrayTypeString)
focal_method.full_signature: public static TypeInformation convertToArray(String arrayTypeString)
focal_method.identifier: convertToArray
focal_method.invocations: matchCompositeType checkState find normalizeType group checkState equals group normalizeType startsWith convertToRow convertToAtomicType OBJECT_ARRAY
focal_method.modifiers: public static
focal_method.parameters: (String arrayTypeString)
focal_method.return: TypeInformation
focal_method.signature: TypeInformation convertToArray(String arrayTypeString)