public static Class<?>[] getAllInterface(Class clazz) {
    if (clazz.equals(Object.class)) {
      return new Class[] {};
    }
    Class<?>[] current = clazz.getInterfaces();
    Class superClass = clazz.getSuperclass();
    Class<?>[] superInterfaces = getAllInterface(superClass);

    Set<Class<?>> all = new HashSet<>();
    all.addAll(Arrays.asList(current));
    all.addAll(Arrays.asList(superInterfaces));

    Class<?>[] deduplicated = new Class[all.size()];
    return all.toArray(deduplicated);
  }
get interfaces of class and its parent
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/util/ReflectionUtil.java