Exemplo n.º 1
0
        private static void writeRowGroupIndexes(JsonWriter writer, int col,
                                                 OrcProto.RowIndex[] rowGroupIndex)
        {
            OrcProto.RowIndex index;
            if (rowGroupIndex == null || (col >= rowGroupIndex.Length) ||
                ((index = rowGroupIndex[col]) == null))
            {
                return;
            }

            writer.key("rowGroupIndexes").array();
            for (int entryIx = 0; entryIx < index.EntryCount; ++entryIx)
            {
                writer.newObject();
                writer.key("entryId").value(entryIx);
                OrcProto.RowIndexEntry entry = index.EntryList[entryIx];
                if (entry == null)
                {
                    continue;
                }
                OrcProto.ColumnStatistics colStats = entry.Statistics;
                writeColumnStatistics(writer, ColumnStatisticsImpl.deserialize(colStats));
                writer.key("positions").array();
                for (int posIx = 0; posIx < entry.PositionsCount; ++posIx)
                {
                    writer.value(entry.PositionsList[posIx]);
                }
                writer.endArray();
                writer.endObject();
            }
            writer.endArray();
        }
Exemplo n.º 2
0
 public ColumnStatistics[] getStatistics()
 {
     ColumnStatistics[] result = new ColumnStatistics[types.Count];
     for (int i = 0; i < result.Length; ++i)
     {
         result[i] = ColumnStatisticsImpl.deserialize(fileStats[i]);
     }
     return(result);
 }