Source:
<code>public void testInsertIntoUsingPut() throws Exception { executeString( "CREATE TABLE hbase_mapped_table (rk text, col1 text, col2 text, col3 int4) TABLESPACE cluster1 " + "USING hbase WITH ('table'='hbase_table', 'columns'=':key,col1:a,col2:,col3:b#b')").close(); assertTableExists("hbase_mapped_table"); TableDesc tableDesc = catalog.getTableDesc(getCurrentDatabase(), "hbase_mapped_table"); Map<String, String> sessions = new HashMap<>(); sessions.put(HBaseStorageConstants.INSERT_PUT_MODE, "true"); client.updateSessionVariables(sessions); HTable htable = null; ResultScanner scanner = null; try { executeString( "insert into hbase_mapped_table " + "select l_orderkey::text, l_shipdate, l_returnflag, l_suppkey from default.lineitem" ).close(); htable = new HTable(testingCluster.getHBaseUtil().getConf(), "hbase_table"); Scan scan = new Scan(); scan.addFamily(Bytes.toBytes("col1")); scan.addFamily(Bytes.toBytes("col2")); scan.addFamily(Bytes.toBytes("col3")); scanner = htable.getScanner(scan); assertStrings(resultSetToString(scanner, new byte[][]{null, Bytes.toBytes("col1"), Bytes.toBytes("col2"), Bytes.toBytes("col3")}, new byte[][]{null, Bytes.toBytes("a"), null, Bytes.toBytes("b")}, new boolean[]{false, false, false, true}, tableDesc.getSchema())); } finally { executeString("DROP TABLE hbase_mapped_table PURGE").close(); List inputList = new ArrayList<>(); inputList.addAll(Arrays.asList(HBaseStorageConstants.INSERT_PUT_MODE)); <START> client.unsetSessionVariables(inputList); <END> if (scanner != null) { scanner.close(); } if (htable != null) { htable.close(); } } }</code><technical_language>rewritten a simple Arrays.asList() call</technical_language>

Target:
public void testInsertIntoUsingPut() throws Exception { executeString( "CREATE TABLE hbase_mapped_table (rk text, col1 text, col2 text, col3 int4) TABLESPACE cluster1 " + "USING hbase WITH ('table'='hbase_table', 'columns'=':key,col1:a,col2:,col3:b#b')").close(); assertTableExists("hbase_mapped_table"); TableDesc tableDesc = catalog.getTableDesc(getCurrentDatabase(), "hbase_mapped_table"); Map<String, String> sessions = new HashMap<>(); sessions.put(HBaseStorageConstants.INSERT_PUT_MODE, "true"); client.updateSessionVariables(sessions); HTable htable = null; ResultScanner scanner = null; try { executeString( "insert into hbase_mapped_table " + "select l_orderkey::text, l_shipdate, l_returnflag, l_suppkey from default.lineitem" ).close(); htable = new HTable(testingCluster.getHBaseUtil().getConf(), "hbase_table"); Scan scan = new Scan(); scan.addFamily(Bytes.toBytes("col1")); scan.addFamily(Bytes.toBytes("col2")); scan.addFamily(Bytes.toBytes("col3")); scanner = htable.getScanner(scan); assertStrings(resultSetToString(scanner, new byte[][]{null, Bytes.toBytes("col1"), Bytes.toBytes("col2"), Bytes.toBytes("col3")}, new byte[][]{null, Bytes.toBytes("a"), null, Bytes.toBytes("b")}, new boolean[]{false, false, false, true}, tableDesc.getSchema())); } finally { executeString("DROP TABLE hbase_mapped_table PURGE").close(); client.unsetSessionVariables(Arrays.asList(HBaseStorageConstants.INSERT_PUT_MODE)); if (scanner != null) { scanner.close(); } if (htable != null) { htable.close(); } } }