Class ConvertTreeReaderFactory.ConvertTreeReader

java.lang.Object
org.apache.orc.impl.TreeReaderFactory.TreeReader
org.apache.orc.impl.ConvertTreeReaderFactory.ConvertTreeReader
All Implemented Interfaces:
TypeReader
Direct Known Subclasses:
ConvertTreeReaderFactory.AnyIntegerFromAnyIntegerTreeReader, ConvertTreeReaderFactory.AnyIntegerFromDecimalTreeReader, ConvertTreeReaderFactory.AnyIntegerFromDoubleTreeReader, ConvertTreeReaderFactory.AnyIntegerFromStringGroupTreeReader, ConvertTreeReaderFactory.AnyIntegerFromTimestampTreeReader, ConvertTreeReaderFactory.DateFromStringGroupTreeReader, ConvertTreeReaderFactory.DateFromTimestampTreeReader, ConvertTreeReaderFactory.DecimalFromAnyIntegerTreeReader, ConvertTreeReaderFactory.DecimalFromDecimalTreeReader, ConvertTreeReaderFactory.DecimalFromDoubleTreeReader, ConvertTreeReaderFactory.DecimalFromStringGroupTreeReader, ConvertTreeReaderFactory.DecimalFromTimestampTreeReader, ConvertTreeReaderFactory.DoubleFromAnyIntegerTreeReader, ConvertTreeReaderFactory.DoubleFromDecimalTreeReader, ConvertTreeReaderFactory.DoubleFromStringGroupTreeReader, ConvertTreeReaderFactory.DoubleFromTimestampTreeReader, ConvertTreeReaderFactory.FloatFromDoubleTreeReader, ConvertTreeReaderFactory.StringGroupFromAnyIntegerTreeReader, ConvertTreeReaderFactory.StringGroupFromBinaryTreeReader, ConvertTreeReaderFactory.StringGroupFromDateTreeReader, ConvertTreeReaderFactory.StringGroupFromDecimalTreeReader, ConvertTreeReaderFactory.StringGroupFromDoubleTreeReader, ConvertTreeReaderFactory.StringGroupFromStringGroupTreeReader, ConvertTreeReaderFactory.StringGroupFromTimestampTreeReader, ConvertTreeReaderFactory.TimestampFromAnyIntegerTreeReader, ConvertTreeReaderFactory.TimestampFromDateTreeReader, ConvertTreeReaderFactory.TimestampFromDecimalTreeReader, ConvertTreeReaderFactory.TimestampFromDoubleTreeReader, ConvertTreeReaderFactory.TimestampFromStringGroupTreeReader
Enclosing class:
ConvertTreeReaderFactory

public static class ConvertTreeReaderFactory.ConvertTreeReader extends TreeReaderFactory.TreeReader
Override methods like checkEncoding to pass-thru to the convert TreeReader.
  • Method Details

    • assignStringGroupVectorEntry

      protected void assignStringGroupVectorEntry(org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector bytesColVector, int elementNum, TypeDescription readerType, byte[] bytes)
    • assignStringGroupVectorEntry

      protected void assignStringGroupVectorEntry(org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector bytesColVector, int elementNum, TypeDescription readerType, byte[] bytes, int start, int length)
    • convertStringGroupVectorElement

      protected void convertStringGroupVectorElement(org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector bytesColVector, int elementNum, TypeDescription readerType)
    • getIsParseError

      protected boolean getIsParseError()
    • parseLongFromString

      protected long parseLongFromString(String string)
    • parseFloatFromString

      protected float parseFloatFromString(String string)
    • parseDoubleFromString

      protected double parseDoubleFromString(String string)
    • parseDecimalFromString

      protected org.apache.hadoop.hive.common.type.HiveDecimal parseDecimalFromString(String string)
      Parameters:
      string -
      Returns:
      the HiveDecimal parsed, or null if there was a parse error.
    • doubleCanFitInLong

      public boolean doubleCanFitInLong(double doubleValue)
    • checkEncoding

      public void checkEncoding(OrcProto.ColumnEncoding encoding) throws IOException
      Specified by:
      checkEncoding in interface TypeReader
      Overrides:
      checkEncoding in class TreeReaderFactory.TreeReader
      Throws:
      IOException
    • startStripe

      public void startStripe(StripePlanner planner, TypeReader.ReadPhase readPhase) throws IOException
      Specified by:
      startStripe in interface TypeReader
      Overrides:
      startStripe in class TreeReaderFactory.TreeReader
      Throws:
      IOException
    • seek

      public void seek(PositionProvider[] index, TypeReader.ReadPhase readPhase) throws IOException
      Description copied from class: TreeReaderFactory.TreeReader
      Seek to the given position.
      Specified by:
      seek in interface TypeReader
      Overrides:
      seek in class TreeReaderFactory.TreeReader
      Parameters:
      index - the indexes loaded from the file
      readPhase - the current readPhase
      Throws:
      IOException
    • seek

      public void seek(PositionProvider index, TypeReader.ReadPhase readPhase) throws IOException
      Specified by:
      seek in interface TypeReader
      Overrides:
      seek in class TreeReaderFactory.TreeReader
      Throws:
      IOException
    • skipRows

      public void skipRows(long items, TypeReader.ReadPhase readPhase) throws IOException
      Throws:
      IOException
    • setConvertVectorElement

      public void setConvertVectorElement(int elementNum) throws IOException
      Override this to use convertVector. Source and result are member variables in the subclass with the right type.
      Parameters:
      elementNum -
      Throws:
      IOException
    • convertVector

      public void convertVector(org.apache.hadoop.hive.ql.exec.vector.ColumnVector fromColVector, org.apache.hadoop.hive.ql.exec.vector.ColumnVector resultColVector, int batchSize) throws IOException
      Throws:
      IOException
    • downCastAnyInteger

      public void downCastAnyInteger(org.apache.hadoop.hive.ql.exec.vector.LongColumnVector longColVector, int elementNum, TypeDescription readerType)
    • downCastAnyInteger

      public void downCastAnyInteger(org.apache.hadoop.hive.ql.exec.vector.LongColumnVector longColVector, int elementNum, long inputLong, TypeDescription readerType)
    • integerDownCastNeeded

      protected boolean integerDownCastNeeded(TypeDescription fileType, TypeDescription readerType)