Package org.gorpipe.spark
Class SparkRow
java.lang.Object
org.gorpipe.gor.model.Row
org.gorpipe.spark.GorSparkRowBase
org.gorpipe.spark.SparkRow
- All Implemented Interfaces:
Serializable,Comparable<org.gorpipe.gor.model.Row>,org.apache.spark.sql.Row,org.gorpipe.gor.model.ColumnValueProvider,scala.Serializable
- Direct Known Subclasses:
GorSparkRow,NorSparkRow
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.gorpipe.gor.model.Row
org.gorpipe.gor.model.Row.SortInfo, org.gorpipe.gor.model.Row.SortOrder, org.gorpipe.gor.model.Row.SortType -
Field Summary
FieldsFields inherited from class org.gorpipe.gor.model.Row
bH, chr, isProgress, pos -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumns(int num) voidaddSingleColumnToRow(String rowString) apply(int i) doublecolAsDouble(int colNum) intcolAsInt(int colNum) longcolAsLong(int colNum) colAsString(int colNum) colsSlice(int startCol, int stopCol) org.apache.spark.sql.Rowcopy()doubledoubleValue(int col) get(int i) booleangetBoolean(int i) floatgetFloat(int i) intgetInt(int i) longgetLong(int i) getString(int i) voidinit()intintValue(int col) booleanisNullAt(int i) intlength()longlongValue(int col) intnumCols()intcharpeekAtColumn(int n) voidremoveColumn(int n) voidresize(int newsize) org.gorpipe.gor.model.RowrowWithSelectedColumns(int[] columnIndices) intsa(int i) org.apache.spark.sql.types.StructTypeschema()selectedColumns(int[] columnIndices) voidorg.gorpipe.gor.model.RowslicedRow(int startCol, int stopCol) stringValue(int col) toString()voidwriteNorRowToStream(OutputStream outputStream) voidvoidwriteRowToStream(OutputStream outputStream) Methods inherited from class org.gorpipe.gor.model.Row
advancedCompare, atPriorPos, atSamePos, colAsBytes, compareTo, copyRow, countColumns, equals, getSplitArray, joinedWithSlice, joinedWithSliceAndAddedColumn, otherColsSlice, rowWithAddedColumn, rowWithAddedColumns, rowWithAddedColumns, setColumnsMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.spark.sql.Row
anyNull, equals, fieldIndex, getAs, getAs, getByte, getDate, getDecimal, getDouble, getInstant, getJavaMap, getList, getLocalDate, getMap, getSeq, getShort, getStruct, getTimestamp, getValuesMap, hashCode, json, jsonValue, mkString, mkString, mkString, prettyJson, size, toSeq
-
Field Details
-
row
public org.apache.spark.sql.Row row
-
-
Constructor Details
-
SparkRow
public SparkRow(org.apache.spark.sql.Row sparkrow)
-
-
Method Details
-
init
public void init() -
apply
- Specified by:
applyin interfaceorg.apache.spark.sql.Row- Specified by:
applyin classGorSparkRowBase
-
get
- Specified by:
getin interfaceorg.apache.spark.sql.Row- Specified by:
getin classGorSparkRowBase
-
isNullAt
public boolean isNullAt(int i) - Specified by:
isNullAtin interfaceorg.apache.spark.sql.Row- Specified by:
isNullAtin classGorSparkRowBase
-
getString
- Specified by:
getStringin interfaceorg.apache.spark.sql.Row- Specified by:
getStringin classGorSparkRowBase
-
copy
public org.apache.spark.sql.Row copy()- Specified by:
copyin interfaceorg.apache.spark.sql.Row- Specified by:
copyin classGorSparkRowBase
-
getBoolean
public boolean getBoolean(int i) - Specified by:
getBooleanin interfaceorg.apache.spark.sql.Row- Specified by:
getBooleanin classGorSparkRowBase
-
getInt
public int getInt(int i) - Specified by:
getIntin interfaceorg.apache.spark.sql.Row- Specified by:
getIntin classGorSparkRowBase
-
getLong
public long getLong(int i) - Specified by:
getLongin interfaceorg.apache.spark.sql.Row- Specified by:
getLongin classGorSparkRowBase
-
getFloat
public float getFloat(int i) - Specified by:
getFloatin interfaceorg.apache.spark.sql.Row- Specified by:
getFloatin classGorSparkRowBase
-
schema
public org.apache.spark.sql.types.StructType schema()- Specified by:
schemain interfaceorg.apache.spark.sql.Row- Specified by:
schemain classGorSparkRowBase
-
stringValue
- Specified by:
stringValuein interfaceorg.gorpipe.gor.model.ColumnValueProvider- Specified by:
stringValuein classGorSparkRowBase
-
intValue
public int intValue(int col) - Specified by:
intValuein interfaceorg.gorpipe.gor.model.ColumnValueProvider- Specified by:
intValuein classGorSparkRowBase
-
longValue
public long longValue(int col) - Specified by:
longValuein interfaceorg.gorpipe.gor.model.ColumnValueProvider- Specified by:
longValuein classGorSparkRowBase
-
doubleValue
public double doubleValue(int col) - Specified by:
doubleValuein interfaceorg.gorpipe.gor.model.ColumnValueProvider- Specified by:
doubleValuein classGorSparkRowBase
-
toColString
- Specified by:
toColStringin classGorSparkRowBase
-
colAsInt
public int colAsInt(int colNum) - Specified by:
colAsIntin classGorSparkRowBase
-
colAsDouble
public double colAsDouble(int colNum) - Specified by:
colAsDoublein classGorSparkRowBase
-
colAsLong
public long colAsLong(int colNum) - Specified by:
colAsLongin classGorSparkRowBase
-
colAsString
- Specified by:
colAsStringin classGorSparkRowBase
-
otherCols
- Specified by:
otherColsin classGorSparkRowBase
-
colsSlice
- Specified by:
colsSlicein classGorSparkRowBase
-
getAllCols
- Specified by:
getAllColsin classGorSparkRowBase
-
toString
- Specified by:
toStringin interfaceorg.apache.spark.sql.Row- Specified by:
toStringin classGorSparkRowBase
-
numCols
public int numCols()- Specified by:
numColsin classGorSparkRowBase
-
selectedColumns
- Specified by:
selectedColumnsin classGorSparkRowBase
-
otherColsLength
public int otherColsLength()- Specified by:
otherColsLengthin classGorSparkRowBase
-
addSingleColumnToRow
- Specified by:
addSingleColumnToRowin classGorSparkRowBase
-
slicedRow
public org.gorpipe.gor.model.Row slicedRow(int startCol, int stopCol) - Specified by:
slicedRowin classGorSparkRowBase
-
rowWithSelectedColumns
public org.gorpipe.gor.model.Row rowWithSelectedColumns(int[] columnIndices) - Specified by:
rowWithSelectedColumnsin classGorSparkRowBase
-
sa
public int sa(int i) - Specified by:
sain classGorSparkRowBase
-
resize
public void resize(int newsize) - Specified by:
resizein classGorSparkRowBase
-
setColumn
- Specified by:
setColumnin classGorSparkRowBase
-
addColumns
public void addColumns(int num) - Specified by:
addColumnsin classGorSparkRowBase
-
removeColumn
public void removeColumn(int n) - Specified by:
removeColumnin classGorSparkRowBase
-
peekAtColumn
public char peekAtColumn(int n) - Specified by:
peekAtColumnin classGorSparkRowBase
-
writeRow
- Specified by:
writeRowin classGorSparkRowBase
-
writeRowToStream
- Specified by:
writeRowToStreamin classGorSparkRowBase- Throws:
IOException
-
writeNorRowToStream
- Specified by:
writeNorRowToStreamin classorg.gorpipe.gor.model.Row- Throws:
IOException
-
length
public int length()- Specified by:
lengthin interfaceorg.apache.spark.sql.Row- Specified by:
lengthin classGorSparkRowBase
-