Class Transformer.TransformedInputRow
- java.lang.Object
-
- org.apache.druid.segment.transform.Transformer.TransformedInputRow
-
- All Implemented Interfaces:
Comparable<Row>
,InputRow
,Row
- Enclosing class:
- Transformer
public static class Transformer.TransformedInputRow extends Object implements InputRow
-
-
Constructor Summary
Constructors Constructor Description TransformedInputRow(InputRow row, Map<String,RowFunction> transforms)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Row o)
boolean
equals(Object o)
InputRow
getBaseRow()
List<String>
getDimension(String dimension)
Returns the list of dimension values for the given column name.List<String>
getDimensions()
Returns the dimensions that exist in this row.Number
getMetric(String metric)
Returns the metric column value for the given column name.Object
getRaw(String column)
Returns the raw dimension value for the given column name.org.joda.time.DateTime
getTimestamp()
Returns the timestamp from the epoch as an org.joda.time.DateTime.long
getTimestampFromEpoch()
Returns the timestamp from the epoch in milliseconds.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
TransformedInputRow
public TransformedInputRow(InputRow row, Map<String,RowFunction> transforms)
-
-
Method Detail
-
getDimensions
public List<String> getDimensions()
Description copied from interface:InputRow
Returns the dimensions that exist in this row.- Specified by:
getDimensions
in interfaceInputRow
- Returns:
- the dimensions that exist in this row.
-
getTimestampFromEpoch
public long getTimestampFromEpoch()
Description copied from interface:Row
Returns the timestamp from the epoch in milliseconds. If the event happened _right now_, this would return the same thing as System.currentTimeMillis();- Specified by:
getTimestampFromEpoch
in interfaceRow
- Returns:
- the timestamp from the epoch in milliseconds.
-
getTimestamp
public org.joda.time.DateTime getTimestamp()
Description copied from interface:Row
Returns the timestamp from the epoch as an org.joda.time.DateTime. If the event happened _right now_, this would return the same thing as new DateTime();- Specified by:
getTimestamp
in interfaceRow
- Returns:
- the timestamp from the epoch as an org.joda.time.DateTime object.
-
getDimension
public List<String> getDimension(String dimension)
Description copied from interface:Row
Returns the list of dimension values for the given column name.- Specified by:
getDimension
in interfaceRow
- Parameters:
dimension
- the column name of the dimension requested- Returns:
- the list of values for the provided column name
-
getRaw
public Object getRaw(String column)
Description copied from interface:Row
Returns the raw dimension value for the given column name. This is different fromRow.getDimension(java.lang.String)
which converts all values to strings before returning them.
-
getMetric
public Number getMetric(String metric)
Description copied from interface:Row
Returns the metric column value for the given column name. This method is different fromRow.getRaw(java.lang.String)
in two aspects: 1. If the column is absent in the row, either numeric zero or null will be returned, depending on the value of druid.generic.useDefaultValueForNull. 2. If the column has string value, an attempt is made to parse this value as a number.
-
getBaseRow
public InputRow getBaseRow()
-
compareTo
public int compareTo(Row o)
- Specified by:
compareTo
in interfaceComparable<Row>
-
-