CatalogUtil { public static DataType [] newSimpleDataTypeArray(Type... types) { DataType [] dataTypes = new DataType[types.length]; for (int i = 0; i < types.length; i++) { dataTypes[i] = newSimpleDataType(types[i]); } return dataTypes; }  static String normalizeIdentifier(String identifier); static String normalizeIdentifierPart(String part); static String denormalizeIdentifier(String identifier); static String denormalizePart(String identifier); static boolean isShouldBeQuoted(String columnName); static String stripQuote(String str); static boolean isDelimited(String identifier); static boolean isSimpleIdentifier(String columnOrTableName); static boolean isFQColumnName(String tableName); static boolean isFQTableName(String tableName); static String [] splitFQTableName(String qualifiedName); static String [] splitTableName(String tableName); static String buildFQName(String... identifiers); static String extractQualifier(String name); static String extractSimpleName(String name); static String getCanonicalTableName(String databaseName, String tableName); static String getStoreTypeString(final StoreType type); static StoreType getStoreType(final String typeStr); static TableMeta newTableMeta(String storeType); static TableMeta newTableMeta(String storeType, KeyValueSet options); static TableDesc newTableDesc(String tableName, Schema schema, TableMeta meta, Path path); static TableDesc newTableDesc(TableDescProto proto); static PartitionMethodDesc newPartitionMethodDesc(CatalogProtos.PartitionMethodProto proto); static SchemaProto getQualfiedSchema(String tableName, SchemaProto schema); static DataType newDataType(Type type, String code); static DataType newDataType(Type type, String code, int len); static DataType newSimpleDataType(Type type); static DataType newRecordType(int nestedFieldNum); static DataType [] newSimpleDataTypeArray(Type... types); static DataType newDataTypeWithLen(Type type, int length); static String columnToDDLString(Column column); static boolean isArrayType(TajoDataTypes.Type type); static boolean isMatchedFunction(List<DataType> definedTypes, List<DataType> givenTypes); static boolean checkIfMatchedNonVarLengthFunction(List<DataType> definedTypes, List<DataType> givenTypes,
                                                           int n, boolean lastArrayCompatible); static boolean checkIfCompatibleIncludingArray(Type defined, Type given); static boolean checkIfVariableLengthParamDefinition(List<DataType> definedTypes); static Type getPrimitiveTypeOf(Type type); static boolean isCompatibleType(final Type definedType, final Type givenType); static DataType getWidestType(DataType...types); static CatalogProtos.TableIdentifierProto buildTableIdentifier(String databaseName, String tableName); static void closeQuietly(Connection conn); static void closeQuietly(Statement stmt); static void closeQuietly(ResultSet res); static void closeQuietly(Statement stmt, ResultSet res); static AlterTableDesc renameColumn(String tableName, String oldColumName, String newColumName,
                                            AlterTableType alterTableType); static AlterTableDesc renameTable(String tableName, String newTableName, AlterTableType alterTableType); static AlterTableDesc addNewColumn(String tableName, Column column, AlterTableType alterTableType); static AlterTableDesc setProperty(String tableName, KeyValueSet params, AlterTableType alterTableType); static KeyValueSet newPhysicalProperties(String storeType); static final String TEXTFILE_NAME; static final Set<String> RESERVED_KEYWORDS_SET; static final Map<Type, Map<Type, Type>> OPERATION_CASTING_MAP; static final String BLOCK_SIZE; static final String PAGE_SIZE; static final String COMPRESSION; static final String ENABLE_DICTIONARY; static final String VALIDATION; }
@Test public final void testGetCanonicalName() { String canonical = FunctionUtil.buildSimpleFunctionSignature("sum", CatalogUtil.newSimpleDataTypeArray(Type.INT4, Type.INT8)); assertEquals("sum(int4,int8)", canonical); }