@Test public void testSubset() { SingleColumnType keyTypes = new SingleColumnType(ColumnType.INT); try (TableModel model = new TableModel(configuration, "all", PartitionBy.NONE) .col("int", ColumnType.INT) .col("short", ColumnType.SHORT) .col("byte", ColumnType.BYTE) .col("double", ColumnType.DOUBLE) .col("float", ColumnType.FLOAT) .col("long", ColumnType.LONG) .col("sym", ColumnType.SYMBOL).symbolCapacity(64) .col("bool", ColumnType.BOOLEAN) .col("date", ColumnType.DATE) .col("ts", ColumnType.TIMESTAMP) ) { CairoTestUtils.create(model); } final int N = 1024; final Rnd rnd = new Rnd(); try (TableWriter writer = new TableWriter(configuration, "all")) { for (int i = 0; i < N; i++) { TableWriter.Row row = writer.newRow(); row.putInt(0, rnd.nextInt()); row.putShort(1, rnd.nextShort()); row.putByte(2, rnd.nextByte()); row.putDouble(3, rnd.nextDouble()); row.putFloat(4, rnd.nextFloat()); row.putLong(5, rnd.nextLong()); row.putSym(6, rnd.nextChars(10)); row.putBool(7, rnd.nextBoolean()); row.putDate(8, rnd.nextLong()); row.putTimestamp(9, rnd.nextLong()); row.append(); } writer.commit(); } try (TableReader reader = new TableReader(configuration, "all")) { ArrayColumnTypes valueTypes = new ArrayColumnTypes(); valueTypes.add(ColumnType.BOOLEAN); valueTypes.add(ColumnType.TIMESTAMP); valueTypes.add(ColumnType.INT); try (final Map map = new FastMap(Numbers.SIZE_1MB, keyTypes, valueTypes, N, 0.5, 100)) { ListColumnFilter columnFilter = new ListColumnFilter(); columnFilter.add(7); columnFilter.add(9); columnFilter.add(6); RecordValueSink sink = RecordValueSinkFactory.getInstance(new BytecodeAssembler(), reader.getMetadata(), columnFilter); RecordCursor cursor = reader.getCursor(); final Record record = cursor.getRecord(); int index = 0; while (cursor.hasNext()) { MapKey key = map.withKey(); key.putInt(index++); MapValue value = key.createValue(); sink.copy(record, value); } Assert.assertEquals(N, index); rnd.reset(); StaticSymbolTable symbolTable = reader.getSymbolMapReader(6); for (int i = 0; i < N; i++) { MapKey key = map.withKey(); key.putInt(i); MapValue value = key.findValue(); Assert.assertNotNull(value); rnd.nextInt(); rnd.nextShort(); rnd.nextByte(); rnd.nextDouble(); rnd.nextFloat(); rnd.nextLong(); Assert.assertEquals(symbolTable.keyOf(rnd.nextChars(10)), value.getInt(2)); Assert.assertEquals(rnd.nextBoolean(), value.getBool(0)); rnd.nextLong(); Assert.assertEquals(rnd.nextLong(), value.getTimestamp(1)); } } } }
public static RecordValueSink getInstance(BytecodeAssembler asm, ColumnTypes columnTypes, @Transient ColumnFilter columnFilter) { asm.init(RecordSink.class); asm.setupPool(); int thisClassIndex = asm.poolClass(asm.poolUtf8("io/questdb/cairo/valuesink")); int interfaceClassIndex = asm.poolClass(RecordValueSink.class); int rGetInt = asm.poolInterfaceMethod(Record.class, "getInt", "(I)I"); int rGetLong = asm.poolInterfaceMethod(Record.class, "getLong", "(I)J"); int rGetDate = asm.poolInterfaceMethod(Record.class, "getDate", "(I)J"); int rGetTimestamp = asm.poolInterfaceMethod(Record.class, "getTimestamp", "(I)J"); int rGetByte = asm.poolInterfaceMethod(Record.class, "getByte", "(I)B"); int rGetShort = asm.poolInterfaceMethod(Record.class, "getShort", "(I)S"); int rGetChar = asm.poolInterfaceMethod(Record.class, "getChar", "(I)C"); int rGetBool = asm.poolInterfaceMethod(Record.class, "getBool", "(I)Z"); int rGetFloat = asm.poolInterfaceMethod(Record.class, "getFloat", "(I)F"); int rGetDouble = asm.poolInterfaceMethod(Record.class, "getDouble", "(I)D"); int wPutInt = asm.poolInterfaceMethod(MapValue.class, "putInt", "(II)V"); int wPutLong = asm.poolInterfaceMethod(MapValue.class, "putLong", "(IJ)V"); int wPutByte = asm.poolInterfaceMethod(MapValue.class, "putByte", "(IB)V"); int wPutShort = asm.poolInterfaceMethod(MapValue.class, "putShort", "(IS)V"); int wPutChar = asm.poolInterfaceMethod(MapValue.class, "putChar", "(IC)V"); int wPutBool = asm.poolInterfaceMethod(MapValue.class, "putBool", "(IZ)V"); int wPutFloat = asm.poolInterfaceMethod(MapValue.class, "putFloat", "(IF)V"); int wPutDouble = asm.poolInterfaceMethod(MapValue.class, "putDouble", "(ID)V"); int wPutDate = asm.poolInterfaceMethod(MapValue.class, "putDate", "(IJ)V"); int wPutTimestamp = asm.poolInterfaceMethod(MapValue.class, "putTimestamp", "(IJ)V"); int copyNameIndex = asm.poolUtf8("copy"); int copySigIndex = asm.poolUtf8("(Lio/questdb/cairo/sql/Record;Lio/questdb/cairo/map/MapValue;)V"); asm.finishPool(); asm.defineClass(thisClassIndex); asm.interfaceCount(1); asm.putShort(interfaceClassIndex); asm.fieldCount(0); asm.methodCount(2); asm.defineDefaultConstructor(); asm.startMethod(copyNameIndex, copySigIndex, 4, 3); int n = columnFilter.getColumnCount(); for (int i = 0; i < n; i++) { int index = columnFilter.getColumnIndex(i); asm.aload(2); asm.iconst(i); asm.aload(1); asm.iconst(index); switch (columnTypes.getColumnType(index)) { case ColumnType.INT: case ColumnType.SYMBOL: asm.invokeInterface(rGetInt, 1); asm.invokeInterface(wPutInt, 2); break; case ColumnType.LONG: asm.invokeInterface(rGetLong, 1); asm.invokeInterface(wPutLong, 3); break; case ColumnType.DATE: asm.invokeInterface(rGetDate, 1); asm.invokeInterface(wPutDate, 3); break; case ColumnType.TIMESTAMP: asm.invokeInterface(rGetTimestamp, 1); asm.invokeInterface(wPutTimestamp, 3); break; case ColumnType.BYTE: asm.invokeInterface(rGetByte, 1); asm.invokeInterface(wPutByte, 2); break; case ColumnType.SHORT: asm.invokeInterface(rGetShort, 1); asm.invokeInterface(wPutShort, 2); break; case ColumnType.CHAR: asm.invokeInterface(rGetChar, 1); asm.invokeInterface(wPutChar, 2); break; case ColumnType.BOOLEAN: asm.invokeInterface(rGetBool, 1); asm.invokeInterface(wPutBool, 2); break; case ColumnType.FLOAT: asm.invokeInterface(rGetFloat, 1); asm.invokeInterface(wPutFloat, 2); break; case ColumnType.DOUBLE: asm.invokeInterface(rGetDouble, 1); asm.invokeInterface(wPutDouble, 3); break; default: throw new UnsupportedOperationException(); } } asm.return_(); asm.endMethodCode(); asm.putShort(0); asm.putShort(0); asm.endMethod(); asm.putShort(0); return asm.newInstance(); }
RecordValueSinkFactory { public static RecordValueSink getInstance(BytecodeAssembler asm, ColumnTypes columnTypes, @Transient ColumnFilter columnFilter) { asm.init(RecordSink.class); asm.setupPool(); int thisClassIndex = asm.poolClass(asm.poolUtf8("io/questdb/cairo/valuesink")); int interfaceClassIndex = asm.poolClass(RecordValueSink.class); int rGetInt = asm.poolInterfaceMethod(Record.class, "getInt", "(I)I"); int rGetLong = asm.poolInterfaceMethod(Record.class, "getLong", "(I)J"); int rGetDate = asm.poolInterfaceMethod(Record.class, "getDate", "(I)J"); int rGetTimestamp = asm.poolInterfaceMethod(Record.class, "getTimestamp", "(I)J"); int rGetByte = asm.poolInterfaceMethod(Record.class, "getByte", "(I)B"); int rGetShort = asm.poolInterfaceMethod(Record.class, "getShort", "(I)S"); int rGetChar = asm.poolInterfaceMethod(Record.class, "getChar", "(I)C"); int rGetBool = asm.poolInterfaceMethod(Record.class, "getBool", "(I)Z"); int rGetFloat = asm.poolInterfaceMethod(Record.class, "getFloat", "(I)F"); int rGetDouble = asm.poolInterfaceMethod(Record.class, "getDouble", "(I)D"); int wPutInt = asm.poolInterfaceMethod(MapValue.class, "putInt", "(II)V"); int wPutLong = asm.poolInterfaceMethod(MapValue.class, "putLong", "(IJ)V"); int wPutByte = asm.poolInterfaceMethod(MapValue.class, "putByte", "(IB)V"); int wPutShort = asm.poolInterfaceMethod(MapValue.class, "putShort", "(IS)V"); int wPutChar = asm.poolInterfaceMethod(MapValue.class, "putChar", "(IC)V"); int wPutBool = asm.poolInterfaceMethod(MapValue.class, "putBool", "(IZ)V"); int wPutFloat = asm.poolInterfaceMethod(MapValue.class, "putFloat", "(IF)V"); int wPutDouble = asm.poolInterfaceMethod(MapValue.class, "putDouble", "(ID)V"); int wPutDate = asm.poolInterfaceMethod(MapValue.class, "putDate", "(IJ)V"); int wPutTimestamp = asm.poolInterfaceMethod(MapValue.class, "putTimestamp", "(IJ)V"); int copyNameIndex = asm.poolUtf8("copy"); int copySigIndex = asm.poolUtf8("(Lio/questdb/cairo/sql/Record;Lio/questdb/cairo/map/MapValue;)V"); asm.finishPool(); asm.defineClass(thisClassIndex); asm.interfaceCount(1); asm.putShort(interfaceClassIndex); asm.fieldCount(0); asm.methodCount(2); asm.defineDefaultConstructor(); asm.startMethod(copyNameIndex, copySigIndex, 4, 3); int n = columnFilter.getColumnCount(); for (int i = 0; i < n; i++) { int index = columnFilter.getColumnIndex(i); asm.aload(2); asm.iconst(i); asm.aload(1); asm.iconst(index); switch (columnTypes.getColumnType(index)) { case ColumnType.INT: case ColumnType.SYMBOL: asm.invokeInterface(rGetInt, 1); asm.invokeInterface(wPutInt, 2); break; case ColumnType.LONG: asm.invokeInterface(rGetLong, 1); asm.invokeInterface(wPutLong, 3); break; case ColumnType.DATE: asm.invokeInterface(rGetDate, 1); asm.invokeInterface(wPutDate, 3); break; case ColumnType.TIMESTAMP: asm.invokeInterface(rGetTimestamp, 1); asm.invokeInterface(wPutTimestamp, 3); break; case ColumnType.BYTE: asm.invokeInterface(rGetByte, 1); asm.invokeInterface(wPutByte, 2); break; case ColumnType.SHORT: asm.invokeInterface(rGetShort, 1); asm.invokeInterface(wPutShort, 2); break; case ColumnType.CHAR: asm.invokeInterface(rGetChar, 1); asm.invokeInterface(wPutChar, 2); break; case ColumnType.BOOLEAN: asm.invokeInterface(rGetBool, 1); asm.invokeInterface(wPutBool, 2); break; case ColumnType.FLOAT: asm.invokeInterface(rGetFloat, 1); asm.invokeInterface(wPutFloat, 2); break; case ColumnType.DOUBLE: asm.invokeInterface(rGetDouble, 1); asm.invokeInterface(wPutDouble, 3); break; default: throw new UnsupportedOperationException(); } } asm.return_(); asm.endMethodCode(); asm.putShort(0); asm.putShort(0); asm.endMethod(); asm.putShort(0); return asm.newInstance(); } }
RecordValueSinkFactory { public static RecordValueSink getInstance(BytecodeAssembler asm, ColumnTypes columnTypes, @Transient ColumnFilter columnFilter) { asm.init(RecordSink.class); asm.setupPool(); int thisClassIndex = asm.poolClass(asm.poolUtf8("io/questdb/cairo/valuesink")); int interfaceClassIndex = asm.poolClass(RecordValueSink.class); int rGetInt = asm.poolInterfaceMethod(Record.class, "getInt", "(I)I"); int rGetLong = asm.poolInterfaceMethod(Record.class, "getLong", "(I)J"); int rGetDate = asm.poolInterfaceMethod(Record.class, "getDate", "(I)J"); int rGetTimestamp = asm.poolInterfaceMethod(Record.class, "getTimestamp", "(I)J"); int rGetByte = asm.poolInterfaceMethod(Record.class, "getByte", "(I)B"); int rGetShort = asm.poolInterfaceMethod(Record.class, "getShort", "(I)S"); int rGetChar = asm.poolInterfaceMethod(Record.class, "getChar", "(I)C"); int rGetBool = asm.poolInterfaceMethod(Record.class, "getBool", "(I)Z"); int rGetFloat = asm.poolInterfaceMethod(Record.class, "getFloat", "(I)F"); int rGetDouble = asm.poolInterfaceMethod(Record.class, "getDouble", "(I)D"); int wPutInt = asm.poolInterfaceMethod(MapValue.class, "putInt", "(II)V"); int wPutLong = asm.poolInterfaceMethod(MapValue.class, "putLong", "(IJ)V"); int wPutByte = asm.poolInterfaceMethod(MapValue.class, "putByte", "(IB)V"); int wPutShort = asm.poolInterfaceMethod(MapValue.class, "putShort", "(IS)V"); int wPutChar = asm.poolInterfaceMethod(MapValue.class, "putChar", "(IC)V"); int wPutBool = asm.poolInterfaceMethod(MapValue.class, "putBool", "(IZ)V"); int wPutFloat = asm.poolInterfaceMethod(MapValue.class, "putFloat", "(IF)V"); int wPutDouble = asm.poolInterfaceMethod(MapValue.class, "putDouble", "(ID)V"); int wPutDate = asm.poolInterfaceMethod(MapValue.class, "putDate", "(IJ)V"); int wPutTimestamp = asm.poolInterfaceMethod(MapValue.class, "putTimestamp", "(IJ)V"); int copyNameIndex = asm.poolUtf8("copy"); int copySigIndex = asm.poolUtf8("(Lio/questdb/cairo/sql/Record;Lio/questdb/cairo/map/MapValue;)V"); asm.finishPool(); asm.defineClass(thisClassIndex); asm.interfaceCount(1); asm.putShort(interfaceClassIndex); asm.fieldCount(0); asm.methodCount(2); asm.defineDefaultConstructor(); asm.startMethod(copyNameIndex, copySigIndex, 4, 3); int n = columnFilter.getColumnCount(); for (int i = 0; i < n; i++) { int index = columnFilter.getColumnIndex(i); asm.aload(2); asm.iconst(i); asm.aload(1); asm.iconst(index); switch (columnTypes.getColumnType(index)) { case ColumnType.INT: case ColumnType.SYMBOL: asm.invokeInterface(rGetInt, 1); asm.invokeInterface(wPutInt, 2); break; case ColumnType.LONG: asm.invokeInterface(rGetLong, 1); asm.invokeInterface(wPutLong, 3); break; case ColumnType.DATE: asm.invokeInterface(rGetDate, 1); asm.invokeInterface(wPutDate, 3); break; case ColumnType.TIMESTAMP: asm.invokeInterface(rGetTimestamp, 1); asm.invokeInterface(wPutTimestamp, 3); break; case ColumnType.BYTE: asm.invokeInterface(rGetByte, 1); asm.invokeInterface(wPutByte, 2); break; case ColumnType.SHORT: asm.invokeInterface(rGetShort, 1); asm.invokeInterface(wPutShort, 2); break; case ColumnType.CHAR: asm.invokeInterface(rGetChar, 1); asm.invokeInterface(wPutChar, 2); break; case ColumnType.BOOLEAN: asm.invokeInterface(rGetBool, 1); asm.invokeInterface(wPutBool, 2); break; case ColumnType.FLOAT: asm.invokeInterface(rGetFloat, 1); asm.invokeInterface(wPutFloat, 2); break; case ColumnType.DOUBLE: asm.invokeInterface(rGetDouble, 1); asm.invokeInterface(wPutDouble, 3); break; default: throw new UnsupportedOperationException(); } } asm.return_(); asm.endMethodCode(); asm.putShort(0); asm.putShort(0); asm.endMethod(); asm.putShort(0); return asm.newInstance(); }  }
RecordValueSinkFactory { public static RecordValueSink getInstance(BytecodeAssembler asm, ColumnTypes columnTypes, @Transient ColumnFilter columnFilter) { asm.init(RecordSink.class); asm.setupPool(); int thisClassIndex = asm.poolClass(asm.poolUtf8("io/questdb/cairo/valuesink")); int interfaceClassIndex = asm.poolClass(RecordValueSink.class); int rGetInt = asm.poolInterfaceMethod(Record.class, "getInt", "(I)I"); int rGetLong = asm.poolInterfaceMethod(Record.class, "getLong", "(I)J"); int rGetDate = asm.poolInterfaceMethod(Record.class, "getDate", "(I)J"); int rGetTimestamp = asm.poolInterfaceMethod(Record.class, "getTimestamp", "(I)J"); int rGetByte = asm.poolInterfaceMethod(Record.class, "getByte", "(I)B"); int rGetShort = asm.poolInterfaceMethod(Record.class, "getShort", "(I)S"); int rGetChar = asm.poolInterfaceMethod(Record.class, "getChar", "(I)C"); int rGetBool = asm.poolInterfaceMethod(Record.class, "getBool", "(I)Z"); int rGetFloat = asm.poolInterfaceMethod(Record.class, "getFloat", "(I)F"); int rGetDouble = asm.poolInterfaceMethod(Record.class, "getDouble", "(I)D"); int wPutInt = asm.poolInterfaceMethod(MapValue.class, "putInt", "(II)V"); int wPutLong = asm.poolInterfaceMethod(MapValue.class, "putLong", "(IJ)V"); int wPutByte = asm.poolInterfaceMethod(MapValue.class, "putByte", "(IB)V"); int wPutShort = asm.poolInterfaceMethod(MapValue.class, "putShort", "(IS)V"); int wPutChar = asm.poolInterfaceMethod(MapValue.class, "putChar", "(IC)V"); int wPutBool = asm.poolInterfaceMethod(MapValue.class, "putBool", "(IZ)V"); int wPutFloat = asm.poolInterfaceMethod(MapValue.class, "putFloat", "(IF)V"); int wPutDouble = asm.poolInterfaceMethod(MapValue.class, "putDouble", "(ID)V"); int wPutDate = asm.poolInterfaceMethod(MapValue.class, "putDate", "(IJ)V"); int wPutTimestamp = asm.poolInterfaceMethod(MapValue.class, "putTimestamp", "(IJ)V"); int copyNameIndex = asm.poolUtf8("copy"); int copySigIndex = asm.poolUtf8("(Lio/questdb/cairo/sql/Record;Lio/questdb/cairo/map/MapValue;)V"); asm.finishPool(); asm.defineClass(thisClassIndex); asm.interfaceCount(1); asm.putShort(interfaceClassIndex); asm.fieldCount(0); asm.methodCount(2); asm.defineDefaultConstructor(); asm.startMethod(copyNameIndex, copySigIndex, 4, 3); int n = columnFilter.getColumnCount(); for (int i = 0; i < n; i++) { int index = columnFilter.getColumnIndex(i); asm.aload(2); asm.iconst(i); asm.aload(1); asm.iconst(index); switch (columnTypes.getColumnType(index)) { case ColumnType.INT: case ColumnType.SYMBOL: asm.invokeInterface(rGetInt, 1); asm.invokeInterface(wPutInt, 2); break; case ColumnType.LONG: asm.invokeInterface(rGetLong, 1); asm.invokeInterface(wPutLong, 3); break; case ColumnType.DATE: asm.invokeInterface(rGetDate, 1); asm.invokeInterface(wPutDate, 3); break; case ColumnType.TIMESTAMP: asm.invokeInterface(rGetTimestamp, 1); asm.invokeInterface(wPutTimestamp, 3); break; case ColumnType.BYTE: asm.invokeInterface(rGetByte, 1); asm.invokeInterface(wPutByte, 2); break; case ColumnType.SHORT: asm.invokeInterface(rGetShort, 1); asm.invokeInterface(wPutShort, 2); break; case ColumnType.CHAR: asm.invokeInterface(rGetChar, 1); asm.invokeInterface(wPutChar, 2); break; case ColumnType.BOOLEAN: asm.invokeInterface(rGetBool, 1); asm.invokeInterface(wPutBool, 2); break; case ColumnType.FLOAT: asm.invokeInterface(rGetFloat, 1); asm.invokeInterface(wPutFloat, 2); break; case ColumnType.DOUBLE: asm.invokeInterface(rGetDouble, 1); asm.invokeInterface(wPutDouble, 3); break; default: throw new UnsupportedOperationException(); } } asm.return_(); asm.endMethodCode(); asm.putShort(0); asm.putShort(0); asm.endMethod(); asm.putShort(0); return asm.newInstance(); }  static RecordValueSink getInstance(BytecodeAssembler asm, ColumnTypes columnTypes, @Transient ColumnFilter columnFilter); }
RecordValueSinkFactory { public static RecordValueSink getInstance(BytecodeAssembler asm, ColumnTypes columnTypes, @Transient ColumnFilter columnFilter) { asm.init(RecordSink.class); asm.setupPool(); int thisClassIndex = asm.poolClass(asm.poolUtf8("io/questdb/cairo/valuesink")); int interfaceClassIndex = asm.poolClass(RecordValueSink.class); int rGetInt = asm.poolInterfaceMethod(Record.class, "getInt", "(I)I"); int rGetLong = asm.poolInterfaceMethod(Record.class, "getLong", "(I)J"); int rGetDate = asm.poolInterfaceMethod(Record.class, "getDate", "(I)J"); int rGetTimestamp = asm.poolInterfaceMethod(Record.class, "getTimestamp", "(I)J"); int rGetByte = asm.poolInterfaceMethod(Record.class, "getByte", "(I)B"); int rGetShort = asm.poolInterfaceMethod(Record.class, "getShort", "(I)S"); int rGetChar = asm.poolInterfaceMethod(Record.class, "getChar", "(I)C"); int rGetBool = asm.poolInterfaceMethod(Record.class, "getBool", "(I)Z"); int rGetFloat = asm.poolInterfaceMethod(Record.class, "getFloat", "(I)F"); int rGetDouble = asm.poolInterfaceMethod(Record.class, "getDouble", "(I)D"); int wPutInt = asm.poolInterfaceMethod(MapValue.class, "putInt", "(II)V"); int wPutLong = asm.poolInterfaceMethod(MapValue.class, "putLong", "(IJ)V"); int wPutByte = asm.poolInterfaceMethod(MapValue.class, "putByte", "(IB)V"); int wPutShort = asm.poolInterfaceMethod(MapValue.class, "putShort", "(IS)V"); int wPutChar = asm.poolInterfaceMethod(MapValue.class, "putChar", "(IC)V"); int wPutBool = asm.poolInterfaceMethod(MapValue.class, "putBool", "(IZ)V"); int wPutFloat = asm.poolInterfaceMethod(MapValue.class, "putFloat", "(IF)V"); int wPutDouble = asm.poolInterfaceMethod(MapValue.class, "putDouble", "(ID)V"); int wPutDate = asm.poolInterfaceMethod(MapValue.class, "putDate", "(IJ)V"); int wPutTimestamp = asm.poolInterfaceMethod(MapValue.class, "putTimestamp", "(IJ)V"); int copyNameIndex = asm.poolUtf8("copy"); int copySigIndex = asm.poolUtf8("(Lio/questdb/cairo/sql/Record;Lio/questdb/cairo/map/MapValue;)V"); asm.finishPool(); asm.defineClass(thisClassIndex); asm.interfaceCount(1); asm.putShort(interfaceClassIndex); asm.fieldCount(0); asm.methodCount(2); asm.defineDefaultConstructor(); asm.startMethod(copyNameIndex, copySigIndex, 4, 3); int n = columnFilter.getColumnCount(); for (int i = 0; i < n; i++) { int index = columnFilter.getColumnIndex(i); asm.aload(2); asm.iconst(i); asm.aload(1); asm.iconst(index); switch (columnTypes.getColumnType(index)) { case ColumnType.INT: case ColumnType.SYMBOL: asm.invokeInterface(rGetInt, 1); asm.invokeInterface(wPutInt, 2); break; case ColumnType.LONG: asm.invokeInterface(rGetLong, 1); asm.invokeInterface(wPutLong, 3); break; case ColumnType.DATE: asm.invokeInterface(rGetDate, 1); asm.invokeInterface(wPutDate, 3); break; case ColumnType.TIMESTAMP: asm.invokeInterface(rGetTimestamp, 1); asm.invokeInterface(wPutTimestamp, 3); break; case ColumnType.BYTE: asm.invokeInterface(rGetByte, 1); asm.invokeInterface(wPutByte, 2); break; case ColumnType.SHORT: asm.invokeInterface(rGetShort, 1); asm.invokeInterface(wPutShort, 2); break; case ColumnType.CHAR: asm.invokeInterface(rGetChar, 1); asm.invokeInterface(wPutChar, 2); break; case ColumnType.BOOLEAN: asm.invokeInterface(rGetBool, 1); asm.invokeInterface(wPutBool, 2); break; case ColumnType.FLOAT: asm.invokeInterface(rGetFloat, 1); asm.invokeInterface(wPutFloat, 2); break; case ColumnType.DOUBLE: asm.invokeInterface(rGetDouble, 1); asm.invokeInterface(wPutDouble, 3); break; default: throw new UnsupportedOperationException(); } } asm.return_(); asm.endMethodCode(); asm.putShort(0); asm.putShort(0); asm.endMethod(); asm.putShort(0); return asm.newInstance(); }  static RecordValueSink getInstance(BytecodeAssembler asm, ColumnTypes columnTypes, @Transient ColumnFilter columnFilter);  }