code: public static boolean isNumericType(Field field) {
          FieldType type = field.getType();
          boolean scalar = type instanceof ScalarFieldType;
          return scalar && !(BOOL.equals(type) || STRING.equals(type) || BYTES.equals(type));
      }
docs: Check if field type is numeric.