Class SparkRow

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<org.gorpipe.gor.model.Row>, org.apache.spark.sql.Row, org.gorpipe.gor.model.ColumnValueProvider, scala.Serializable
    Direct Known Subclasses:
    GorSparkRow, NorSparkRow

    public class SparkRow
    extends GorSparkRowBase
    implements java.io.Serializable
    See Also:
    Serialized Form
    • 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

      Fields 
      Modifier and Type Field Description
      org.apache.spark.sql.Row row  
      • Fields inherited from class org.gorpipe.gor.model.Row

        bH, chr, isProgress, pos
    • Constructor Summary

      Constructors 
      Constructor Description
      SparkRow​(org.apache.spark.sql.Row sparkrow)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addColumns​(int num)  
      void addSingleColumnToRow​(java.lang.String rowString)  
      java.lang.Object apply​(int i)  
      double colAsDouble​(int colNum)  
      int colAsInt​(int colNum)  
      long colAsLong​(int colNum)  
      java.lang.String colAsString​(int colNum)  
      java.lang.CharSequence colsSlice​(int startCol, int stopCol)  
      org.apache.spark.sql.Row copy()  
      double doubleValue​(int col)  
      java.lang.Object get​(int i)  
      java.lang.CharSequence getAllCols()  
      boolean getBoolean​(int i)  
      float getFloat​(int i)  
      int getInt​(int i)  
      long getLong​(int i)  
      java.lang.String getString​(int i)  
      void init()  
      int intValue​(int col)  
      boolean isNullAt​(int i)  
      int length()  
      long longValue​(int col)  
      int numCols()  
      java.lang.String otherCols()  
      int otherColsLength()  
      char peekAtColumn​(int n)  
      void removeColumn​(int n)  
      void resize​(int newsize)  
      org.gorpipe.gor.model.Row rowWithSelectedColumns​(int[] columnIndices)  
      int sa​(int i)  
      org.apache.spark.sql.types.StructType schema()  
      java.lang.String selectedColumns​(int[] columnIndices)  
      void setColumn​(int k, java.lang.String val)  
      org.gorpipe.gor.model.Row slicedRow​(int startCol, int stopCol)  
      java.lang.String stringValue​(int col)  
      java.lang.String toColString()  
      java.lang.String toString()  
      void writeNorRowToStream​(java.io.OutputStream outputStream)  
      void writeRow​(java.io.Writer outputStream)  
      void writeRowToStream​(java.io.OutputStream outputStream)  
      • Methods inherited from class org.gorpipe.gor.model.Row

        advancedCompare, atPriorPos, atSamePos, colAsBytes, compareTo, copyRow, equals, getSplitArray, joinedWithSlice, joinedWithSliceAndAddedColumn, otherColsSlice, rowWithAddedColumn, rowWithAddedColumns, rowWithAddedColumns, setColumns
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods 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 Detail

      • row

        public org.apache.spark.sql.Row row
    • Constructor Detail

      • SparkRow

        public SparkRow​(org.apache.spark.sql.Row sparkrow)
    • Method Detail

      • init

        public void init()
      • apply

        public java.lang.Object apply​(int i)
        Specified by:
        apply in interface org.apache.spark.sql.Row
        Specified by:
        apply in class GorSparkRowBase
      • get

        public java.lang.Object get​(int i)
        Specified by:
        get in interface org.apache.spark.sql.Row
        Specified by:
        get in class GorSparkRowBase
      • isNullAt

        public boolean isNullAt​(int i)
        Specified by:
        isNullAt in interface org.apache.spark.sql.Row
        Specified by:
        isNullAt in class GorSparkRowBase
      • getString

        public java.lang.String getString​(int i)
        Specified by:
        getString in interface org.apache.spark.sql.Row
        Specified by:
        getString in class GorSparkRowBase
      • copy

        public org.apache.spark.sql.Row copy()
        Specified by:
        copy in interface org.apache.spark.sql.Row
        Specified by:
        copy in class GorSparkRowBase
      • getBoolean

        public boolean getBoolean​(int i)
        Specified by:
        getBoolean in interface org.apache.spark.sql.Row
        Specified by:
        getBoolean in class GorSparkRowBase
      • getInt

        public int getInt​(int i)
        Specified by:
        getInt in interface org.apache.spark.sql.Row
        Specified by:
        getInt in class GorSparkRowBase
      • getLong

        public long getLong​(int i)
        Specified by:
        getLong in interface org.apache.spark.sql.Row
        Specified by:
        getLong in class GorSparkRowBase
      • getFloat

        public float getFloat​(int i)
        Specified by:
        getFloat in interface org.apache.spark.sql.Row
        Specified by:
        getFloat in class GorSparkRowBase
      • schema

        public org.apache.spark.sql.types.StructType schema()
        Specified by:
        schema in interface org.apache.spark.sql.Row
        Specified by:
        schema in class GorSparkRowBase
      • stringValue

        public java.lang.String stringValue​(int col)
        Specified by:
        stringValue in interface org.gorpipe.gor.model.ColumnValueProvider
        Specified by:
        stringValue in class GorSparkRowBase
      • intValue

        public int intValue​(int col)
        Specified by:
        intValue in interface org.gorpipe.gor.model.ColumnValueProvider
        Specified by:
        intValue in class GorSparkRowBase
      • longValue

        public long longValue​(int col)
        Specified by:
        longValue in interface org.gorpipe.gor.model.ColumnValueProvider
        Specified by:
        longValue in class GorSparkRowBase
      • doubleValue

        public double doubleValue​(int col)
        Specified by:
        doubleValue in interface org.gorpipe.gor.model.ColumnValueProvider
        Specified by:
        doubleValue in class GorSparkRowBase
      • colsSlice

        public java.lang.CharSequence colsSlice​(int startCol,
                                                int stopCol)
        Specified by:
        colsSlice in class GorSparkRowBase
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface org.apache.spark.sql.Row
        Specified by:
        toString in class GorSparkRowBase
      • slicedRow

        public org.gorpipe.gor.model.Row slicedRow​(int startCol,
                                                   int stopCol)
        Specified by:
        slicedRow in class GorSparkRowBase
      • setColumn

        public void setColumn​(int k,
                              java.lang.String val)
        Specified by:
        setColumn in class GorSparkRowBase
      • writeRow

        public void writeRow​(java.io.Writer outputStream)
        Specified by:
        writeRow in class GorSparkRowBase
      • writeRowToStream

        public void writeRowToStream​(java.io.OutputStream outputStream)
                              throws java.io.IOException
        Specified by:
        writeRowToStream in class GorSparkRowBase
        Throws:
        java.io.IOException
      • writeNorRowToStream

        public void writeNorRowToStream​(java.io.OutputStream outputStream)
                                 throws java.io.IOException
        Specified by:
        writeNorRowToStream in class org.gorpipe.gor.model.Row
        Throws:
        java.io.IOException
      • length

        public int length()
        Specified by:
        length in interface org.apache.spark.sql.Row
        Specified by:
        length in class GorSparkRowBase