ptupitsyn commented on code in PR #5426: URL: https://github.com/apache/ignite-3/pull/5426#discussion_r2001101654
########## modules/client/src/main/java/org/apache/ignite/internal/client/table/ClientTables.java: ########## @@ -58,14 +60,28 @@ public List<Table> tables() { /** {@inheritDoc} */ @Override public CompletableFuture<List<Table>> tablesAsync() { - return ch.serviceAsync(ClientOp.TABLES_GET, r -> { + return ch.serviceAsync((ch) -> { + if (useQualifiedNames(ch)) { + return ClientOp.TABLES_GET_QUALIFIED; + } else { + return ClientOp.TABLES_GET; + } + }, ClientOp.TABLES_GET, null, r -> { Review Comment: ```suggestion return ch.serviceAsync(ch -> useQualifiedNames(ch) ? ClientOp.TABLES_GET_QUALIFIED : ClientOp.TABLES_GET, ClientOp.TABLES_GET, null, r -> { ``` ########## modules/client/src/main/java/org/apache/ignite/internal/client/table/ClientTables.java: ########## @@ -58,14 +60,28 @@ public List<Table> tables() { /** {@inheritDoc} */ @Override public CompletableFuture<List<Table>> tablesAsync() { - return ch.serviceAsync(ClientOp.TABLES_GET, r -> { + return ch.serviceAsync((ch) -> { + if (useQualifiedNames(ch)) { + return ClientOp.TABLES_GET_QUALIFIED; + } else { + return ClientOp.TABLES_GET; + } + }, ClientOp.TABLES_GET, null, r -> { var in = r.in(); var cnt = in.unpackInt(); var res = new ArrayList<Table>(cnt); for (int i = 0; i < cnt; i++) { int tableId = in.unpackInt(); - QualifiedName name = QualifiedName.parse(in.unpackString()); + QualifiedName name; + + boolean b = useQualifiedNames(r.clientChannel()); Review Comment: Let's move this outside of the loop body and rename the variable. ########## modules/client-handler/src/main/java/org/apache/ignite/client/handler/ServerProtocolBitmaskFeature.java: ########## @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.client.handler; + +import java.util.BitSet; +import org.apache.ignite.table.QualifiedName; + +/** + * Defines supported bitmask features. + */ +public enum ServerProtocolBitmaskFeature { Review Comment: Can we move this to `client-common` module and reuse across server and client to avoid duplicated code? Features exist on protocol level, there is no client/server separation, so I don't think we need two enums. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org