[#5629] Add DataType.isUDT()

This commit is contained in:
lukaseder 2016-10-31 16:05:12 +01:00
parent e9cd04e2e7
commit 54a6df2088
2 changed files with 10 additions and 0 deletions

View File

@ -459,4 +459,9 @@ public interface DataType<T> extends Serializable {
* Whether this data type is an array type.
*/
boolean isArray();
/**
* Whether this data type is a UDT type.
*/
boolean isUDT();
}

View File

@ -858,6 +858,11 @@ public class DefaultDataType<T> implements DataType<T> {
(!isBinary() && type.isArray());
}
@Override
public final boolean isUDT() {
return UDTRecord.class.isAssignableFrom(type);
}
// ------------------------------------------------------------------------
// The Object API
// ------------------------------------------------------------------------