/** * Shorthand to add a column definition to this CREATE statement, when the type is a map with a * UDT value type. * * <p>Example: * * <pre> * addUDTMapColumn("addresses", DataType.text(), frozen("address")); * </pre> * * @param columnName the name of the column to be added. * @param keyType the key type of the column to be added. * @param valueUdtType the value UDT type of the column to be added. Use {@link * SchemaBuilder#frozen(String)}. * @return this CREATE statement. */ public T addUDTMapColumn(String columnName, DataType keyType, UDTType valueUdtType) { validateNotEmpty(columnName, "Column name"); validateNotNull(keyType, "Map key type"); validateNotNull(valueUdtType, "Map value UDT type"); validateNotKeyWord( columnName, String.format( "The column name '%s' is not allowed because it is a reserved keyword", columnName)); simpleColumns.put(columnName, UDTType.mapWithUDTValue(keyType, valueUdtType)); return self; }
/** * Shorthand to add a column definition to this CREATE statement, when the type is a map with a UDT value type. * <p/> * Example: * <pre> * addUDTMapColumn("addresses", DataType.text(), frozen("address")); * </pre> * * @param columnName the name of the column to be added. * @param keyType the key type of the column to be added. * @param valueUdtType the value UDT type of the column to be added. Use {@link SchemaBuilder#frozen(String)}. * @return this CREATE statement. */ public T addUDTMapColumn(String columnName, DataType keyType, UDTType valueUdtType) { validateNotEmpty(columnName, "Column name"); validateNotNull(keyType, "Map key type"); validateNotNull(valueUdtType, "Map value UDT type"); validateNotKeyWord(columnName, String.format("The column name '%s' is not allowed because it is a reserved keyword", columnName)); simpleColumns.put(columnName, UDTType.mapWithUDTValue(keyType, valueUdtType)); return self; }
/** * Shorthand to add a column definition to this CREATE statement, when the type is a map with a UDT value type. * <p/> * Example: * <pre> * addUDTMapColumn("addresses", DataType.text(), frozen("address")); * </pre> * * @param columnName the name of the column to be added. * @param keyType the key type of the column to be added. * @param valueUdtType the value UDT type of the column to be added. Use {@link SchemaBuilder#frozen(String)}. * @return this CREATE statement. */ public T addUDTMapColumn(String columnName, DataType keyType, UDTType valueUdtType) { validateNotEmpty(columnName, "Column name"); validateNotNull(keyType, "Map key type"); validateNotNull(valueUdtType, "Map value UDT type"); validateNotKeyWord(columnName, String.format("The column name '%s' is not allowed because it is a reserved keyword", columnName)); simpleColumns.put(columnName, UDTType.mapWithUDTValue(keyType, valueUdtType)); return self; }
/** * Shorthand to add a column definition to this CREATE statement, when the type is a map with a UDT value type. * <p/> * Example: * <pre> * addUDTMapColumn("addresses", DataType.text(), frozen("address")); * </pre> * * @param columnName the name of the column to be added. * @param keyType the key type of the column to be added. * @param valueUdtType the value UDT type of the column to be added. Use {@link SchemaBuilder#frozen(String)}. * @return this CREATE statement. */ public T addUDTMapColumn(String columnName, DataType keyType, UDTType valueUdtType) { validateNotEmpty(columnName, "Column name"); validateNotNull(keyType, "Map key type"); validateNotNull(valueUdtType, "Map value UDT type"); validateNotKeyWord(columnName, String.format("The column name '%s' is not allowed because it is a reserved keyword", columnName)); simpleColumns.put(columnName, UDTType.mapWithUDTValue(keyType, valueUdtType)); return self; }