Class BucketFunction.BucketBase

java.lang.Object
org.apache.iceberg.spark.functions.BucketFunction.BucketBase
All Implemented Interfaces:
Serializable, org.apache.spark.sql.connector.catalog.functions.BoundFunction, org.apache.spark.sql.connector.catalog.functions.Function, org.apache.spark.sql.connector.catalog.functions.ReducibleFunction<Integer,Integer>, org.apache.spark.sql.connector.catalog.functions.ScalarFunction<Integer>
Direct Known Subclasses:
BucketFunction.BucketBinary, BucketFunction.BucketDecimal, BucketFunction.BucketInt, BucketFunction.BucketLong, BucketFunction.BucketString
Enclosing class:
BucketFunction

public abstract static class BucketFunction.BucketBase extends Object implements org.apache.spark.sql.connector.catalog.functions.ReducibleFunction<Integer,Integer>
See Also:
  • Field Summary

    Fields inherited from interface org.apache.spark.sql.connector.catalog.functions.ScalarFunction

    MAGIC_METHOD_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    apply(int numBuckets, int hashedValue)
     
    boolean
    equals(Object other)
     
    protected int
    gcd(int num1, int num2)
     
    int
     
     
    org.apache.spark.sql.connector.catalog.functions.Reducer<Integer,Integer>
    reducer(int thisNumBuckets, org.apache.spark.sql.connector.catalog.functions.ReducibleFunction<?,?> otherBucketFunction, int otherNumBuckets)
     
    org.apache.spark.sql.types.DataType
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.spark.sql.connector.catalog.functions.BoundFunction

    canonicalName, inputTypes, isDeterministic, isResultNullable

    Methods inherited from interface org.apache.spark.sql.connector.catalog.functions.ReducibleFunction

    reducer

    Methods inherited from interface org.apache.spark.sql.connector.catalog.functions.ScalarFunction

    produceResult
  • Constructor Details

    • BucketBase

      public BucketBase()
  • Method Details

    • apply

      public static int apply(int numBuckets, int hashedValue)
    • name

      public String name()
      Specified by:
      name in interface org.apache.spark.sql.connector.catalog.functions.Function
    • resultType

      public org.apache.spark.sql.types.DataType resultType()
      Specified by:
      resultType in interface org.apache.spark.sql.connector.catalog.functions.BoundFunction
    • gcd

      protected int gcd(int num1, int num2)
    • reducer

      public org.apache.spark.sql.connector.catalog.functions.Reducer<Integer,Integer> reducer(int thisNumBuckets, org.apache.spark.sql.connector.catalog.functions.ReducibleFunction<?,?> otherBucketFunction, int otherNumBuckets)
      Specified by:
      reducer in interface org.apache.spark.sql.connector.catalog.functions.ReducibleFunction<Integer,Integer>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object