Class PinotSegmentRecordReader

    • Constructor Detail

      • PinotSegmentRecordReader

        public PinotSegmentRecordReader()
      • PinotSegmentRecordReader

        @Deprecated
        public PinotSegmentRecordReader​(File indexDir)
                                 throws Exception
        Deprecated.
        Deprecated: use empty constructor and init() instead. Read records using the segment schema
        Parameters:
        indexDir - input path for the segment index
        Throws:
        Exception
      • PinotSegmentRecordReader

        @Deprecated
        public PinotSegmentRecordReader​(File indexDir,
                                        @Nullable
                                        Schema schema,
                                        @Nullable
                                        List<String> sortOrder)
                                 throws Exception
        Deprecated.
        Deprecated: use empty constructor and init() instead. Read records using the segment schema with the given schema and sort order

        Passed in schema must be a subset of the segment schema.

        Parameters:
        indexDir - input path for the segment index
        schema - input schema that is a subset of the segment schema
        sortOrder - a list of column names that represent the sorting order
        Throws:
        Exception
    • Method Detail

      • init

        public void init​(File indexDir,
                         @Nullable
                         Set<String> fieldsToRead,
                         @Nullable
                         List<String> sortOrder,
                         boolean skipDefaultNullValues)
        Initializes the record reader from an index directory.
        Parameters:
        indexDir - Index directory
        fieldsToRead - The fields to read from the segment. If null or empty, reads all fields
        sortOrder - List of sorted columns
        skipDefaultNullValues - Whether to skip putting default null values into the record
      • init

        public void init​(IndexSegment indexSegment)
        Initializes the record reader from a segment.
        Parameters:
        indexSegment - Index segment to read from
      • init

        public void init​(MutableSegment mutableSegment,
                         @Nullable
                         int[] sortedDocIds)
        Initializes the record reader from a mutable segment with optional sorted document ids.
        Parameters:
        mutableSegment - Mutable segment
        sortedDocIds - Array of sorted document ids
      • getSortedDocIds

        @Nullable
        public int[] getSortedDocIds()
        Returns the sorted document ids.
      • getRecord

        public void getRecord​(int docId,
                              GenericRow buffer)
      • getValue

        public Object getValue​(int docId,
                               String column)