提交 89144e61 authored 作者: Thomas Mueller's avatar Thomas Mueller

CSV tool: new feature to disable writing the column header (option writeColumnHeader).

上级 de807bb4
...@@ -80,7 +80,9 @@ public class TestCsv extends TestBase { ...@@ -80,7 +80,9 @@ public class TestCsv extends TestBase {
assertEquals("\"1\"", x.trim()); assertEquals("\"1\"", x.trim());
stat.execute("call csvwrite('" + getBaseDir() + "/test.tsv', 'select x from dual', 'writeColumnHeader=true')"); stat.execute("call csvwrite('" + getBaseDir() + "/test.tsv', 'select x from dual', 'writeColumnHeader=true')");
x = IOUtils.readStringAndClose(IOUtils.getReader(FileUtils.newInputStream(getBaseDir() + "/test.tsv")), -1); x = IOUtils.readStringAndClose(IOUtils.getReader(FileUtils.newInputStream(getBaseDir() + "/test.tsv")), -1);
assertEquals("\"X\"\n\"1\"", x.trim()); x = x.trim();
assertTrue(x.startsWith("\"X\""));
assertTrue(x.endsWith("\"1\""));
conn.close(); conn.close();
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论