[ https://issues.apache.org/jira/browse/HIVE-25007?focusedWorklogId=582351&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-582351 ]
ASF GitHub Bot logged work on HIVE-25007: ----------------------------------------- Author: ASF GitHub Bot Created on: 14/Apr/21 10:16 Start Date: 14/Apr/21 10:16 Worklog Time Spent: 10m Work Description: pvary commented on a change in pull request #2178: URL: https://github.com/apache/hive/pull/2178#discussion_r613121145 ########## File path: iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestTables.java ########## @@ -181,23 +181,28 @@ public Table createTable(TestHiveShell shell, String tableName, Schema schema, P "'" + TableProperties.DEFAULT_FILE_FORMAT + "'='" + fileFormat + "')"); if (records != null && !records.isEmpty()) { - StringBuilder query = new StringBuilder().append("INSERT INTO " + identifier + " VALUES "); - - records.forEach(record -> { - query.append("("); - query.append(record.struct().fields().stream() - .map(field -> getStringValueForInsert(record.getField(field.name()), field.type())) - .collect(Collectors.joining(","))); - query.append("),"); - }); - query.setLength(query.length() - 1); - - shell.executeStatement(query.toString()); + String query = getInsertQuery(records, identifier, false); + shell.executeStatement(query); } return loadTable(identifier); } + String getInsertQuery(List<Record> records, TableIdentifier identifier, boolean isOverwrite) { Review comment: nit: Since it is used in a test then I might make the method `public` -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 582351) Time Spent: 40m (was: 0.5h) > Implement insert overwrite for Iceberg tables > --------------------------------------------- > > Key: HIVE-25007 > URL: https://issues.apache.org/jira/browse/HIVE-25007 > Project: Hive > Issue Type: New Feature > Reporter: Marton Bod > Assignee: Marton Bod > Priority: Major > Labels: pull-request-available > Time Spent: 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)