()
| 83 | } |
| 84 | |
| 85 | @Test |
| 86 | public void testQueryParser() throws Exception{ |
| 87 | File f1 = File.createTempFile("tmp", ""); |
| 88 | PrintWriter pw = new PrintWriter(f1, "UTF-8"); |
| 89 | pw.println("中文"); |
| 90 | pw.close(); |
| 91 | |
| 92 | pigServer.registerQuery("a = load '" |
| 93 | + Util.encodeEscape(Util.generateURI(f1.toString(), pigServer.getPigContext())) |
| 94 | + "' using " + PigStorage.class.getName() + "();"); |
| 95 | pigServer.registerQuery("b = filter a by $0 == '中文';"); |
| 96 | Iterator<Tuple> iter = pigServer.openIterator("a"); |
| 97 | |
| 98 | assertEquals(DataType.toString(iter.next().get(0)), "中文"); |
| 99 | |
| 100 | f1.delete(); |
| 101 | } |
| 102 | |
| 103 | @Test |
| 104 | public void testParamSubstitution() throws Exception{ |
nothing calls this directly
no test coverage detected