public class Transforms
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
Transforms.ApplyTransform
A transform that applies a function to the input value. 
 | 
static class  | 
Transforms.BucketTransform
A transform that returns the bucket of the input value. 
 | 
static class  | 
Transforms.DayTransform
A transform that returns the day of the input value. 
 | 
static class  | 
Transforms.HourTransform
A transform that returns the hour of the input value. 
 | 
static class  | 
Transforms.IdentityTransform
A transform that returns the input value. 
 | 
static class  | 
Transforms.ListTransform
A transform that includes multiple fields in a list. 
 | 
static class  | 
Transforms.MonthTransform
A transform that returns the month of the input value. 
 | 
static class  | 
Transforms.RangeTransform
A transform that returns the range of the input value. 
 | 
static class  | 
Transforms.TruncateTransform
A transform that returns the truncated value of the input value with the given width. 
 | 
static class  | 
Transforms.YearTransform
A transform that returns the year of the input value. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
static Transform[] | 
EMPTY_TRANSFORM
An empty array of transforms. 
 | 
static java.lang.String | 
NAME_OF_BUCKET
The name of the bucket transform. 
 | 
static java.lang.String | 
NAME_OF_DAY
The name of the day transform. 
 | 
static java.lang.String | 
NAME_OF_HOUR
The name of the hour transform. 
 | 
static java.lang.String | 
NAME_OF_IDENTITY
The name of the identity transform. 
 | 
static java.lang.String | 
NAME_OF_LIST
The name of the list transform. 
 | 
static java.lang.String | 
NAME_OF_MONTH
The name of the month transform. 
 | 
static java.lang.String | 
NAME_OF_RANGE
The name of the range transform. 
 | 
static java.lang.String | 
NAME_OF_TRUNCATE
The name of the truncate transform. 
 | 
static java.lang.String | 
NAME_OF_YEAR
The 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