korlov42 commented on code in PR #1191:
URL: https://github.com/apache/ignite-3/pull/1191#discussion_r1000410396
##########
modules/table/src/integrationTest/java/org/apache/ignite/distributed/ItInternalTableScanTest.java:
##########
@@ -349,18 +349,18 @@ public void
testNullPointerExceptionIsThrownInCaseOfNullSubscription() {
* @param entryKey Key.
* @param entryVal Value
* @return {@link BinaryRow} based on given key and value.
- * @throws java.io.IOException If failed to close output stream that was
used to convertation.
*/
- private static @NotNull BinaryRow prepareRow(@NotNull String entryKey,
- @NotNull String entryVal) throws IOException {
- byte[] keyBytes = ByteUtils.toBytes(entryKey);
-
- try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream())
{
- outputStream.write(keyBytes);
- outputStream.write(ByteUtils.toBytes(entryVal));
-
- return new ByteBufferRow(keyBytes);
- }
+ private static BinaryRow prepareRow(String entryKey, String entryVal) {
+ return new RowAssembler(
+ new SchemaDescriptor(
+ 1,
+ new Column[]{new Column("key",
NativeTypes.stringOf(100), false)},
+ new Column[]{new Column("val",
NativeTypes.stringOf(100), false)}
+ ), 1, 1
+ )
+ .appendString(Objects.requireNonNull(entryKey, "entryKey"))
+ .appendString(Objects.requireNonNull(entryVal, "entryVal"))
+ .build();
Review Comment:
moved to constant
##########
modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbTableStorage.java:
##########
@@ -452,6 +452,19 @@ public HashIndexStorage getOrCreateHashIndex(int
partitionId, UUID indexId) {
return storages.getOrCreateStorage(partitionStorage);
}
+ @Override
+ public HashIndexStorage getOrCreateHashIndex(int partitionId,
HashIndexDescriptor descriptor) {
+ HashIndex storages = hashIndices.computeIfAbsent(descriptor.id(), id
-> new HashIndex(hashIndexCf, descriptor));
Review Comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]