[#5629] Add DataType.isUDT()
This commit is contained in:
parent
e9cd04e2e7
commit
54a6df2088
@ -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();
|
||||
}
|
||||
|
||||
@ -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
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user