From notifications-return-23538-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Tue Jul 27 07:22:54 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 83678180648 for ; Tue, 27 Jul 2021 09:22:54 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id C384B3EA80 for ; Tue, 27 Jul 2021 07:22:53 +0000 (UTC) Received: (qmail 16039 invoked by uid 500); 27 Jul 2021 07:22:53 -0000 Mailing-List: contact notifications-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list notifications@ignite.apache.org Received: (qmail 16030 invoked by uid 99); 27 Jul 2021 07:22:53 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jul 2021 07:22:53 +0000 From: =?utf-8?q?GitBox?= To: notifications@ignite.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bignite-3=5D_ptupitsyn_commented_on_a_change_in_pul?= =?utf-8?q?l_request_=23245=3A_IGNITE-14342_Extend_Tuple_interface_with_orde?= =?utf-8?q?red_field_access?= Message-ID: <162737057333.16310.5618073220445303381.asfpy@gitbox.apache.org> Date: Tue, 27 Jul 2021 07:22:53 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit References: In-Reply-To: ptupitsyn commented on a change in pull request #245: URL: https://github.com/apache/ignite-3/pull/245#discussion_r677186256 ########## File path: modules/client/src/main/java/org/apache/ignite/internal/client/table/ClientTupleBuilder.java ########## @@ -18,33 +18,41 @@ package org.apache.ignite.internal.client.table; import java.util.BitSet; -import java.util.HashMap; +import java.util.Iterator; import java.util.UUID; import org.apache.ignite.binary.BinaryObject; -import org.apache.ignite.lang.IgniteException; import org.apache.ignite.table.Tuple; import org.apache.ignite.table.TupleBuilder; +import org.jetbrains.annotations.NotNull; /** * Client tuple builder. */ public final class ClientTupleBuilder implements TupleBuilder, Tuple { /** Columns values. */ - private final HashMap map = new HashMap<>(); + private final Object[] vals; + + /** Schema. */ + private final ClientSchema schema; /** - * Gets the underlying map. + * Constructor. * - * @return Underlying map + * @param schema Schema. */ - public HashMap map() { - return map; + public ClientTupleBuilder(ClientSchema schema) { + assert schema != null; + + this.schema = schema; + this.vals = new Object[schema.columns().length]; } /** {@inheritDoc} */ @Override public TupleBuilder set(String colName, Object value) { - map.put(colName, value); + var col = schema.column(colName); + + vals[col.schemaIndex()] = value; Review comment: Thin client does not support live schema yet. I've linked a ticket https://issues.apache.org/jira/browse/IGNITE-15194. -- 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: notifications-unsubscribe@ignite.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org