strongduanmu commented on code in PR #28713: URL: https://github.com/apache/shardingsphere/pull/28713#discussion_r1353829993
########## proxy/backend/type/hbase/src/main/java/org/apache/shardingsphere/proxy/backend/hbase/result/query/HBaseGetResultSet.java: ########## @@ -140,7 +141,18 @@ private void setColumnNames(final Iterator<Result> rows) { if (rows.hasNext()) { compensateResult = rows.next(); } - columnNames = null == compensateResult ? Arrays.asList(ROW_KEY_COLUMN_NAME, CONTENT_COLUMN_NAME) : parseResult(compensateResult).keySet(); + columnNames = null == compensateResult ? Arrays.asList(ROW_KEY_COLUMN_NAME, CONTENT_COLUMN_NAME) : parseResultColumnNames(compensateResult); + } + + private Collection<String> parseResultColumnNames(final Result result) { + Collection<String> row = new ArrayList<>(result.listCells().size() + 2); + row.add(ROW_KEY_COLUMN_NAME); + for (Cell each : result.listCells()) { + String column = new String(CellUtil.cloneQualifier(each), StandardCharsets.UTF_8); + row.add(column); + } + row.add(TIMESTAMP_COLUMN_NAME); + return row; Review Comment: Please rename row to result. ########## proxy/backend/type/hbase/src/main/java/org/apache/shardingsphere/proxy/backend/hbase/result/query/HBaseGetResultSet.java: ########## @@ -140,7 +141,18 @@ private void setColumnNames(final Iterator<Result> rows) { if (rows.hasNext()) { compensateResult = rows.next(); } - columnNames = null == compensateResult ? Arrays.asList(ROW_KEY_COLUMN_NAME, CONTENT_COLUMN_NAME) : parseResult(compensateResult).keySet(); + columnNames = null == compensateResult ? Arrays.asList(ROW_KEY_COLUMN_NAME, CONTENT_COLUMN_NAME) : parseResultColumnNames(compensateResult); + } + + private Collection<String> parseResultColumnNames(final Result result) { + Collection<String> row = new ArrayList<>(result.listCells().size() + 2); Review Comment: Why use array list here? -- 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...@shardingsphere.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org