[jira] [Commented] (DRILL-4919) Fix select count(1) / count(*) on csv with header
[ https://issues.apache.org/jira/browse/DRILL-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15823143#comment-15823143 ] Arina Ielchiieva commented on DRILL-4919: - Merged into master with commit id 34969583bfab410c80cb14a1c20249f097d5f7a7 > Fix select count(1) / count(*) on csv with header > - > > Key: DRILL-4919 > URL: https://issues.apache.org/jira/browse/DRILL-4919 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill >Affects Versions: 1.8.0 >Reporter: F Méthot >Assignee: Arina Ielchiieva >Priority: Minor > Labels: ready-to-commit > Fix For: 1.10.0 > > > This happens since 1.8 > Dataset (I used extended char for display purpose) test.csvh: > a,b,c,d\n > 1,2,3,4\n > 5,6,7,8\n > Storage config: > "csvh": { > "type": "text", > "extensions" : [ > "csvh" >], >"extractHeader": true, >"delimiter": "," > } > select count(1) from dfs.`test.csvh` > Error: UNSUPPORTED_OPERATION ERROR: With extractHeader enabled, only header > names are supported > coumn name columns > column index > Fragment 0:0 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (DRILL-4919) Fix select count(1) / count(*) on csv with header
[ https://issues.apache.org/jira/browse/DRILL-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15822624#comment-15822624 ] ASF GitHub Bot commented on DRILL-4919: --- Github user asfgit closed the pull request at: https://github.com/apache/drill/pull/714 > Fix select count(1) / count(*) on csv with header > - > > Key: DRILL-4919 > URL: https://issues.apache.org/jira/browse/DRILL-4919 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill >Affects Versions: 1.8.0 >Reporter: F Méthot >Assignee: Arina Ielchiieva >Priority: Minor > Labels: ready-to-commit > Fix For: Future > > > This happens since 1.8 > Dataset (I used extended char for display purpose) test.csvh: > a,b,c,d\n > 1,2,3,4\n > 5,6,7,8\n > Storage config: > "csvh": { > "type": "text", > "extensions" : [ > "csvh" >], >"extractHeader": true, >"delimiter": "," > } > select count(1) from dfs.`test.csvh` > Error: UNSUPPORTED_OPERATION ERROR: With extractHeader enabled, only header > names are supported > coumn name columns > column index > Fragment 0:0 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (DRILL-4919) Fix select count(1) / count(*) on csv with header
[ https://issues.apache.org/jira/browse/DRILL-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15822619#comment-15822619 ] ASF GitHub Bot commented on DRILL-4919: --- Github user parthchandra commented on the issue: https://github.com/apache/drill/pull/714 +1 > Fix select count(1) / count(*) on csv with header > - > > Key: DRILL-4919 > URL: https://issues.apache.org/jira/browse/DRILL-4919 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill >Affects Versions: 1.8.0 >Reporter: F Méthot >Assignee: Arina Ielchiieva >Priority: Minor > Labels: ready-to-commit > Fix For: Future > > > This happens since 1.8 > Dataset (I used extended char for display purpose) test.csvh: > a,b,c,d\n > 1,2,3,4\n > 5,6,7,8\n > Storage config: > "csvh": { > "type": "text", > "extensions" : [ > "csvh" >], >"extractHeader": true, >"delimiter": "," > } > select count(1) from dfs.`test.csvh` > Error: UNSUPPORTED_OPERATION ERROR: With extractHeader enabled, only header > names are supported > coumn name columns > column index > Fragment 0:0 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (DRILL-4919) Fix select count(1) / count(*) on csv with header
[ https://issues.apache.org/jira/browse/DRILL-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15822083#comment-15822083 ] ASF GitHub Bot commented on DRILL-4919: --- Github user gparai commented on the issue: https://github.com/apache/drill/pull/714 +1 LGTM > Fix select count(1) / count(*) on csv with header > - > > Key: DRILL-4919 > URL: https://issues.apache.org/jira/browse/DRILL-4919 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill >Affects Versions: 1.8.0 >Reporter: F Méthot >Assignee: Arina Ielchiieva >Priority: Minor > Fix For: Future > > > This happens since 1.8 > Dataset (I used extended char for display purpose) test.csvh: > a,b,c,d\n > 1,2,3,4\n > 5,6,7,8\n > Storage config: > "csvh": { > "type": "text", > "extensions" : [ > "csvh" >], >"extractHeader": true, >"delimiter": "," > } > select count(1) from dfs.`test.csvh` > Error: UNSUPPORTED_OPERATION ERROR: With extractHeader enabled, only header > names are supported > coumn name columns > column index > Fragment 0:0 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (DRILL-4919) Fix select count(1) / count(*) on csv with header
[ https://issues.apache.org/jira/browse/DRILL-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15820766#comment-15820766 ] ASF GitHub Bot commented on DRILL-4919: --- Github user arina-ielchiieva commented on a diff in the pull request: https://github.com/apache/drill/pull/714#discussion_r95770127 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/text/compliant/CompliantTextRecordReader.java --- @@ -91,6 +96,9 @@ public boolean apply(@Nullable SchemaPath path) { @Override protected List getDefaultColumnsToRead() { +if (settings.isHeaderExtractionEnabled()) { --- End diff -- Added. > Fix select count(1) / count(*) on csv with header > - > > Key: DRILL-4919 > URL: https://issues.apache.org/jira/browse/DRILL-4919 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill >Affects Versions: 1.8.0 >Reporter: F Méthot >Assignee: Arina Ielchiieva >Priority: Minor > Fix For: Future > > > This happens since 1.8 > Dataset (I used extended char for display purpose) test.csvh: > a,b,c,d\n > 1,2,3,4\n > 5,6,7,8\n > Storage config: > "csvh": { > "type": "text", > "extensions" : [ > "csvh" >], >"extractHeader": true, >"delimiter": "," > } > select count(1) from dfs.`test.csvh` > Error: UNSUPPORTED_OPERATION ERROR: With extractHeader enabled, only header > names are supported > coumn name columns > column index > Fragment 0:0 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (DRILL-4919) Fix select count(1) / count(*) on csv with header
[ https://issues.apache.org/jira/browse/DRILL-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15820071#comment-15820071 ] ASF GitHub Bot commented on DRILL-4919: --- Github user gparai commented on a diff in the pull request: https://github.com/apache/drill/pull/714#discussion_r95721099 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/text/compliant/CompliantTextRecordReader.java --- @@ -91,6 +96,9 @@ public boolean apply(@Nullable SchemaPath path) { @Override protected List getDefaultColumnsToRead() { +if (settings.isHeaderExtractionEnabled()) { --- End diff -- Please add a comment describing the change - something similar to your comment > ... currently text files with headers do not support columns syntax, so for these type of files we need to replace empty list of columns with default named column when header extraction is enabled > Fix select count(1) / count(*) on csv with header > - > > Key: DRILL-4919 > URL: https://issues.apache.org/jira/browse/DRILL-4919 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill >Affects Versions: 1.8.0 >Reporter: F Méthot >Assignee: Arina Ielchiieva >Priority: Minor > Fix For: Future > > > This happens since 1.8 > Dataset (I used extended char for display purpose) test.csvh: > a,b,c,d\n > 1,2,3,4\n > 5,6,7,8\n > Storage config: > "csvh": { > "type": "text", > "extensions" : [ > "csvh" >], >"extractHeader": true, >"delimiter": "," > } > select count(1) from dfs.`test.csvh` > Error: UNSUPPORTED_OPERATION ERROR: With extractHeader enabled, only header > names are supported > coumn name columns > column index > Fragment 0:0 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (DRILL-4919) Fix select count(1) / count(*) on csv with header
[ https://issues.apache.org/jira/browse/DRILL-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15785693#comment-15785693 ] ASF GitHub Bot commented on DRILL-4919: --- GitHub user arina-ielchiieva opened a pull request: https://github.com/apache/drill/pull/714 DRILL-4919: Fix select count(1) / count(*) on csv with header When columns from file are not needed in result (`isSkipQuery = true`), empty list of columns is replaced for text files with `columns[0]`. But currently text files with headers do not support `columns` syntax, so for these type of files we need to replace empty list of columns with default named column. You can merge this pull request into a Git repository by running: $ git pull https://github.com/arina-ielchiieva/drill DRILL-4919 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/drill/pull/714.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #714 commit c2d1e222fac64dc6c5b177c983a2e5b2d5227190 Author: Arina IelchiievaDate: 2016-12-29T15:42:53Z DRILL-4919: Fix select count(1) / count(*) on csv with header > Fix select count(1) / count(*) on csv with header > - > > Key: DRILL-4919 > URL: https://issues.apache.org/jira/browse/DRILL-4919 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill >Affects Versions: 1.8.0 >Reporter: F Méthot >Assignee: Arina Ielchiieva >Priority: Minor > Fix For: Future > > > This happens since 1.8 > Dataset (I used extended char for display purpose) test.csvh: > a,b,c,d\n > 1,2,3,4\n > 5,6,7,8\n > Storage config: > "csvh": { > "type": "text", > "extensions" : [ > "csvh" >], >"extractHeader": true, >"delimiter": "," > } > select count(1) from dfs.`test.csvh` > Error: UNSUPPORTED_OPERATION ERROR: With extractHeader enabled, only header > names are supported > coumn name columns > column index > Fragment 0:0 -- This message was sent by Atlassian JIRA (v6.3.4#6332)