@Test public void testReadLong256Four() { try (TableModel model = new TableModel(configuration, "w", PartitionBy.DAY).col("l", ColumnType.LONG256).timestamp()) { CairoTestUtils.create(model); } final int N = 1_000_000; final Rnd rnd = new Rnd(); long timestamp = 0; try (TableWriter writer = new TableWriter(configuration, "w")) { for (int i = 0; i < N; i++) { TableWriter.Row row = writer.newRow(timestamp); row.putLong256(0, "0x" + padHexLong(rnd.nextLong()) + padHexLong(rnd.nextLong()) + padHexLong(rnd.nextLong()) + padHexLong(rnd.nextLong())); row.append(); } writer.commit(); } rnd.reset(); final StringSink sink = new StringSink(); try (TableReader reader = new TableReader(configuration, "w")) { final RecordCursor cursor = reader.getCursor(); final Record record = cursor.getRecord(); int count = 0; while (cursor.hasNext()) { sink.clear(); record.getLong256(0, sink); TestUtils.assertEquals("0x" + padHexLong(rnd.nextLong()) + padHexLong(rnd.nextLong()) + padHexLong(rnd.nextLong()) + padHexLong(rnd.nextLong()), sink); count++; } Assert.assertEquals(N, count); } }
public TableReaderRecordCursor getCursor() { recordCursor.toTop(); return recordCursor; }
TableReader implements Closeable { public TableReaderRecordCursor getCursor() { recordCursor.toTop(); return recordCursor; } }
TableReader implements Closeable { public TableReaderRecordCursor getCursor() { recordCursor.toTop(); return recordCursor; } TableReader(CairoConfiguration configuration, CharSequence tableName); }
TableReader implements Closeable { public TableReaderRecordCursor getCursor() { recordCursor.toTop(); return recordCursor; } TableReader(CairoConfiguration configuration, CharSequence tableName); static int getPrimaryColumnIndex(int base, int index); double avgDouble(int columnIndex); @Override void close(); void closeColumnForRemove(int columnIndex); void closeColumnForRemove(CharSequence columnName); long floorToPartitionTimestamp(long timestamp); BitmapIndexReader getBitmapIndexReader(int columnBase, int columnIndex, int direction); int getColumnBase(int partitionIndex); TableReaderRecordCursor getCursor(); long getDataVersion(); long getMaxTimestamp(); RecordMetadata getMetadata(); long getMinTimestamp(); long getPageAddressAt(int partitionIndex, long row, int columnIndex); long getPageValueCount(int partitionIndex, long rowLo, long rowHi, int columnIndex); int getPartitionCount(); int getPartitionCountBetweenTimestamps(long partitionTimestamp1, long partitionTimestamp2); int getPartitionedBy(); SymbolMapReader getSymbolMapReader(int columnIndex); String getTableName(); long getVersion(); boolean isOpen(); double maxDouble(int columnIndex); double minDouble(int columnIndex); boolean reload(); void reshuffleSymbolMapReaders(long pTransitionIndex); long size(); double sumDouble(int columnIndex); ReadOnlyColumn getColumn(int absoluteIndex); long getColumnTop(int base, int columnIndex); long openPartition(int partitionIndex); }
TableReader implements Closeable { public TableReaderRecordCursor getCursor() { recordCursor.toTop(); return recordCursor; } TableReader(CairoConfiguration configuration, CharSequence tableName); static int getPrimaryColumnIndex(int base, int index); double avgDouble(int columnIndex); @Override void close(); void closeColumnForRemove(int columnIndex); void closeColumnForRemove(CharSequence columnName); long floorToPartitionTimestamp(long timestamp); BitmapIndexReader getBitmapIndexReader(int columnBase, int columnIndex, int direction); int getColumnBase(int partitionIndex); TableReaderRecordCursor getCursor(); long getDataVersion(); long getMaxTimestamp(); RecordMetadata getMetadata(); long getMinTimestamp(); long getPageAddressAt(int partitionIndex, long row, int columnIndex); long getPageValueCount(int partitionIndex, long rowLo, long rowHi, int columnIndex); int getPartitionCount(); int getPartitionCountBetweenTimestamps(long partitionTimestamp1, long partitionTimestamp2); int getPartitionedBy(); SymbolMapReader getSymbolMapReader(int columnIndex); String getTableName(); long getVersion(); boolean isOpen(); double maxDouble(int columnIndex); double minDouble(int columnIndex); boolean reload(); void reshuffleSymbolMapReaders(long pTransitionIndex); long size(); double sumDouble(int columnIndex); ReadOnlyColumn getColumn(int absoluteIndex); long getColumnTop(int base, int columnIndex); long openPartition(int partitionIndex);  }