code: public static TableSchema fromTypeInfo(TypeInformation<?> typeInfo) {
  		if (typeInfo instanceof CompositeType<?>) {
  			final CompositeType<?> compositeType = (CompositeType<?>) typeInfo;
  			// get field names and types from composite type
  			final String[] fieldNames = compositeType.getFieldNames();
  			final TypeInformation<?>[] fieldTypes = new TypeInformation[fieldNames.length];
  			for (int i = 0; i < fieldTypes.length; i++) {
  				fieldTypes[i] = compositeType.getTypeAt(i);
  			}
  			return new TableSchema(fieldNames, fieldTypes);
  		} else {
  			// create table schema with a single field named "f0" of the given type.
  			return new TableSchema(
  				new String[]{ATOMIC_TYPE_FIELD_NAME},
  				new TypeInformation<?>[]{typeInfo});
  		}
  	}
docs: Creates a table schema from a {@link TypeInformation} instance. If the type information is
  a {@link CompositeType}, the field names and types for the composite type are used to
  construct the {@link TableSchema} instance. Otherwise, a table schema with a single field
  is created. The field name is "f0" and the field type the provided type.
  
  @param typeInfo The {@link TypeInformation} from which the table schema is generated.
  @return The table schema that was generated from the given {@link TypeInformation}.