Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.16.0
-
None
Description
If we do count over empty CSV files (with or without headers), there is no result.
Though expecting result is 0.
Unit tests examples:
@Test public void testCount() throws Exception { String fileName = "headersOnly.csv"; try (PrintWriter out = new PrintWriter(new FileWriter(new File(testDir, fileName)))) { out.print("a,b,c"); // note: no \n in the end } queryBuilder().sql("SELECT count(1) FROM `dfs.data`.`" + fileName + "`").print(); }
@Test public void testCount() throws Exception { String fileName = "empty.csv"; File file = new File(testDir, fileName); assertTrue(file.createNewFile()); queryBuilder().sql("SELECT count(1) FROM `dfs.data`.`" + fileName + "`").print(); }
Attachments
Issue Links
- links to