public class Transforms
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | Transforms.ApplyTransformA transform that applies a function to the input value. | 
| static class  | Transforms.BucketTransformA transform that returns the bucket of the input value. | 
| static class  | Transforms.DayTransformA transform that returns the day of the input value. | 
| static class  | Transforms.HourTransformA transform that returns the hour of the input value. | 
| static class  | Transforms.IdentityTransformA transform that returns the input value. | 
| static class  | Transforms.ListTransformA transform that includes multiple fields in a list. | 
| static class  | Transforms.MonthTransformA transform that returns the month of the input value. | 
| static class  | Transforms.RangeTransformA transform that returns the range of the input value. | 
| static class  | Transforms.TruncateTransformA transform that returns the truncated value of the input value with the given width. | 
| static class  | Transforms.YearTransformA transform that returns the year of the input value. | 
| Modifier and Type | Field and Description | 
|---|---|
| static Transform[] | EMPTY_TRANSFORMAn empty array of transforms. | 
| static java.lang.String | NAME_OF_BUCKETThe name of the bucket transform. | 
| static java.lang.String | NAME_OF_DAYThe name of the day transform. | 
| static java.lang.String | NAME_OF_HOURThe name of the hour transform. | 
| static java.lang.String | NAME_OF_IDENTITYThe name of the identity transform. | 
| static java.lang.String | NAME_OF_LISTThe name of the list transform. | 
| static java.lang.String | NAME_OF_MONTHThe name of the month transform. | 
| static java.lang.String | NAME_OF_RANGEThe name of the range transform. | 
| static java.lang.String | NAME_OF_TRUNCATEThe name of the truncate transform. | 
| static java.lang.String | NAME_OF_YEARThe name of the year transform. | 
| Modifier and Type | Method and Description | 
|---|---|
| static Transforms.ApplyTransform | apply(java.lang.String name,
     Expression[] arguments)Create a transform that applies a function to the input value. | 
| static Transforms.BucketTransform | bucket(int numBuckets,
      java.lang.String[]... fieldNames)Create a transform that returns the bucket of the input value. | 
| static Transforms.DayTransform | day(java.lang.String columnName)Create a transform that returns the day of the input value. | 
| static Transforms.DayTransform | day(java.lang.String[] fieldName)Create a transform that returns the day of the input value. | 
| static Transforms.HourTransform | hour(java.lang.String columnName)Create a transform that returns the hour of the input value. | 
| static Transforms.HourTransform | hour(java.lang.String[] fieldName)Create a transform that returns the hour of the input value. | 
| static Transforms.IdentityTransform | identity(java.lang.String columnName)Create a transform that returns the input value. | 
| static Transforms.IdentityTransform | identity(java.lang.String[] fieldName)Create a transform that returns the input value. | 
| static Transforms.ListTransform | list(java.lang.String[]... fieldNames)Create a transform that includes multiple fields in a list. | 
| static Transforms.ListTransform | list(java.lang.String[][] fieldNames,
    ListPartition[] assignments)Create a transform that includes multiple fields in a list with preassigned list partitions. | 
| static Transforms.MonthTransform | month(java.lang.String columnName)Create a transform that returns the month of the input value. | 
| static Transforms.MonthTransform | month(java.lang.String[] fieldName)Create a transform that returns the month of the input value. | 
| static Transforms.RangeTransform | range(java.lang.String[] fieldName)Create a transform that returns the range of the input value. | 
| static Transforms.RangeTransform | range(java.lang.String[] fieldName,
     RangePartition[] assignments)Create a transform that returns the range of the input value with preassigned range partitions. | 
| static Transforms.TruncateTransform | truncate(int width,
        java.lang.String columnName)Create a transform that returns the truncated value of the input value with the given width. | 
| static Transforms.TruncateTransform | truncate(int width,
        java.lang.String[] fieldName)Create a transform that returns the truncated value of the input value with the given width. | 
| static Transforms.YearTransform | year(java.lang.String columnName)Create a transform that returns the year of the input value. | 
| static Transforms.YearTransform | year(java.lang.String[] fieldName)Create a transform that returns the year of the input value. | 
public static final Transform[] EMPTY_TRANSFORM
public static final java.lang.String NAME_OF_IDENTITY
public static final java.lang.String NAME_OF_YEAR
public static final java.lang.String NAME_OF_MONTH
public static final java.lang.String NAME_OF_DAY
public static final java.lang.String NAME_OF_HOUR
public static final java.lang.String NAME_OF_BUCKET
public static final java.lang.String NAME_OF_TRUNCATE
public static final java.lang.String NAME_OF_LIST
public static final java.lang.String NAME_OF_RANGE
public static Transforms.IdentityTransform identity(java.lang.String[] fieldName)
fieldName - The field name to transformpublic static Transforms.IdentityTransform identity(java.lang.String columnName)
columnName - The column name to transformpublic static Transforms.YearTransform year(java.lang.String[] fieldName)
fieldName - The field name to transformpublic static Transforms.YearTransform year(java.lang.String columnName)
columnName - The column name to transformpublic static Transforms.MonthTransform month(java.lang.String[] fieldName)
fieldName - The field name to transformpublic static Transforms.MonthTransform month(java.lang.String columnName)
columnName - The column name to transformpublic static Transforms.DayTransform day(java.lang.String[] fieldName)
fieldName - The field name to transformpublic static Transforms.DayTransform day(java.lang.String columnName)
columnName - The column name to transformpublic static Transforms.HourTransform hour(java.lang.String[] fieldName)
fieldName - The field name to transformpublic static Transforms.HourTransform hour(java.lang.String columnName)
columnName - The column name to transformpublic static Transforms.BucketTransform bucket(int numBuckets, java.lang.String[]... fieldNames)
numBuckets - The number of buckets to usefieldNames - The field names to transformpublic static Transforms.ListTransform list(java.lang.String[]... fieldNames)
fieldNames - The field names to include in the listpublic static Transforms.ListTransform list(java.lang.String[][] fieldNames, ListPartition[] assignments)
fieldNames - The field names to include in the listassignments - The preassigned list partitionspublic static Transforms.RangeTransform range(java.lang.String[] fieldName)
fieldName - The field name to transformpublic static Transforms.RangeTransform range(java.lang.String[] fieldName, RangePartition[] assignments)
fieldName - The field name to transformassignments - The preassigned range partitionspublic static Transforms.TruncateTransform truncate(int width, java.lang.String[] fieldName)
width - The width to truncate tofieldName - The field name to transformpublic static Transforms.TruncateTransform truncate(int width, java.lang.String columnName)
width - The width to truncate tocolumnName - The column name to transformpublic static Transforms.ApplyTransform apply(java.lang.String name, Expression[] arguments)
name - The name of the function to applyarguments - The arguments to the function