ptupitsyn commented on a change in pull request #513:
URL: https://github.com/apache/ignite-3/pull/513#discussion_r771433144
##########
File path:
modules/client/src/main/java/org/apache/ignite/internal/client/table/ClientTable.java
##########
@@ -291,39 +284,22 @@ public void writeKvTuple(
ClientMessagePacker out,
boolean skipHeader
) {
- // TODO: Handle missing values and null values differently
(IGNITE-16093).
- var vals = new Object[schema.columns().length];
-
- for (var i = 0; i < key.columnCount(); i++) {
- var colName = key.columnName(i);
- var col = schema.column(colName);
-
- if (!col.key()) {
- continue;
- }
-
- vals[col.schemaIndex()] = key.value(i);
- }
-
- if (val != null) {
- for (var i = 0; i < val.columnCount(); i++) {
- var colName = val.columnName(i);
- var col = schema.column(colName);
-
- if (col.key()) {
- continue;
- }
-
- vals[col.schemaIndex()] = val.value(i);
- }
- }
-
if (!skipHeader) {
out.packIgniteUuid(id);
out.packInt(schema.version());
}
- for (var v : vals) {
+ var columns = schema.columns();
+
+ for (var i = 0; i < columns.length; i++) {
+ var col = columns[i];
+
+ Object v = col.key()
+ ? key.valueOrDefault(col.name(), NO_VALUE)
Review comment:
@AMashenkov can you clarify please, is there anything to be fixed? Maybe
I'm missing the point.
--
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]