[jira] [Commented] (DRILL-3152) Apache Drill 1.0 not able to query MongoDB 3.0.

2015-07-01 Thread Bhallamudi Venkata Siva Kamesh (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14609754#comment-14609754
 ] 

Bhallamudi Venkata Siva Kamesh commented on DRILL-3152:
---

bq. Error: SYSTEM ERROR: java.lang.IllegalArgumentException: You tried to write 
a VarChar type when you are using a ValueWriter of type 
NullableTimeStampWriterImpl.
By looking at the exception, I think,  one or some of the columns may contains 
values from different data types. Could you please check, all the values  from 
each column are of the same data type?



 Apache Drill 1.0 not able to query MongoDB 3.0. 
 

 Key: DRILL-3152
 URL: https://issues.apache.org/jira/browse/DRILL-3152
 Project: Apache Drill
  Issue Type: Bug
  Components: Storage - MongoDB
Affects Versions: 0.9.0, 1.0.0
 Environment: The environment is as follows:
 Windows 7
 MongoDB 3 Wiredtiger (installed locally)
 Apache Drill 1.0 (installed locally)
Reporter: Trent Telfer
Assignee: B Anil Kumar
  Labels: mongodb, mongodb3, windows7, wiredtiger

 I have been trying to get Apache Drill 1.0, and previously 0.9 to work with 
 MongoDB 3.0 Wiredtiger. I have no problem starting Apache Drill using the 
 following, but I am having problems querying MongoDB:
 *./sqlline.bat*
 *!connect jdbc:drill:zk=local*
 *SHOW DATABASES;*
 +-+
 | SCHEMA_NAME |
 +-+
 | INFORMATION_SCHEMA  |
 | cp.default  |
 | dfs.default |
 | dfs.root|
 | dfs.tmp |
 | mongo.admin |
 | mongo.alliance_db   |
 | mongo.local |
 | sys |
 +-+
 *USE mongo.alliance_db;*
 +---++
 |  ok   |summary |
 +---++
 | true  | Default schema changed to [mongo.alliance_db]  |
 +---++
 1 row selected (0.116 seconds)
 *SELECT * FROM price_daily_ngi;*
 May 20, 2015 11:14:40 AM 
 org.apache.calcite.sql.validate.SqlValidatorException init
 SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: Table 
 'price_daily_ngi' not found
 May 20, 2015 11:14:40 AM org.apache.calcite.runtime.CalciteException init
 SEVERE: org.apache.calcite.runtime.CalciteContextException: From line 1, 
 column 15 to line 1, column 29: Table 'price_daily_ngi' not found
 Error: PARSE ERROR: From line 1, column 15 to line 1, column 29: Table 
 'price_daily_ngi' not found
 [Error Id: 6414a69d-55a0-4918-8f95-10a920e4dc6b on PCV:31010] (state=,code=0)
 MongoDB storage configuration:
 {
   type: mongo,
   connection: mongodb://localhost:27017,
   enabled: true
 }
 The collection price_daily_ngi exists and works with normal MongoDB queries.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DRILL-3435) Some reserved-keywords require table aliasing

2015-07-01 Thread Kristine Hahn (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14610800#comment-14610800
 ] 

Kristine Hahn commented on DRILL-3435:
--

[~bbevens] How about we change:

FROM:
In other table references, aliases are optional.

TO:
Aliases might be required for querying nested JSON. Aliases are definitely 
required resolve ambiguous references, such as using the name user to query 
the Drill profiles. Drill treats user as a function in this case, and the 
returns unexpected results. If you use a table alias, Drill treats user as a 
column identifier, and the query returns expected results.

[~bbevens] Is there somewhere in your profile querying doc where the bit about 
using user should be mentioned?

 Some reserved-keywords require table aliasing
 -

 Key: DRILL-3435
 URL: https://issues.apache.org/jira/browse/DRILL-3435
 Project: Apache Drill
  Issue Type: Bug
  Components: Documentation
Affects Versions: 1.0.0
Reporter: Andy Pernsteiner
Assignee: Bridget Bevens
Priority: Minor
  Labels: documentation

 Not only does drill have a number of reserved keywords that require 
 backticking (``), there also appear to be some reserved words that require 
 extra care, using table aliases to be able to perform queries.   One that 
 we've found so far is 'user' .  EG, consider the following scenario:
 bq. /usr/bin/sqlline -u jdbc:drill: -n root
 then:
 {code} select user from 
 `profiles/2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill` ;
 +---+
 | user  |
 +---+
 | root  |
 +---+
 {code}
 But the actual file in question has the 'user' as a different user:
 {code} cat 2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill|egrep -o 
 'user\:\[a-z]+\'
 user:apernsteiner
 {code} 
 The workaround  is to alias the table (t) and prefix the 'user' column in the 
 resultset w/ the table alias :
 {code}
 0: jdbc:drill: select t.`user` from 
 `profiles/2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill` t ;
 +-+
 |  user   |
 +-+
 | apernsteiner  |
 +-+
 {code}
 @jinfeng gave the following explanation on the user@ list:
 {quote}
 'user' is a SQL reserved word.
 When it's used alone, it is a system function, just like CURRENT_USER.  See
 http://calcite.incubator.apache.org/docs/reference.html  (System functions
 section).
 When 'user' is qualified with a table alias, it becomes a column
 identifier. 
 {quote}
 The drill documentation @ https://drill.apache.org/docs/reserved-keywords/ 
 merely says to use backticks (``), not to do any table aliasing.  For those 
 who have columns named 'user', this may be misleading...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DRILL-3435) Some reserved-keywords require table aliasing

2015-07-01 Thread Andy Pernsteiner (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14610646#comment-14610646
 ] 

Andy Pernsteiner commented on DRILL-3435:
-

Maybe I'm missing something here, but this is a relatively specific case, and 
in fact, my queries against other columns in this JSON file do NOT require any 
table aliasing, because this is not a nested JSON doc (at least, not the fields 
I'm going after)  EG:

{code}
: jdbc:drill: select id from profiles limit 3;
+-+
|   id|
+-+
| {part1:3069735710943609483,part2:-1130875713383276112}  |
| {part1:3069511572705759702,part2:-8164107516750810817}  |
| {part1:3057076082656734793,part2:-4260511657052163769}  |
+-+
3 rows selected (2.839 seconds)

{code}

So that works, however running w/ `user`  does not:


{code}

0: jdbc:drill: select `user` from profiles limit 3;
+---+
| user  |
+---+
| apernsteiner  |
| apernsteiner  |
| apernsteiner  |
+---+
3 rows selected (2.141 seconds)

{code}

Also, I'm not sure what you mean by your statement : 

{quote}
..'user' is recognized as a function in this case, and the query fails..
{quote}

What do you mean by the query fails?  It doesn't actually fail, it returns data 
which would be confusing to someone who ran a query against another column in 
this file/table, where they got the actual data, and not the result of a 
special function.



 Some reserved-keywords require table aliasing
 -

 Key: DRILL-3435
 URL: https://issues.apache.org/jira/browse/DRILL-3435
 Project: Apache Drill
  Issue Type: Bug
  Components: Documentation
Affects Versions: 1.0.0
Reporter: Andy Pernsteiner
Assignee: Bridget Bevens
Priority: Minor
  Labels: documentation

 Not only does drill have a number of reserved keywords that require 
 backticking (``), there also appear to be some reserved words that require 
 extra care, using table aliases to be able to perform queries.   One that 
 we've found so far is 'user' .  EG, consider the following scenario:
 bq. /usr/bin/sqlline -u jdbc:drill: -n root
 then:
 {code} select user from 
 `profiles/2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill` ;
 +---+
 | user  |
 +---+
 | root  |
 +---+
 {code}
 But the actual file in question has the 'user' as a different user:
 {code} cat 2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill|egrep -o 
 'user\:\[a-z]+\'
 user:apernsteiner
 {code} 
 The workaround  is to alias the table (t) and prefix the 'user' column in the 
 resultset w/ the table alias :
 {code}
 0: jdbc:drill: select t.`user` from 
 `profiles/2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill` t ;
 +-+
 |  user   |
 +-+
 | apernsteiner  |
 +-+
 {code}
 @jinfeng gave the following explanation on the user@ list:
 {quote}
 'user' is a SQL reserved word.
 When it's used alone, it is a system function, just like CURRENT_USER.  See
 http://calcite.incubator.apache.org/docs/reference.html  (System functions
 section).
 When 'user' is qualified with a table alias, it becomes a column
 identifier. 
 {quote}
 The drill documentation @ https://drill.apache.org/docs/reserved-keywords/ 
 merely says to use backticks (``), not to do any table aliasing.  For those 
 who have columns named 'user', this may be misleading...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (DRILL-3443) Flatten function raise exception when JSON files have different schema

2015-07-01 Thread Jason Altekruse (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Altekruse reassigned DRILL-3443:
--

Assignee: Jason Altekruse  (was: Daniel Barclay (Drill))

 Flatten function raise exception when JSON files have different schema
 --

 Key: DRILL-3443
 URL: https://issues.apache.org/jira/browse/DRILL-3443
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Affects Versions: 1.0.0
 Environment: DRILL 1.0 Embedded (running on OSX with Java 8)
 DRILL 1.0 Deployed on MapR 4.1 Sandbox
Reporter: Tugdual Grall
Assignee: Jason Altekruse
Priority: Critical

 I have 2 JSON documents:
 {code}
 {
   name : PPRODUCT_002,
   price : 200.00,
   tags : [sports , cool, ocean]
 }
 {
   name : PPRODUCT_001,
   price : 100.00
 }
 {code}
 And I execute this query:
 {code}
 SELECT name, flatten(tags)
 FROM dfs.`data/json_array/*.json`
 {code}
 If the JSON Documents are located in 2 different files and the first file 
 does not contains the tags (product 001 in 001.json ), the following 
 exception is raised:
 {code}
 org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: 
 java.lang.ClassCastException: Cannot cast 
 org.apache.drill.exec.vector.NullableIntVector to 
 org.apache.drill.exec.vector.RepeatedValueVector Fragment 0:0 [Error Id: 
 4bb5b9e4-0de1-48e9-a0f3-956339608903 on 192.168.99.13:31010]
 {code}
 It is working if:
 * All the JSON documents are in a single json file (order is not important)
 * if the product with the tags attribute is first on the file system, for 
 example you put product 02 in 000.json  (that will be read before 001.json)
 This is similar to [DRILL-3334] bug



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2153) flatten function null handling options

2015-07-01 Thread Jason Altekruse (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-2153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Altekruse updated DRILL-2153:
---
Fix Version/s: (was: 1.2.0)
   1.3.0

 flatten function null handling options
 --

 Key: DRILL-2153
 URL: https://issues.apache.org/jira/browse/DRILL-2153
 Project: Apache Drill
  Issue Type: New Feature
  Components: Execution - Relational Operators
Affects Versions: 0.7.0
 Environment: Sandbox 4.0.2
Reporter: Sudhakar Thota
Assignee: Jason Altekruse
 Fix For: 1.3.0


 Function flatten not handling nulls resulting in eliminating relevant records 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (DRILL-3435) Some reserved-keywords require table aliasing

2015-07-01 Thread Kristine Hahn (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14610613#comment-14610613
 ] 

Kristine Hahn edited comment on DRILL-3435 at 7/1/15 4:47 PM:
--

Using a table alias to query nested fields is mentioned a number of times in 
the docs. 
* 
https://drill.apache.org/docs/troubleshooting/#access-nested-fields-without-table-name/alias
* https://drill.apache.org/docs/json-data-model/#analyzing-json
* https://drill.apache.org/docs/selecting-multiple-columns-within-nested-data/
* https://drill.apache.org/docs/from-clause/ (The alias parameter description 
that says In other table references, aliases are optional needs to be changed 
to say that aliases might be required, and then maybe link to 
https://drill.apache.org/docs/json-data-model/#analyzing-json.
* 
https://drill.apache.org/docs/lesson-2-run-queries-with-ansi-sql/#queries-in-this-lesson
* 
https://drill.apache.org/docs/lesson-3-run-queries-on-complex-data-types/#explore-clickstream-data:


was (Author: krishahn):
Using a table alias to query nested fields is mentioned a number of times in 
the docs. 
* 
https://drill.apache.org/docs/troubleshooting/#access-nested-fields-without-table-name/alias
* https://drill.apache.org/docs/json-data-model/#analyzing-json
* https://drill.apache.org/docs/selecting-multiple-columns-within-nested-data/
* https://drill.apache.org/docs/from-clause/ (The alias parameter description 
that says In other table references, aliases are optional needs to be changed 
to say that aliases might be required, and then maybe link to 
https://drill.apache.org/docs/json-data-model/#analyzing-json.
* 
https://drill.apache.org/docs/lesson-2-run-queries-with-ansi-sql/#queries-in-this-lesson
* 
https://drill.apache.org/docs/lesson-3-run-queries-on-complex-data-types/#explore-clickstream-data:

The need for the alias might be unrelated to the reserved word.

 Some reserved-keywords require table aliasing
 -

 Key: DRILL-3435
 URL: https://issues.apache.org/jira/browse/DRILL-3435
 Project: Apache Drill
  Issue Type: Bug
  Components: Documentation
Affects Versions: 1.0.0
Reporter: Andy Pernsteiner
Assignee: Bridget Bevens
Priority: Minor
  Labels: documentation

 Not only does drill have a number of reserved keywords that require 
 backticking (``), there also appear to be some reserved words that require 
 extra care, using table aliases to be able to perform queries.   One that 
 we've found so far is 'user' .  EG, consider the following scenario:
 bq. /usr/bin/sqlline -u jdbc:drill: -n root
 then:
 {code} select user from 
 `profiles/2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill` ;
 +---+
 | user  |
 +---+
 | root  |
 +---+
 {code}
 But the actual file in question has the 'user' as a different user:
 {code} cat 2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill|egrep -o 
 'user\:\[a-z]+\'
 user:apernsteiner
 {code} 
 The workaround  is to alias the table (t) and prefix the 'user' column in the 
 resultset w/ the table alias :
 {code}
 0: jdbc:drill: select t.`user` from 
 `profiles/2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill` t ;
 +-+
 |  user   |
 +-+
 | apernsteiner  |
 +-+
 {code}
 @jinfeng gave the following explanation on the user@ list:
 {quote}
 'user' is a SQL reserved word.
 When it's used alone, it is a system function, just like CURRENT_USER.  See
 http://calcite.incubator.apache.org/docs/reference.html  (System functions
 section).
 When 'user' is qualified with a table alias, it becomes a column
 identifier. 
 {quote}
 The drill documentation @ https://drill.apache.org/docs/reserved-keywords/ 
 merely says to use backticks (``), not to do any table aliasing.  For those 
 who have columns named 'user', this may be misleading...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DRILL-2235) Assert when NOT IN clause contains multiple columns

2015-07-01 Thread Aman Sinha (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14610664#comment-14610664
 ] 

Aman Sinha commented on DRILL-2235:
---

This query plans successfully since we now support  (since Drill 1.0) 
NestedLoopJoin with scalar subqueries.   Here's a plan with query agains TPC-H:

{code}
0: jdbc:drill:zk=local explain plan for select n1.n_name from 
cp.`tpch/nation.parquet` n1 where (n1.n_nationkey, n1.n_regionkey) not in 
(select n2.n_nationkey, n2.n_regionkey from cp.`tpch/nation.parquet` n2 where 
n2.n_regionkey  10);
+--+--+
| text | json |
+--+--+
| 00-00Screen
00-01  Project(n_name=[$0])
00-02SelectionVectorRemover
00-03  Filter(condition=[NOT(CASE(=($1, 0), false, IS NOT NULL($7), 
true, IS NULL($3), null, IS NULL($4), null, ($2, $1), null, false))])
00-04HashJoin(condition=[AND(=($3, $5), =($4, $6))], 
joinType=[left])
00-06  Project(n_name=[$2], $f0=[$3], $f1=[$4], f5=[$0], f6=[$1])
00-08NestedLoopJoin(condition=[true], joinType=[inner])
00-11  Project(n_nationkey=[$2], n_regionkey=[$0], n_name=[$1])
00-14Scan(groupscan=[ParquetGroupScan 
[entries=[ReadEntryWithPath [path=classpath:/tpch/nation.parquet]], 
selectionRoot=classpath:/tpch/nation.parquet, numFiles=1, 
columns=[`n_nationkey`, `n_regionkey`, `n_name`]]])
00-10  StreamAgg(group=[{}], agg#0=[COUNT()], agg#1=[COUNT($0, 
$1)])
00-13Project($f0=[$0], $f1=[$1], $f2=[true])
00-16  SelectionVectorRemover
00-18Filter(condition=[($1, 10)])
00-20  Project(n_nationkey=[$1], n_regionkey=[$0])
00-21Scan(groupscan=[ParquetGroupScan 
[entries=[ReadEntryWithPath [path=classpath:/tpch/nation.parquet]], 
selectionRoot=classpath:/tpch/nation.parquet, numFiles=1, 
columns=[`n_nationkey`, `n_regionkey`]]])
00-05  Project($f00=[$0], $f10=[$1], $f2=[$2])
00-07HashAgg(group=[{0, 1}], agg#0=[MIN($2)])
00-09  Project($f0=[$0], $f1=[$1], $f2=[true])
00-12SelectionVectorRemover
00-15  Filter(condition=[($1, 10)])
00-17Project(n_nationkey=[$1], n_regionkey=[$0])
00-19  Scan(groupscan=[ParquetGroupScan 
[entries=[ReadEntryWithPath [path=classpath:/tpch/nation.parquet]], 
selectionRoot=classpath:/tpch/nation.parquet, numFiles=1, 
columns=[`n_nationkey`, `n_regionkey`]]])
{code} 

However, note that the StreamAgg is doing a COUNT($0, $1)  .. it seems Calcite 
generates such an aggregate expression.  I am not sure what is the semantics of 
count(a, b).   Running this query fails during execution because we don't 
support this function. 

 Assert when NOT IN clause contains multiple columns
 ---

 Key: DRILL-2235
 URL: https://issues.apache.org/jira/browse/DRILL-2235
 Project: Apache Drill
  Issue Type: Bug
  Components: Query Planning  Optimization
Affects Versions: 0.8.0
Reporter: Victoria Markman
Assignee: Aman Sinha
 Fix For: 1.2.0


 {code}
 0: jdbc:drill:schema=dfs select * from t1;
 ++++
 | a1 | b1 | c1 |
 ++++
 | 1  | a  | 2015-01-01 |
 | 2  | b  | 2015-01-02 |
 | 3  | c  | 2015-01-03 |
 | 4  | null   | 2015-01-04 |
 | 5  | e  | 2015-01-05 |
 | 6  | f  | 2015-01-06 |
 | 7  | g  | 2015-01-07 |
 | null   | h  | 2015-01-08 |
 | 9  | i  | null   |
 | 10 | j  | 2015-01-10 |
 ++++
 10 rows selected (0.056 seconds)
 0: jdbc:drill:schema=dfs select * from t2;
 ++++
 | a2 | b2 | c2 |
 ++++
 | 0  | zzz| 2014-12-31 |
 | 1  | a  | 2015-01-01 |
 | 2  | b  | 2015-01-02 |
 | 2  | b  | 2015-01-02 |
 | 2  | b  | 2015-01-02 |
 | 3  | c  | 2015-01-03 |
 | 4  | d  | 2015-01-04 |
 | 5  | e  | 2015-01-05 |
 | 6  | f  | 2015-01-06 |
 | 7  | g  | 2015-01-07 |
 | 7  | g  | 2015-01-07 |
 | 8  | h  | 2015-01-08 |
 | 9  | i  | 2015-01-09 |
 ++++
 13 rows selected (0.069 seconds)
 {code}
 IN clause returns correct result:
 {code}
 0: jdbc:drill:schema=dfs select count(*) from t1 where (a1, b1) in (select 
 a2, b2 from t2);
 ++
 |  

[jira] [Updated] (DRILL-3447) Doc. pages don't let text wrap at certain widths

2015-07-01 Thread Daniel Barclay (Drill) (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Barclay (Drill) updated DRILL-3447:
--
Description: 
Although the documentation pages sometimes are styled to not prohibit browsers 
from wrapping text to fit, at some browser window widths, when the outline 
appears on the left, the styling reverts to fixed-width formatting--but uses a 
width that is wider than the available space, meaning that part of the page is 
not visible without horizontal scrolling.  See the attachment.

Why does the styling switch to a fixed width in the first place?  If we want to 
prevent the lines of text from becoming so long that they are hard to read, set 
the max-width property, not the width property.  Then we don't block the 
browser's usual ability to try to fit the content into the user's chosen 
browser window width.





  was:
Although the documentation pages sometimes are styled to not prohibit browsers 
from wrapping text to fit, at some browser window widths, when the outline 
appears on the left, the styling reverts to fixed-width formatting--but uses a 
width that is wider than the available space, meaning that part of the page is 
not visible without horizontal scrolling.

Why does the styling switch to a fixed width in the first place?  If we want to 
prevent the lines of text from becoming so long that they are hard to read, set 
the max-width property, not the width property.  Then we don't block the 
browser's usual ability to try to fit the content into the user's chosen 
browser window width.






 Doc. pages don't let text wrap at certain widths
 

 Key: DRILL-3447
 URL: https://issues.apache.org/jira/browse/DRILL-3447
 Project: Apache Drill
  Issue Type: Bug
Reporter: Daniel Barclay (Drill)
 Attachments: ss_Drill_doc_sometimes_fixed_width.png


 Although the documentation pages sometimes are styled to not prohibit 
 browsers from wrapping text to fit, at some browser window widths, when the 
 outline appears on the left, the styling reverts to fixed-width 
 formatting--but uses a width that is wider than the available space, meaning 
 that part of the page is not visible without horizontal scrolling.  See the 
 attachment.
 Why does the styling switch to a fixed width in the first place?  If we want 
 to prevent the lines of text from becoming so long that they are hard to 
 read, set the max-width property, not the width property.  Then we don't 
 block the browser's usual ability to try to fit the content into the user's 
 chosen browser window width.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3443) Flatten function raise exception when JSON files have different schema

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3443:

Fix Version/s: 1.2.0

 Flatten function raise exception when JSON files have different schema
 --

 Key: DRILL-3443
 URL: https://issues.apache.org/jira/browse/DRILL-3443
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Affects Versions: 1.0.0
 Environment: DRILL 1.0 Embedded (running on OSX with Java 8)
 DRILL 1.0 Deployed on MapR 4.1 Sandbox
Reporter: Tugdual Grall
Assignee: Jason Altekruse
Priority: Critical
 Fix For: 1.2.0


 I have 2 JSON documents:
 {code}
 {
   name : PPRODUCT_002,
   price : 200.00,
   tags : [sports , cool, ocean]
 }
 {
   name : PPRODUCT_001,
   price : 100.00
 }
 {code}
 And I execute this query:
 {code}
 SELECT name, flatten(tags)
 FROM dfs.`data/json_array/*.json`
 {code}
 If the JSON Documents are located in 2 different files and the first file 
 does not contains the tags (product 001 in 001.json ), the following 
 exception is raised:
 {code}
 org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: 
 java.lang.ClassCastException: Cannot cast 
 org.apache.drill.exec.vector.NullableIntVector to 
 org.apache.drill.exec.vector.RepeatedValueVector Fragment 0:0 [Error Id: 
 4bb5b9e4-0de1-48e9-a0f3-956339608903 on 192.168.99.13:31010]
 {code}
 It is working if:
 * All the JSON documents are in a single json file (order is not important)
 * if the product with the tags attribute is first on the file system, for 
 example you put product 02 in 000.json  (that will be read before 001.json)
 This is similar to [DRILL-3334] bug



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (DRILL-3435) Some reserved-keywords require table aliasing

2015-07-01 Thread Kristine Hahn (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14610800#comment-14610800
 ] 

Kristine Hahn edited comment on DRILL-3435 at 7/1/15 6:40 PM:
--

[~bbevens] How about we change:

FROM:
In other table references, aliases are optional.

TO:
Aliases might be required for [querying nested 
JSON|https://drill.apache.org/docs/json-data-model/#analyzing-json]. Aliases 
are definitely required to resolve ambiguous references, such as using the name 
user to query the Drill profiles. Drill treats user as a function in this 
case, and the returns unexpected results. If you use a table alias, Drill 
treats user as a column identifier, and the query returns expected results.

[~bbevens] Is there somewhere in your profile querying doc where the bit about 
using user should be mentioned?


was (Author: krishahn):
[~bbevens] How about we change:

FROM:
In other table references, aliases are optional.

TO:
Aliases might be required for querying nested JSON. Aliases are definitely 
required resolve ambiguous references, such as using the name user to query 
the Drill profiles. Drill treats user as a function in this case, and the 
returns unexpected results. If you use a table alias, Drill treats user as a 
column identifier, and the query returns expected results.

[~bbevens] Is there somewhere in your profile querying doc where the bit about 
using user should be mentioned?

 Some reserved-keywords require table aliasing
 -

 Key: DRILL-3435
 URL: https://issues.apache.org/jira/browse/DRILL-3435
 Project: Apache Drill
  Issue Type: Bug
  Components: Documentation
Affects Versions: 1.0.0
Reporter: Andy Pernsteiner
Assignee: Bridget Bevens
Priority: Minor
  Labels: documentation

 Not only does drill have a number of reserved keywords that require 
 backticking (``), there also appear to be some reserved words that require 
 extra care, using table aliases to be able to perform queries.   One that 
 we've found so far is 'user' .  EG, consider the following scenario:
 bq. /usr/bin/sqlline -u jdbc:drill: -n root
 then:
 {code} select user from 
 `profiles/2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill` ;
 +---+
 | user  |
 +---+
 | root  |
 +---+
 {code}
 But the actual file in question has the 'user' as a different user:
 {code} cat 2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill|egrep -o 
 'user\:\[a-z]+\'
 user:apernsteiner
 {code} 
 The workaround  is to alias the table (t) and prefix the 'user' column in the 
 resultset w/ the table alias :
 {code}
 0: jdbc:drill: select t.`user` from 
 `profiles/2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill` t ;
 +-+
 |  user   |
 +-+
 | apernsteiner  |
 +-+
 {code}
 @jinfeng gave the following explanation on the user@ list:
 {quote}
 'user' is a SQL reserved word.
 When it's used alone, it is a system function, just like CURRENT_USER.  See
 http://calcite.incubator.apache.org/docs/reference.html  (System functions
 section).
 When 'user' is qualified with a table alias, it becomes a column
 identifier. 
 {quote}
 The drill documentation @ https://drill.apache.org/docs/reserved-keywords/ 
 merely says to use backticks (``), not to do any table aliasing.  For those 
 who have columns named 'user', this may be misleading...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DRILL-3201) Drill UI Authentication

2015-07-01 Thread Chris Westin (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14610810#comment-14610810
 ] 

Chris Westin commented on DRILL-3201:
-

Extend Drill security to the web UI :
 (P0) Support userid  password based authentication against PAM similar to 
JDBC/ODBC (i.e when I launch web UI, I should be asked for credentials which in 
turn are validated against the PAM configured)
(P0) Control the extent of access to the various functionality in the web UI 
based on user logged in.
For ex: Only a  specified set of admin users/groups should be able access all 
Web UI functionality including looking at the list of all in-progress/completed 
queries and associated profiles and being able to cancel them. 
(P1) All the remaining (individual) users on the can see only their 
interactions with Drill server (i.e the list of queries they submitted and 
cancel them) 


 Drill UI Authentication
 ---

 Key: DRILL-3201
 URL: https://issues.apache.org/jira/browse/DRILL-3201
 Project: Apache Drill
  Issue Type: Improvement
  Components: Client - HTTP
Affects Versions: 1.0.0
 Environment: Drill 1.0.0
Reporter: Rajkumar Singh
Assignee: Jason Altekruse
  Labels: features
 Fix For: 1.2.0


 DRILL UI don't have authentication feature thats why any user can cancel the 
 running query or can change the storage plugin configuration.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3384) CTAS Partitioning by a non-existing column results in NPE.

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3384:

Fix Version/s: 1.2.0

 CTAS Partitioning by a non-existing column results in NPE.
 --

 Key: DRILL-3384
 URL: https://issues.apache.org/jira/browse/DRILL-3384
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Flow
Affects Versions: 1.1.0
 Environment: 4 node cluster on CentOS
Reporter: Khurram Faraaz
Assignee: Steven Phillips
Priority: Critical
 Fix For: 1.2.0


 CTAS Partitioning by a non-existing column results in NPE. 
 Input CSV file had 107 rows, with many duplicates. Note that columns[2] 
 does not exist in the CSV file used in CTAS.
 {code}
 0: jdbc:drill:schema=dfs.tmp create table ctas_prtn_978  as select 
 columns[0] c1, columns[2] c2 from `manyDuplicates.csv`;
 +---++
 | Fragment  | Number of records written  |
 +---++
 | 0_0   | 107|
 +---++
 1 row selected (1.822 seconds)
 {code}
 {code}
 0: jdbc:drill:schema=dfs.tmp create table ctas_prtn_999 partition by (c2) as 
 select * from ctas_prtn_978;
 Error: SYSTEM ERROR: NullPointerException: src
 Fragment 0:0
 [Error Id: a464dd65-ba7d-412b-b97c-4e31ac74a9d7 on centos-01.qa.lab:31010] 
 (state=,code=0)
 {code}
 {code}
 2015-06-26 01:35:41,995 [2a735392-aa07-be41-ec14-bc5591aa044d:frag:0:0] ERROR 
 o.a.d.e.w.fragment.FragmentExecutor - SYSTEM ERROR: NullPointerException: src
 Fragment 0:0
 [Error Id: 86f15f89-ba57-40b9-bff8-554c0fee481b on centos-01.qa.lab:31010]
 org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: 
 NullPointerException: src
 Fragment 0:0
 [Error Id: 86f15f89-ba57-40b9-bff8-554c0fee481b on centos-01.qa.lab:31010]
 at 
 org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:523)
  ~[drill-common-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.sendFinalState(FragmentExecutor.java:326)
  [drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup(FragmentExecutor.java:181)
  [drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:295)
  [drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
 at 
 org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
  [drill-common-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  [na:1.7.0_45]
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  [na:1.7.0_45]
 at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
 Caused by: java.lang.NullPointerException: src
 at 
 io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:252)
  ~[netty-buffer-4.0.27.Final.jar:4.0.27.Final]
 at io.netty.buffer.WrappedByteBuf.setBytes(WrappedByteBuf.java:378) 
 ~[netty-buffer-4.0.27.Final.jar:4.0.27.Final]
 at 
 io.netty.buffer.UnsafeDirectLittleEndian.setBytes(UnsafeDirectLittleEndian.java:28)
  ~[drill-java-exec-1.1.0-SNAPSHOT.jar:4.0.27.Final]
 at io.netty.buffer.DrillBuf.setBytes(DrillBuf.java:699) 
 ~[drill-java-exec-1.1.0-SNAPSHOT.jar:4.0.27.Final]
 at 
 org.apache.drill.exec.test.generated.ProjectorGen4107.doEval(ProjectorTemplate.java:109)
  ~[na:na]
 at 
 org.apache.drill.exec.test.generated.ProjectorGen4107.projectRecords(ProjectorTemplate.java:62)
  ~[na:na]
 at 
 org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.doWork(ProjectRecordBatch.java:172)
  ~[drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
 at 
 org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:93)
  ~[drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
 at 
 org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:129)
  ~[drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
 at 
 org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:147)
  ~[drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
 at 
 org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:105)
  ~[drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
 at 
 org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:95)
  ~[drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
 at 
 

[jira] [Comment Edited] (DRILL-3435) Some reserved-keywords require table aliasing

2015-07-01 Thread Kristine Hahn (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14610800#comment-14610800
 ] 

Kristine Hahn edited comment on DRILL-3435 at 7/1/15 6:40 PM:
--

[~bbevens] How about we change:

FROM:
In other table references, aliases are optional.

TO:
Aliases might be required for [querying nested 
JSON|https://drill.apache.org/docs/json-data-model/#analyzing-json]. Aliases 
are definitely required to resolve ambiguous references, such as using the name 
user to query the Drill profiles. Drill treats user as a function in this 
case, and the returns unexpected results. If you use a table alias, Drill 
treats user as a column identifier, and the query returns expected results.

[~bbevens] Is there somewhere in your profile querying doc where the bit about 
using user should be mentioned?


was (Author: krishahn):
[~bbevens] How about we change:

FROM:
In other table references, aliases are optional.

TO:
Aliases might be required for [querying nested 
JSON|https://drill.apache.org/docs/json-data-model/#analyzing-json]. Aliases 
are definitely required to resolve ambiguous references, such as using the name 
user to query the Drill profiles. Drill treats user as a function in this 
case, and the returns unexpected results. If you use a table alias, Drill 
treats user as a column identifier, and the query returns expected results.

[~bbevens] Is there somewhere in your profile querying doc where the bit about 
using user should be mentioned?

 Some reserved-keywords require table aliasing
 -

 Key: DRILL-3435
 URL: https://issues.apache.org/jira/browse/DRILL-3435
 Project: Apache Drill
  Issue Type: Bug
  Components: Documentation
Affects Versions: 1.0.0
Reporter: Andy Pernsteiner
Assignee: Bridget Bevens
Priority: Minor
  Labels: documentation

 Not only does drill have a number of reserved keywords that require 
 backticking (``), there also appear to be some reserved words that require 
 extra care, using table aliases to be able to perform queries.   One that 
 we've found so far is 'user' .  EG, consider the following scenario:
 bq. /usr/bin/sqlline -u jdbc:drill: -n root
 then:
 {code} select user from 
 `profiles/2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill` ;
 +---+
 | user  |
 +---+
 | root  |
 +---+
 {code}
 But the actual file in question has the 'user' as a different user:
 {code} cat 2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill|egrep -o 
 'user\:\[a-z]+\'
 user:apernsteiner
 {code} 
 The workaround  is to alias the table (t) and prefix the 'user' column in the 
 resultset w/ the table alias :
 {code}
 0: jdbc:drill: select t.`user` from 
 `profiles/2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill` t ;
 +-+
 |  user   |
 +-+
 | apernsteiner  |
 +-+
 {code}
 @jinfeng gave the following explanation on the user@ list:
 {quote}
 'user' is a SQL reserved word.
 When it's used alone, it is a system function, just like CURRENT_USER.  See
 http://calcite.incubator.apache.org/docs/reference.html  (System functions
 section).
 When 'user' is qualified with a table alias, it becomes a column
 identifier. 
 {quote}
 The drill documentation @ https://drill.apache.org/docs/reserved-keywords/ 
 merely says to use backticks (``), not to do any table aliasing.  For those 
 who have columns named 'user', this may be misleading...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2077) Provide a clear starting point for new developers about what to start reading to learn about Drill

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-2077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-2077:

Fix Version/s: Future

 Provide a clear starting point for new developers about what to start reading 
 to learn about Drill
 --

 Key: DRILL-2077
 URL: https://issues.apache.org/jira/browse/DRILL-2077
 Project: Apache Drill
  Issue Type: Improvement
  Components: Documentation
Reporter: Jason Altekruse
Assignee: Jason Altekruse
 Fix For: Future


 As part of my package level javadocs posted in DRILL-1904 I tried to document 
 the root org.apache.drill.exec package. We should have some good information 
 here as well as in the markdown file on the git repo about the best place to 
 start reading the code to understand how drill operates.
 Here is a description I started. I think we want to make sure this is 
 informative but concise. I want to get in the rest of the package docs, so I 
 am leaving this here as a TODO, please feel free to comment, revise or add to 
 this.
 {code}
  * A good place to start learning about Drill is exploring the query plans. A
  * Drill physical plan is defined as a connected graph of operators that read
  * and manipulate data. Operators are configured by implementations of the 
 {@See
  * PhysicalOperator} interface. These query graphs are translated into a graph
  * of physical operators that will actually process data at query execution
  * time. The connections between these nodes are materialized as interfaces
  * where data is passed between different operators. As Drill is distributed
  * these connections can take the form of an RPC layer between the nodes in a
  * Drill cluster.
  *
  * While physical plans can be written by hand, the primary interface for 
 Drill
  * is SQL. Drill is targeted for compliance with the ANSI SQL 2003
  * specification. Query parsing and optimization is handled by Calcite, an
  * Apache incubator project, also used for planning in Apache Hive. Drill
  * defines many planning rules an optimizations that plug into the Calcite
  * planning engine to generate optimal plans for the Drill engine.
  *
  * Unlike most query systems, Drill is designed to query raw files without
  * a predefined catalog of metadata defining the types of data or columns 
  * available in the dataset. To maintain performance in a flexible schema
  * environment, Drill uses runtime code generation to compile custom java
  * code as operators receive a message of change in schema. 
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3201) Drill UI Authentication

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3201:

Fix Version/s: 1.2.0

 Drill UI Authentication
 ---

 Key: DRILL-3201
 URL: https://issues.apache.org/jira/browse/DRILL-3201
 Project: Apache Drill
  Issue Type: Improvement
  Components: Client - HTTP
Affects Versions: 1.0.0
 Environment: Drill 1.0.0
Reporter: Rajkumar Singh
Assignee: Jason Altekruse
  Labels: features
 Fix For: 1.2.0


 DRILL UI don't have authentication feature thats why any user can cancel the 
 running query or can change the storage plugin configuration.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (DRILL-3312) PageReader.allocatePageData() calls BufferAllocator.buffer(int) but doesn't check if the result is null

2015-07-01 Thread Deneche A. Hakim (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Deneche A. Hakim reassigned DRILL-3312:
---

Assignee: Deneche A. Hakim  (was: Hanifi Gunes)

 PageReader.allocatePageData() calls BufferAllocator.buffer(int) but doesn't 
 check if the result is null
 ---

 Key: DRILL-3312
 URL: https://issues.apache.org/jira/browse/DRILL-3312
 Project: Apache Drill
  Issue Type: Bug
  Components: Storage - Parquet
Reporter: Deneche A. Hakim
Assignee: Deneche A. Hakim
 Fix For: 1.2.0

 Attachments: DRILL-3312.1.patch.txt


 Trying to reproduce DRILL-3241, Drill returns the following error:
 {noformat}
 SYSTEM ERROR: org.apache.drill.common.exceptions.DrillRuntimeException: Error 
 in parquet record reader.
 Message: 
 Hadoop path: 
 /Users/hakim/MapR/data/tpcds100/parquet/store_sales/1_10_1.parquet
 Total records read: 0
 Mock records read: 0
 Records to read: 21845
 Row group index: 0
 Records in row group: 3348801
 Parquet Metadata: ParquetMetaData{FileMetaData{schema: message root {
...omitted text
 }
 , metadata: {}}, blocks: [...omitted text]}
 Fragment 3:0
 [Error Id: 0f9ba088-3091-4166-b46f-53ab60d364f8 on 
 10.250.50.54:31010]{noformat}
 The logs contain more information about the cause:
 {noformat}
 Caused by: java.lang.NullPointerException
   at 
 org.apache.drill.exec.store.parquet.DirectCodecFactory$FullDirectDecompressor.decompress(DirectCodecFactory.java:238)
  ~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
   at 
 org.apache.drill.exec.store.parquet.columnreaders.PageReader.next(PageReader.java:230)
  ~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
   at 
 org.apache.drill.exec.store.parquet.columnreaders.NullableColumnReader.processPages(NullableColumnReader.java:76)
  ~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
   at 
 org.apache.drill.exec.store.parquet.columnreaders.ParquetRecordReader.readAllFixedFields(ParquetRecordReader.java:380)
  ~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
   at 
 org.apache.drill.exec.store.parquet.columnreaders.ParquetRecordReader.next(ParquetRecordReader.java:423)
  ~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
...
 {noformat}
 Just before that line, PageReader.next() calls the following method:
 {noformat}
   private void allocatePageData(int size) {
 Preconditions.checkArgument(pageData == null);
 pageData = 
 parentColumnReader.parentReader.getOperatorContext().getAllocator().buffer(size);
   }
 {noformat}
 this method should check the output of BufferAllocator.buffer(int) to make 
 sure the buffer was successfully allocated.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DRILL-3243) Need a better error message - Use of alias in window function definition

2015-07-01 Thread Deneche A. Hakim (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14610378#comment-14610378
 ] 

Deneche A. Hakim commented on DRILL-3243:
-

Sounds good. In the meantime I think we should still try to get this patch 
merged (once reviewed) it will at least provide a better error message until we 
fix the issue in the planner. What do you think ?

 Need a better error message - Use of alias in window function definition
 

 Key: DRILL-3243
 URL: https://issues.apache.org/jira/browse/DRILL-3243
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Flow
Affects Versions: 1.0.0
Reporter: Khurram Faraaz
Assignee: Hanifi Gunes
Priority: Minor
 Fix For: 1.2.0

 Attachments: DRILL-3243.1.patch.txt, DRILL-3243.2.patch.txt


 Need a better error message when we use alias for window definition in query 
 that uses window functions. for example, OVER(PARTITION BY columns[0] ORDER 
 BY columns[1]) tmp, and if alias tmp is used in the predicate we need a 
 message that says, column tmp does not exist, that is how it is in Postgres 
 9.3
 Postgres 9.3
 {code}
 postgres=# select count(*) OVER(partition by type order by id) `tmp` from 
 airports where tmp is not null;
 ERROR:  column tmp does not exist
 LINE 1: ...ect count(*) OVER(partition by type order by id) `tmp` from ...
  ^
 {code}
 Drill 1.0
 {code}
 0: jdbc:drill:schema=dfs.tmp select count(*) OVER(partition by columns[2] 
 order by columns[0]) tmp from `airports.csv` where tmp is not null;
 Error: SYSTEM ERROR: java.lang.IllegalArgumentException: Selected column(s) 
 must have name 'columns' or must be plain '*'
 Fragment 0:0
 [Error Id: 66987b81-fe50-422d-95e4-9ce61c873584 on centos-02.qa.lab:31010] 
 (state=,code=0)
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2430) Improve Error Propagation (Umbrella)

2015-07-01 Thread Deneche A. Hakim (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Deneche A. Hakim updated DRILL-2430:

Fix Version/s: (was: 1.2.0)
   1.3.0

 Improve Error Propagation (Umbrella)
 

 Key: DRILL-2430
 URL: https://issues.apache.org/jira/browse/DRILL-2430
 Project: Apache Drill
  Issue Type: Improvement
  Components: Execution - Flow
Affects Versions: 0.9.0
Reporter: Deneche A. Hakim
Assignee: Deneche A. Hakim
Priority: Minor
 Fix For: 1.3.0


 In many cases, when an exception is thrown, it will be reported in the logs 
 but the client will actually get a different and more generic message that 
 doesn't give enough information about the problem.
 Our goal is to provide the user with better error messages. To do so we will 
 separate user and system exceptions:
 - for user exceptions the server returns enough information about the error 
 to the client
 - system exceptions only contain the necessary information to help developers 
 debug the error, e.g. error ID + drillbit IP



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3181) Change error message to a more clear one when window range is specified for window function

2015-07-01 Thread Deneche A. Hakim (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Deneche A. Hakim updated DRILL-3181:

Fix Version/s: (was: 1.2.0)
   1.3.0

 Change error message to a more clear one when window range is specified for 
 window function
 ---

 Key: DRILL-3181
 URL: https://issues.apache.org/jira/browse/DRILL-3181
 Project: Apache Drill
  Issue Type: Bug
  Components: SQL Parser
Reporter: Victoria Markman
Assignee: Deneche A. Hakim
Priority: Minor
  Labels: window_function
 Fix For: 1.3.0


 This error message makes me think that some data types are supported in the 
 frame clause, when if fact we only support at this point unbounded 
 preceding/unbounded following and current row/. We should change error 
 message to say that.
 {code}
 0: jdbc:drill:schema=dfs select a2, count(b2) over(partition by a2 order by 
 a2 range between 10 preceding and 10 following) from t2;
 Error: PARSE ERROR: From line 1, column 69 to line 1, column 70: Data type of 
 ORDER BY prohibits use of RANGE clause
 [Error Id: 67f94be3-d4a0-4d4c-94f5-d88b14fadbf3 on atsqa4-133.qa.lab:31010] 
 (state=,code=0)
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2775) message error not clear when doing a select or ctas on empty folder

2015-07-01 Thread Deneche A. Hakim (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Deneche A. Hakim updated DRILL-2775:

Fix Version/s: (was: 1.2.0)
   1.3.0

 message error not clear when doing a select or ctas on empty folder
 ---

 Key: DRILL-2775
 URL: https://issues.apache.org/jira/browse/DRILL-2775
 Project: Apache Drill
  Issue Type: Bug
  Components: Metadata
Reporter: Rahul Challapalli
Assignee: Deneche A. Hakim
Priority: Minor
  Labels: error_message_must_fix
 Fix For: 1.3.0


 if you have an empty folder emptyfolder, you get a cryptic error message 
 when you try to query the folder or CTAS a table that has the same name of 
 the empty folder:
 {noformat}
 0: jdbc:drill:zk=local select * from emptyfolder;
 Error: PARSE ERROR: Index: 0, Size: 0
 [Error Id: ef86154b-8219-4b48-84bf-cb318f7d4ae4 on abdel-11.qa.lab:31010] 
 (state=,code=0)
 {noformat}
 {noformat}
 0: jdbc:drill:zk=local create table emptyfolder as select * from `test.json`;
 Error: SYSTEM ERROR: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
 [Error Id: 1c3965f4-1566-4df6-9bb6-a91211771976 on abdel-11.qa.lab:31010] 
 (state=,code=0)
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2818) Error message must be updated when query fails with FileNotFoundException

2015-07-01 Thread Deneche A. Hakim (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-2818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Deneche A. Hakim updated DRILL-2818:

Fix Version/s: (was: 1.2.0)
   1.3.0

 Error message must be updated when query fails with FileNotFoundException
 -

 Key: DRILL-2818
 URL: https://issues.apache.org/jira/browse/DRILL-2818
 Project: Apache Drill
  Issue Type: Bug
  Components: SQL Parser
Affects Versions: 0.9.0
 Environment: exception branch
Reporter: Abhishek Girish
Assignee: Deneche A. Hakim
Priority: Minor
  Labels: error_message_must_fix
 Fix For: 1.3.0


 When user specifies a non-existent file/directory in a query, the following 
 error is being thrown:
 {code:sql}
  show files from dfs.tmp.`tpch`;
 Query failed: SYSTEM ERROR: Failure handling SQL.
 [9184097e-8339-42d3-96ce-1fba51c6bc78 on 192.168.158.107:31010]
 Error: exception while executing query: Failure while executing query. 
 (state=,code=0)
 {code}
 This should be updated to 
 {code:sql}
  show files from dfs.tmp.`tpch`;
 Query failed: File /tmp/tpch does not exist. 
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DRILL-3440) Canceling queries on Sqlline crashes all Drillbits

2015-07-01 Thread Sudheesh Katkam (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14610940#comment-14610940
 ] 

Sudheesh Katkam commented on DRILL-3440:


Yes the value was changed for debugging to true. When set to false, the 
drillbits do not crash.

 Canceling queries on Sqlline crashes all Drillbits
 --

 Key: DRILL-3440
 URL: https://issues.apache.org/jira/browse/DRILL-3440
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Flow
Reporter: Abhishek Girish
Assignee: Parth Chandra
Priority: Critical
 Attachments: drillbit.log.txt, drillbit.out.txt, hs_error.log


 Upon canceling a query all drillbits crash. 
 {code:sql}
  SELECT RANK() OVER (PARTITION BY ss.ss_store_sk ORDER BY ss.ss_store_sk), 
  AVG(ss_ext_discount_amt) OVER (PARTITION BY ss.ss_store_sk ORDER BY 
  ss.ss_store_sk) FROM store_sales ss WHERE ss.ss_store_sk is not NULL LIMIT 
  20;
 [Cancel]
 {code}
 Upon reissuing a query, I see an error with connection. Upon inspection, all 
 drillbits were down. There was a JVM crash. 
 {code:sql}
  select * from store_sales limit 1;
 Error: CONNECTION ERROR: Connection /10.10.120.101:55788 -- 
 /10.10.120.110:31010 (user client) closed unexpectedly.
 [Error Id: 6dfd9fef-39bf-4955-8783-49805e1a8e3d ] (state=,code=0)
 {code}
 Logs attached. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3111) Drill UI should support fast schema return and streaming results

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3111:

Fix Version/s: Future

 Drill UI should support fast schema return and streaming results
 

 Key: DRILL-3111
 URL: https://issues.apache.org/jira/browse/DRILL-3111
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - HTTP
Affects Versions: 1.0.0
Reporter: Abhishek Girish
Assignee: Jason Altekruse
 Fix For: Future


 On sqlline, a query which returns several hundred rows, supports fast schema 
 return and streams results as they are fetched. 
 Drill UI doesn't support either of these. It waits until all results are 
 fetched and displays them at once. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3116) Headers do not resize in enhanced sqlline that correctly resizes columns to nicely format data

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3116:

Fix Version/s: Future

 Headers do not resize in enhanced sqlline that correctly resizes columns to 
 nicely format data
 --

 Key: DRILL-3116
 URL: https://issues.apache.org/jira/browse/DRILL-3116
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - CLI
Reporter: Jason Altekruse
Assignee: Jason Altekruse
 Fix For: Future






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2618) BasicFormatMatcher calls getFirstPath(...) without checking # of paths is not zero

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-2618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-2618:

Fix Version/s: 1.3.0

 BasicFormatMatcher calls getFirstPath(...) without checking # of paths is not 
 zero
 --

 Key: DRILL-2618
 URL: https://issues.apache.org/jira/browse/DRILL-2618
 Project: Apache Drill
  Issue Type: Bug
  Components: Storage - Other
Reporter: Daniel Barclay (Drill)
Assignee: Jacques Nadeau
 Fix For: 1.3.0


 {{BasicFormatMatcher.isReadable(...)}} calls {{getFirstPath(...)}} without 
 checking that there is at least one path.  This can cause an 
 IndexOutOfBoundsException.
 To reproduce, create an empty directory {{/tmp/CaseInsensitiveColumnNames}} 
 and run 
 {{exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2619) Unsupported implicit casts should throw a proper error message

2015-07-01 Thread Deneche A. Hakim (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-2619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Deneche A. Hakim updated DRILL-2619:

Fix Version/s: (was: 1.2.0)
   1.3.0

 Unsupported implicit casts should throw a proper error message
 --

 Key: DRILL-2619
 URL: https://issues.apache.org/jira/browse/DRILL-2619
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Reporter: Rahul Challapalli
Assignee: Deneche A. Hakim
Priority: Minor
  Labels: error_message_must_fix
 Fix For: 1.3.0

 Attachments: fewtypes_null.tbl


 git.commit.id.abbrev=c11fcf7
 When I have a where clause with an implicit cast, I get back a wierd message 
 which does not indicate the problem
 {code}
 select columns[9] from `fewtypes_null.tbl` where columns[0] = 6;
 Query failed: RemoteRpcException: Failure while running fragment., null [ 
 0faf63c5-cdca-4b5b-a2ab-5f3ef02d5c9b on qa-node191.qa.lab:31010 ]
 [ 0faf63c5-cdca-4b5b-a2ab-5f3ef02d5c9b on qa-node191.qa.lab:31010 ]
 {code}
 Attached the stacktrace. Let me know if you need anything more.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-1282) Move parquet to use v2 format as default

2015-07-01 Thread Deneche A. Hakim (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Deneche A. Hakim updated DRILL-1282:

Fix Version/s: (was: 1.2.0)
   1.3.0

 Move parquet to use v2 format as default
 

 Key: DRILL-1282
 URL: https://issues.apache.org/jira/browse/DRILL-1282
 Project: Apache Drill
  Issue Type: Improvement
  Components: Storage - Parquet
Reporter: Jacques Nadeau
Assignee: Deneche A. Hakim
Priority: Minor
 Fix For: 1.3.0






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2692) Do not log errors more than once

2015-07-01 Thread Deneche A. Hakim (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-2692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Deneche A. Hakim updated DRILL-2692:

Fix Version/s: (was: 1.2.0)
   1.3.0

 Do not log errors more than once
 

 Key: DRILL-2692
 URL: https://issues.apache.org/jira/browse/DRILL-2692
 Project: Apache Drill
  Issue Type: Improvement
  Components: Execution - Flow
Affects Versions: 0.8.0
Reporter: Deneche A. Hakim
Assignee: Deneche A. Hakim
Priority: Minor
 Fix For: 1.3.0


 When a failure occurs in the execution stack it will be logged up to 6 times 
 in the server logs.
 For example trying to query a bad json (extra ':') file will cause the 
 following events:
 - ScanBatch.next() logs a debug message Failed to read the batch. 
 Stopping... and calls FragmentContext.fail()
 - FragmentContext.fail() logs an error message Fragment Context received 
 failure -- Fragment: 
 - FragmentExecutor.run() calls internalFail() and logs an error message when 
 calling ErrorHelper.logAndConvertError()
   Error error id: error message
 - Foreman.close() calls ErrorHelper.logAndConvertError() which logs an error 
 message Error error id: error message
 - FragmentExecutor.closeOutResources() will throw a RuntimeException because 
 it contains a non null deferredException (the original exception). This 
 exception is caught in run() and a warning message is logged Error while 
 initializing or executing fragment
 - FragmentExecutor.run() calls FragmentContext.fail() when it catches the 
 RuntimeException which will log an error message Fragment Context received 
 failure -- Fragment: 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3440) Canceling queries on Sqlline crashes all Drillbits with unsafe memory access disabled

2015-07-01 Thread Sudheesh Katkam (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sudheesh Katkam updated DRILL-3440:
---
Summary: Canceling queries on Sqlline crashes all Drillbits with unsafe 
memory access disabled  (was: Canceling queries on Sqlline crashes all 
Drillbits)

 Canceling queries on Sqlline crashes all Drillbits with unsafe memory access 
 disabled
 -

 Key: DRILL-3440
 URL: https://issues.apache.org/jira/browse/DRILL-3440
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Flow
Reporter: Abhishek Girish
Assignee: Parth Chandra
Priority: Critical
 Attachments: drillbit.log.txt, drillbit.out.txt, hs_error.log


 Upon canceling a query all drillbits crash. 
 {code:sql}
  SELECT RANK() OVER (PARTITION BY ss.ss_store_sk ORDER BY ss.ss_store_sk), 
  AVG(ss_ext_discount_amt) OVER (PARTITION BY ss.ss_store_sk ORDER BY 
  ss.ss_store_sk) FROM store_sales ss WHERE ss.ss_store_sk is not NULL LIMIT 
  20;
 [Cancel]
 {code}
 Upon reissuing a query, I see an error with connection. Upon inspection, all 
 drillbits were down. There was a JVM crash. 
 {code:sql}
  select * from store_sales limit 1;
 Error: CONNECTION ERROR: Connection /10.10.120.101:55788 -- 
 /10.10.120.110:31010 (user client) closed unexpectedly.
 [Error Id: 6dfd9fef-39bf-4955-8783-49805e1a8e3d ] (state=,code=0)
 {code}
 Logs attached. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3415) WebUI Query should warn that it won't work if impersonation is turned on

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3415:

Fix Version/s: 1.2.0

 WebUI Query should warn that it won't work if impersonation is turned on
 

 Key: DRILL-3415
 URL: https://issues.apache.org/jira/browse/DRILL-3415
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - HTTP
Affects Versions: 1.0.0
 Environment: Any
Reporter: Chris Matta
Assignee: Jason Altekruse
Priority: Minor
  Labels: easyfix
 Fix For: 1.2.0


 When running a query via the WebUI Query tab while impersonation is enabled, 
 the error complains that the table requested is not found. 
 The error should reference impersonation not being supported via the web GUI 
 for now, until it's supported.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2975) Extended Json : Time type reporting data which is dependent on the system on which it ran

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-2975:

Fix Version/s: 1.2.0

 Extended Json : Time type reporting data which is dependent on the system on 
 which it ran
 -

 Key: DRILL-2975
 URL: https://issues.apache.org/jira/browse/DRILL-2975
 Project: Apache Drill
  Issue Type: Bug
  Components: Storage - JSON
Affects Versions: 1.2.0
Reporter: Rahul Challapalli
Assignee: Steven Phillips
Priority: Critical
 Fix For: 1.2.0


 git.commit.id.abbrev=3b19076
 Data :
 {code}
 {
   int_col : {$numberLong: 1},
   date_col : {$dateDay: 2012-05-22},
   time_col  : {$time: 19:20:30.45Z}
 }
 {code}
 System 1 :
 {code}
 0: jdbc:drill:schema=dfs_eea select time_col from `extended_json/data1.json` 
 d;
 ++
 |  time_col  |
 ++
 | 19:20:30.450 |
 ++
 {code}
 System 2 :
 {code}
 0: jdbc:drill:schema=dfs.drillTestDirComplexP select time_col from 
 `temp.json`;
 ++
 |  time_col  |
 ++
 | 11:20:30.450 |
 ++
 {code}
 The above results are inconsistent.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3043) Select over corrupt parquet file must return a better message

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3043:

Fix Version/s: (was: 1.2.0)
   1.3.0

 Select over corrupt parquet file must return a better message
 -

 Key: DRILL-3043
 URL: https://issues.apache.org/jira/browse/DRILL-3043
 Project: Apache Drill
  Issue Type: Bug
  Components: Storage - Parquet
Affects Versions: 1.0.0
 Environment: 21cc578b6b8c8f3ca1ebffd3dbb92e35d68bc726 | MD-272: 
 MapRDB plugin needs another update on 2015-05-08 
Reporter: Khurram Faraaz
Assignee: Steven Phillips
Priority: Minor
 Fix For: 1.3.0


 Select over a corrupt parquet file does not return proper error message to 
 user. Looks like the correct message is getting lost.
 The below CTAS was used to create the original parquet file.
 {code}
 0: jdbc:drill:schema=dfs.tmp create table tblJsnToPrq_01 as select key from 
 `oneMlnDblData.json`;
 ++---+
 |  Fragment  | Number of records written |
 ++---+
 | 0_0| 99|
 ++---+
 1 row selected (2.381 seconds)
 0: jdbc:drill:schema=dfs.tmp select count(key) from  tblJsnToPrq_01;
 ++
 |   EXPR$0   |
 ++
 | 99 |
 ++
 1 row selected (0.232 seconds)
 {code}
 {code}
 0: jdbc:drill:schema=dfs.tmp select key from `corrupt_Parquet.parquet`;
 Error: SYSTEM ERROR: java.io.IOException: FAILED_TO_UNCOMPRESS(5)
 Fragment 0:0
 [Error Id: 48072728-574f-450f-8370-32dbbb534da6 on centos-01.qa.lab:31010] 
 (state=,code=0)
 {code}
 The way the corrupt parquet file was created from the original parquet file. 
 The first and last 100 bytes were written to the new (corrupt) parquet 
 file
 {code}
 [root@centos-01 mal_formed_parquet]# head -c 100 0_0_0.parquet  
 corrupt_Parquet.parquet
 [root@centos-01 mal_formed_parquet]# tail -c 100 0_0_0.parquet  
 corrupt_Parquet.parquet
 {code}
 Stack trace from drillbit.log
 {code}
 2015-05-12 23:05:45,285 [2aad78b6-09c6-0e17-accf-ab279fab39dc:frag:0:0] ERROR 
 o.a.d.c.e.DrillRuntimeException - SYSTEM ERROR: java.io.IOException: 
 FAILED_TO_UNCOMPRESS(5)
 Fragment 0:0
 [Error Id: 48072728-574f-450f-8370-32dbbb534da6 on centos-01.qa.lab:31010]
 org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: 
 java.io.IOException: FAILED_TO_UNCOMPRESS(5)
 Fragment 0:0
 [Error Id: 48072728-574f-450f-8370-32dbbb534da6 on centos-01.qa.lab:31010]
 at 
 org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:495)
  ~[drill-common-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.sendFinalState(FragmentExecutor.java:286)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:254)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
  [drill-common-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  [na:1.7.0_45]
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  [na:1.7.0_45]
 at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
 Caused by: org.apache.drill.common.exceptions.DrillRuntimeException: Error in 
 parquet record reader.
 Message:
 Hadoop path: /tmp/corrupt_Parquet.parquet
 Total records read: 0
 Mock records read: 0
 Records to read: 32768
 Row group index: 0
 Records in row group: 99
 Parquet Metadata: ParquetMetaData{FileMetaData{schema: message root {
   optional double key;
 }
 , metadata: {}}, blocks: [BlockMetaData{99, 8000439 
 [ColumnMetaData{SNAPPY [key] DOUBLE  [PLAIN, BIT_PACKED, RLE], 4}]}]}
 at 
 org.apache.drill.exec.store.parquet.columnreaders.ParquetRecordReader.handleAndRaise(ParquetRecordReader.java:339)
  ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.store.parquet.columnreaders.ParquetRecordReader.next(ParquetRecordReader.java:441)
  ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.physical.impl.ScanBatch.next(ScanBatch.java:175) 
 ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
  ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 

[jira] [Updated] (DRILL-3043) Select over corrupt parquet file must return a better message

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3043:

Fix Version/s: 1.2.0

 Select over corrupt parquet file must return a better message
 -

 Key: DRILL-3043
 URL: https://issues.apache.org/jira/browse/DRILL-3043
 Project: Apache Drill
  Issue Type: Bug
  Components: Storage - Parquet
Affects Versions: 1.0.0
 Environment: 21cc578b6b8c8f3ca1ebffd3dbb92e35d68bc726 | MD-272: 
 MapRDB plugin needs another update on 2015-05-08 
Reporter: Khurram Faraaz
Assignee: Steven Phillips
Priority: Minor
 Fix For: 1.3.0


 Select over a corrupt parquet file does not return proper error message to 
 user. Looks like the correct message is getting lost.
 The below CTAS was used to create the original parquet file.
 {code}
 0: jdbc:drill:schema=dfs.tmp create table tblJsnToPrq_01 as select key from 
 `oneMlnDblData.json`;
 ++---+
 |  Fragment  | Number of records written |
 ++---+
 | 0_0| 99|
 ++---+
 1 row selected (2.381 seconds)
 0: jdbc:drill:schema=dfs.tmp select count(key) from  tblJsnToPrq_01;
 ++
 |   EXPR$0   |
 ++
 | 99 |
 ++
 1 row selected (0.232 seconds)
 {code}
 {code}
 0: jdbc:drill:schema=dfs.tmp select key from `corrupt_Parquet.parquet`;
 Error: SYSTEM ERROR: java.io.IOException: FAILED_TO_UNCOMPRESS(5)
 Fragment 0:0
 [Error Id: 48072728-574f-450f-8370-32dbbb534da6 on centos-01.qa.lab:31010] 
 (state=,code=0)
 {code}
 The way the corrupt parquet file was created from the original parquet file. 
 The first and last 100 bytes were written to the new (corrupt) parquet 
 file
 {code}
 [root@centos-01 mal_formed_parquet]# head -c 100 0_0_0.parquet  
 corrupt_Parquet.parquet
 [root@centos-01 mal_formed_parquet]# tail -c 100 0_0_0.parquet  
 corrupt_Parquet.parquet
 {code}
 Stack trace from drillbit.log
 {code}
 2015-05-12 23:05:45,285 [2aad78b6-09c6-0e17-accf-ab279fab39dc:frag:0:0] ERROR 
 o.a.d.c.e.DrillRuntimeException - SYSTEM ERROR: java.io.IOException: 
 FAILED_TO_UNCOMPRESS(5)
 Fragment 0:0
 [Error Id: 48072728-574f-450f-8370-32dbbb534da6 on centos-01.qa.lab:31010]
 org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: 
 java.io.IOException: FAILED_TO_UNCOMPRESS(5)
 Fragment 0:0
 [Error Id: 48072728-574f-450f-8370-32dbbb534da6 on centos-01.qa.lab:31010]
 at 
 org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:495)
  ~[drill-common-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.sendFinalState(FragmentExecutor.java:286)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:254)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
  [drill-common-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  [na:1.7.0_45]
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  [na:1.7.0_45]
 at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
 Caused by: org.apache.drill.common.exceptions.DrillRuntimeException: Error in 
 parquet record reader.
 Message:
 Hadoop path: /tmp/corrupt_Parquet.parquet
 Total records read: 0
 Mock records read: 0
 Records to read: 32768
 Row group index: 0
 Records in row group: 99
 Parquet Metadata: ParquetMetaData{FileMetaData{schema: message root {
   optional double key;
 }
 , metadata: {}}, blocks: [BlockMetaData{99, 8000439 
 [ColumnMetaData{SNAPPY [key] DOUBLE  [PLAIN, BIT_PACKED, RLE], 4}]}]}
 at 
 org.apache.drill.exec.store.parquet.columnreaders.ParquetRecordReader.handleAndRaise(ParquetRecordReader.java:339)
  ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.store.parquet.columnreaders.ParquetRecordReader.next(ParquetRecordReader.java:441)
  ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.physical.impl.ScanBatch.next(ScanBatch.java:175) 
 ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
  ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:83) 
 

[jira] [Updated] (DRILL-3202) Count(*) fails on JSON wrapped up in single array - JSON parsing error

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3202:

Fix Version/s: 1.2.0

 Count(*) fails on JSON wrapped up in single array - JSON parsing error
 --

 Key: DRILL-3202
 URL: https://issues.apache.org/jira/browse/DRILL-3202
 Project: Apache Drill
  Issue Type: Bug
  Components: Storage - JSON
Affects Versions: 1.0.0
Reporter: Neeraja
Assignee: Steven Phillips
 Fix For: 1.2.0


 I have a JSON document as follows.
 [
 {
 Category: 1,2,
 Comments: Total sites: 20, RV sites: 20, Elec sites: 20, Water at 
 site, RV Dump, Showers, Flush Toilets, RV Fee: $14, Tent Fee: $14, Elev: 
 545', Tel: 256-577-9619, Nearest town: Muscle Shoals,
 Latitude: 34.800446,
 Longitude: -87.498242,
 Name: Alloys Co Park,
 State: AL,
 Type: cp,
 URL: 
 http://www.campingroadtrip.com/campgrounds/campground/campground/23478/alabama/colbert-county-alloys-park-campground;
 }
 ]
 Drill has ability to unwrap the array (without user specifying it) and 
 perform some SQL operations on it. However count(*) specifically fails on 
 these documents.
 0: jdbc:drill:zk=local select * from 
 dfs.`default`.`/Users/nrentachintala/Downloads/yelp/uspointsofinterestshort.json`
  limit 10;
 +---++---++---++---+--+
 | Category  | 
Comments   
  | Latitude  | Longitude  | Name  | 
 State  | Type  | URL  |
 +---++---++---++---+--+
 | 1,2 | Total sites: 20, RV sites: 20, Elec sites: 20, Water at site, RV 
 Dump, Showers, Flush Toilets, RV Fee: $14, Tent Fee: $14, Elev: 545', Tel: 
 256-577-9619, Nearest town: Muscle Shoals | 34.800446 | -87.498242 | Alloys 
 Co Park | AL | cp | 
 http://www.campingroadtrip.com/campgrounds/campground/campground/23478/alabama/colbert-county-alloys-park-campground
  |
 +---++---++---++---+--+
 1 row selected (0.197 seconds)
 0: jdbc:drill:zk=local select distinct type from 
 dfs.`default`.`/Users/nrentachintala/Downloads/yelp/uspointsofinterestshort.json`
  limit 10;
 +---+
 | type  |
 +---+
 | cp|
 +---+
 1 row selected (0.193 seconds)
 0: jdbc:drill:zk=local 
 0: jdbc:drill:zk=local select count(*) from 
 dfs.`default`.`/Users/nrentachintala/Downloads/yelp/uspointsofinterestshort.json`
  limit 10;
 Error: DATA_READ ERROR: Error parsing JSON - Cannot read from the middle of a 
 record. Current token was START_ARRAY
 File  /Users/nrentachintala/Downloads/yelp/uspointsofinterestshort.json
 Record  1
 Fragment 0:0
 [Error Id: 4742f738-1d43-4fef-af48-110065c9dd83 on 172.16.1.82:31010] 
 (state=,code=0)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3353) Non data-type related schema changes errors

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3353:

Fix Version/s: 1.2.0

 Non data-type related schema changes errors
 ---

 Key: DRILL-3353
 URL: https://issues.apache.org/jira/browse/DRILL-3353
 Project: Apache Drill
  Issue Type: Bug
  Components: Storage - JSON
Affects Versions: 1.0.0
Reporter: Oscar Bernal
Assignee: Steven Phillips
 Fix For: 1.2.0


 I'm having trouble querying a data set with varying schema for a nested 
 object fields. The majority of my data for a specific type of record has the 
 following nested data:
 {code}
 attributes:{daysSinceInstall:0,destination:none,logged:no,nth:1,type:organic,wearable:no}}
 {code}
 Among those records (hundreds of them) I have only two with a slightly 
 different schema:
 {code}
 attributes:{adSet:Teste-Adwords-Engagement-Branch-iOS-230615-adset,campaign:Teste-Adwords-Engagement-Branch-iOS-230615,channel:Adwords,daysSinceInstall:0,destination:none,logged:no,nth:4,type:branch,wearable:no}}
 {code}
 When trying to query the new fields, my queries fail:
 With {code:sql}ALTER SYSTEM SET `store.json.all_text_mode` = true;{code}
 {noformat}
 0: jdbc:drill:zk=local select log.event.attributes from 
 `dfs`.`root`.`/file.json` as log where log.si = 
 '07A3F985-4B34-4A01-9B83-3B14548EF7BE' and log.event.attributes.ad = 
 'Teste-FB-Engagement-Puro-iOS-230615';
 Error: SYSTEM ERROR: java.lang.NumberFormatException: 
 Teste-FB-Engagement-Puro-iOS-230615
 Fragment 0:0
 [Error Id: 22d37a65-7dd0-4661-bbfc-7a50bbee9388 on 
 ip-10-0-1-16.sa-east-1.compute.internal:31010] (state=,code=0)
 {noformat}
 With {code:sql}ALTER SYSTEM SET `store.json.all_text_mode` = false;`{code}
 {noformat}
 0: jdbc:drill:zk=local select log.event.attributes from 
 `dfs`.`root`.`/file.json` as log where log.si = 
 '07A3F985-4B34-4A01-9B83-3B14548EF7BE';
 Error: DATA_READ ERROR: Error parsing JSON - You tried to write a Bit type 
 when you are using a ValueWriter of type NullableVarCharWriterImpl.
 File  file.json
 Record  35
 Fragment 0:0
 [Error Id: 5746e3e9-48c0-44b1-8e5f-7c94e7c64d0f on 
 ip-10-0-1-16.sa-east-1.compute.internal:31010] (state=,code=0)
 {noformat}
 If I try to extract all attributes from those events, Drill will only 
 return a subset of the fields, ignoring the others. 
 {noformat}
 0: jdbc:drill:zk=local select log.event.attributes from 
 `dfs`.`root`.`/file.json` as log where log.si = 
 '07A3F985-4B34-4A01-9B83-3B14548EF7BE' and log.type ='Opens App';
 ++
 |   EXPR$0   |
 ++
 | {logged:no,wearable:no,type:}   |
 | {logged:no,wearable:no,type:}  |
 | {logged:no,wearable:no,type:}  |
 | {logged:no,wearable:no,type:}|
 | {logged:no,wearable:no,type:}   |
 ++
 {noformat}
 What I find strange is that I have thousands of records in the same file with 
 different schema for different record types and all other queries seem run 
 well.
 Is there something about how Drill infers schema that I might be missing 
 here? Does it infer based on a sample % of the data and fail for records that 
 were not taken into account while inferring schema? I suspect I wouldn't have 
 this error if I had 100's of records with that other schema inside the file, 
 but I can't find anything in the docs or code to support that hypothesis. 
 Perhaps it's just a bug? Is it expected?
 Troubleshooting guide seems to mention something about this but it's very 
 vague in implying Drill doesn't fully support schema changes. I thought that 
 was for data type changes mostly, for which there are other well documented 
 issues.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3223) Logical plan deserializer for a join node is broken

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3223:

Component/s: Query Planning  Optimization

 Logical plan deserializer for a join node is broken
 ---

 Key: DRILL-3223
 URL: https://issues.apache.org/jira/browse/DRILL-3223
 Project: Apache Drill
  Issue Type: Bug
  Components: Query Planning  Optimization
Reporter: Piotr Sokólski
 Fix For: 1.2.0


 Trying to submit a logical query through the web interface or 
 ./bin/submit_plan fails with an exception 
 bq. java.lang.IllegalArgumentException: Conflicting property-based creators: 
 already had [constructor for org.apache.drill.common.logical.data.Join, 
 annotations: {interface 
 com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator()}],
  encountered [constructor for org.apache.drill.common.logical.data.Join, 
 annotations: {interface 
 com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator()}]
 (Full queried plan and error message: 
 https://gist.github.com/pyetras/bf625b6697de62284996)
 This is most likely due to the JsonCreator annotation being used in two 
 places in 
 https://github.com/apache/drill/blob/master/common/src/main/java/org/apache/drill/common/logical/data/Join.java#L52-52



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3222) Need a zip function to combine coordinated lists

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3222:

Issue Type: New Feature  (was: Bug)

 Need a zip function to combine coordinated lists
 

 Key: DRILL-3222
 URL: https://issues.apache.org/jira/browse/DRILL-3222
 Project: Apache Drill
  Issue Type: New Feature
Reporter: Ted Dunning

 It is often very useful to be able to turn a pair (or more) of lists into a 
 single list of pairs.  Thus zip([a,b], [1,2]) = [[a,1], [b,2]].
 The handling of short lists, more than two lists and so on is TBD, but the 
 base function is an important one.
 One use case is in time series where storing times as one list and values as 
 another is very handy but processing these results would be much better done 
 by using flatten(zip(times, values)).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3223) Logical plan deserializer for a join node is broken

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3223:

Fix Version/s: 1.2.0

 Logical plan deserializer for a join node is broken
 ---

 Key: DRILL-3223
 URL: https://issues.apache.org/jira/browse/DRILL-3223
 Project: Apache Drill
  Issue Type: Bug
  Components: Query Planning  Optimization
Reporter: Piotr Sokólski
Assignee: Jinfeng Ni
 Fix For: 1.2.0


 Trying to submit a logical query through the web interface or 
 ./bin/submit_plan fails with an exception 
 bq. java.lang.IllegalArgumentException: Conflicting property-based creators: 
 already had [constructor for org.apache.drill.common.logical.data.Join, 
 annotations: {interface 
 com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator()}],
  encountered [constructor for org.apache.drill.common.logical.data.Join, 
 annotations: {interface 
 com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator()}]
 (Full queried plan and error message: 
 https://gist.github.com/pyetras/bf625b6697de62284996)
 This is most likely due to the JsonCreator annotation being used in two 
 places in 
 https://github.com/apache/drill/blob/master/common/src/main/java/org/apache/drill/common/logical/data/Join.java#L52-52



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3223) Logical plan deserializer for a join node is broken

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3223:

Assignee: Jinfeng Ni

 Logical plan deserializer for a join node is broken
 ---

 Key: DRILL-3223
 URL: https://issues.apache.org/jira/browse/DRILL-3223
 Project: Apache Drill
  Issue Type: Bug
  Components: Query Planning  Optimization
Reporter: Piotr Sokólski
Assignee: Jinfeng Ni
 Fix For: 1.2.0


 Trying to submit a logical query through the web interface or 
 ./bin/submit_plan fails with an exception 
 bq. java.lang.IllegalArgumentException: Conflicting property-based creators: 
 already had [constructor for org.apache.drill.common.logical.data.Join, 
 annotations: {interface 
 com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator()}],
  encountered [constructor for org.apache.drill.common.logical.data.Join, 
 annotations: {interface 
 com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator()}]
 (Full queried plan and error message: 
 https://gist.github.com/pyetras/bf625b6697de62284996)
 This is most likely due to the JsonCreator annotation being used in two 
 places in 
 https://github.com/apache/drill/blob/master/common/src/main/java/org/apache/drill/common/logical/data/Join.java#L52-52



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DRILL-3292) SUM(constant) OVER(...) returns wrong results

2015-07-01 Thread Sean Hsuan-Yi Chu (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14610919#comment-14610919
 ] 

Sean Hsuan-Yi Chu commented on DRILL-3292:
--

Before hep planner. The plan is still reasonable. 
{code}
LogicalProject(SUM1=[SUM(1) OVER (PARTITION BY $0 RANGE BETWEEN UNBOUNDED 
PRECEDING AND UNBOUNDED FOLLOWING)], SUM5=[SUM(5) OVER (PARTITION BY $0 RANGE 
BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)])
  LogicalFilter(condition=[=($0, 2)])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
{code}

I am looking it right now


 SUM(constant) OVER(...) returns wrong results
 -

 Key: DRILL-3292
 URL: https://issues.apache.org/jira/browse/DRILL-3292
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Relational Operators, Query Planning  
 Optimization
Affects Versions: 1.0.0
Reporter: Deneche A. Hakim
Assignee: Sean Hsuan-Yi Chu
Priority: Critical
  Labels: window_function
 Fix For: 1.2.0


 The following query returns wrong results:
 {noformat}
 0: jdbc:drill: select sum(1) over w sum1, sum(5) over w sum5 from 
 cp.`employee.json` where position_id = 2 window w as (partition by 
 position_id);
 +---+---+
 | sum1  | sum5  |
 +---+---+
 | 6 | 6 |
 | 6 | 6 |
 | 6 | 6 |
 | 6 | 6 |
 | 6 | 6 |
 | 6 | 6 |
 +---+---+
 {noformat}
 The second column should display 30 (5 x 6) instead of 6.
 Here is the plan for the query:
 {noformat}
 00-00Screen
 00-01  Project(sum1=[$0], sum5=[$1])
 00-02Project(sum1=[$0], sum5=[$1])
 00-03  Project($0=[$1], $1=[$2])
 00-04Window(window#0=[window(partition {0} order by [] range 
 between UNBOUNDED PRECEDING and UNBOUNDED FOLLOWING aggs [SUM($1), SUM($2)])])
 00-05  SelectionVectorRemover
 00-06Sort(sort0=[$0], dir0=[ASC])
 00-07  Filter(condition=[=($0, 2)])
 00-08Scan(groupscan=[EasyGroupScan 
 [selectionRoot=/employee.json, numFiles=1, columns=[`position_id`], 
 files=[classpath:/employee.json]]])
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3083) Should display an error when an extension is define more than once in storage configuration

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3083:

Fix Version/s: 1.3.0

 Should display an error when an extension is define more than once in storage 
 configuration
 ---

 Key: DRILL-3083
 URL: https://issues.apache.org/jira/browse/DRILL-3083
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - HTTP
Affects Versions: 1.0.0
Reporter: Krystal
Assignee: Jason Altekruse
Priority: Minor
 Fix For: 1.3.0


 Currently a user can define the same file extension in multiple formats in 
 the dfs storage configuration.  This can cause drill to grab the wrong data 
 format to display the data.  An error should be displayed when user add an 
 extension that is already defined in another format.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3445) BufferAllocator.buffer() implementations should throw an OutOfMemoryRuntimeException

2015-07-01 Thread Deneche A. Hakim (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Deneche A. Hakim updated DRILL-3445:

Attachment: DRILL-3445.1.patch.txt

 BufferAllocator.buffer() implementations should throw an 
 OutOfMemoryRuntimeException
 

 Key: DRILL-3445
 URL: https://issues.apache.org/jira/browse/DRILL-3445
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types, Execution - Relational Operators
Affects Versions: 1.0.0
Reporter: Deneche A. Hakim
Assignee: Deneche A. Hakim
 Fix For: 1.2.0

 Attachments: DRILL-3445.1.patch.txt


 current implementations of BufferAllocator.buffer() return null if it can't 
 allocate the buffer because of direct memory or fragment limits., but many 
 places in the code don't actually check if the buffer is null before trying 
 to access it, this will result in confusing NullPointerException(s) when we 
 are in fact running out of memory.
 We should change the implementations to throw an OutOfMemoryRuntimeException 
 instead. Drill already handles this exception properly in most cases and 
 displays a proper error message to the user.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3096) State change requested from ... -- ... for blank after for

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3096:

Component/s: Execution - Flow

 State change requested from ... -- ... for  blank after for
 

 Key: DRILL-3096
 URL: https://issues.apache.org/jira/browse/DRILL-3096
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Flow
Reporter: Daniel Barclay (Drill)
 Fix For: 1.2.0


 Something seems to be missing (or sometimes blank) in state-change log 
 messages.  See the for with nothing after it in these messages:
 {noformat}
 18:27:44.578 [2aaab4ed-0f43-9290-b480-35aa0ec77cb0:frag:0:0] INFO  
 o.apache.drill.exec.work.fragment.FragmentExecutor - 
 2aaab4ed-0f43-9290-b480-35aa0ec77cb0:0:0
 : State change requested from CANCELLATION_REQUESTED -- FAILED for 
 18:27:44.587 [2aaab4ed-0f43-9290-b480-35aa0ec77cb0:frag:0:0] INFO  
 o.apache.drill.exec.work.fragment.FragmentExecutor - 
 2aaab4ed-0f43-9290-b480-35aa0ec77cb0:0:0
 : State change requested from FAILED -- FAILED for 
 18:27:44.588 [2aaab4ed-0f43-9290-b480-35aa0ec77cb0:frag:0:0] INFO  
 o.apache.drill.exec.work.fragment.FragmentExecutor - 
 2aaab4ed-0f43-9290-b480-35aa0ec77cb0:0:0
 : State change requested from FAILED -- FINISHED for 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3096) State change requested from ... -- ... for blank after for

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3096:

Fix Version/s: 1.2.0

 State change requested from ... -- ... for  blank after for
 

 Key: DRILL-3096
 URL: https://issues.apache.org/jira/browse/DRILL-3096
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Flow
Reporter: Daniel Barclay (Drill)
Assignee: Sudheesh Katkam
 Fix For: 1.2.0


 Something seems to be missing (or sometimes blank) in state-change log 
 messages.  See the for with nothing after it in these messages:
 {noformat}
 18:27:44.578 [2aaab4ed-0f43-9290-b480-35aa0ec77cb0:frag:0:0] INFO  
 o.apache.drill.exec.work.fragment.FragmentExecutor - 
 2aaab4ed-0f43-9290-b480-35aa0ec77cb0:0:0
 : State change requested from CANCELLATION_REQUESTED -- FAILED for 
 18:27:44.587 [2aaab4ed-0f43-9290-b480-35aa0ec77cb0:frag:0:0] INFO  
 o.apache.drill.exec.work.fragment.FragmentExecutor - 
 2aaab4ed-0f43-9290-b480-35aa0ec77cb0:0:0
 : State change requested from FAILED -- FAILED for 
 18:27:44.588 [2aaab4ed-0f43-9290-b480-35aa0ec77cb0:frag:0:0] INFO  
 o.apache.drill.exec.work.fragment.FragmentExecutor - 
 2aaab4ed-0f43-9290-b480-35aa0ec77cb0:0:0
 : State change requested from FAILED -- FINISHED for 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3096) State change requested from ... -- ... for blank after for

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3096:

Assignee: Sudheesh Katkam

 State change requested from ... -- ... for  blank after for
 

 Key: DRILL-3096
 URL: https://issues.apache.org/jira/browse/DRILL-3096
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Flow
Reporter: Daniel Barclay (Drill)
Assignee: Sudheesh Katkam
 Fix For: 1.2.0


 Something seems to be missing (or sometimes blank) in state-change log 
 messages.  See the for with nothing after it in these messages:
 {noformat}
 18:27:44.578 [2aaab4ed-0f43-9290-b480-35aa0ec77cb0:frag:0:0] INFO  
 o.apache.drill.exec.work.fragment.FragmentExecutor - 
 2aaab4ed-0f43-9290-b480-35aa0ec77cb0:0:0
 : State change requested from CANCELLATION_REQUESTED -- FAILED for 
 18:27:44.587 [2aaab4ed-0f43-9290-b480-35aa0ec77cb0:frag:0:0] INFO  
 o.apache.drill.exec.work.fragment.FragmentExecutor - 
 2aaab4ed-0f43-9290-b480-35aa0ec77cb0:0:0
 : State change requested from FAILED -- FAILED for 
 18:27:44.588 [2aaab4ed-0f43-9290-b480-35aa0ec77cb0:frag:0:0] INFO  
 o.apache.drill.exec.work.fragment.FragmentExecutor - 
 2aaab4ed-0f43-9290-b480-35aa0ec77cb0:0:0
 : State change requested from FAILED -- FINISHED for 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DRILL-3445) BufferAllocator.buffer() implementations should throw an OutOfMemoryRuntimeException

2015-07-01 Thread Deneche A. Hakim (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14610888#comment-14610888
 ] 

Deneche A. Hakim commented on DRILL-3445:
-

[~hgunes] can you please review [#36103|https://reviews.apache.org/r/36103/] ? 
thx

 BufferAllocator.buffer() implementations should throw an 
 OutOfMemoryRuntimeException
 

 Key: DRILL-3445
 URL: https://issues.apache.org/jira/browse/DRILL-3445
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types, Execution - Relational Operators
Affects Versions: 1.0.0
Reporter: Deneche A. Hakim
Assignee: Hanifi Gunes
 Fix For: 1.2.0

 Attachments: DRILL-3445.1.patch.txt


 current implementations of BufferAllocator.buffer() return null if it can't 
 allocate the buffer because of direct memory or fragment limits., but many 
 places in the code don't actually check if the buffer is null before trying 
 to access it, this will result in confusing NullPointerException(s) when we 
 are in fact running out of memory.
 We should change the implementations to throw an OutOfMemoryRuntimeException 
 instead. Drill already handles this exception properly in most cases and 
 displays a proper error message to the user.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3126) SELECT `VARCHAR`('x') yields internal (SYSTEM ERROR) error

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3126:

Component/s: Functions - Drill

 SELECT `VARCHAR`('x')  yields internal (SYSTEM ERROR) error
 ---

 Key: DRILL-3126
 URL: https://issues.apache.org/jira/browse/DRILL-3126
 Project: Apache Drill
  Issue Type: Bug
  Components: Functions - Drill
Reporter: Daniel Barclay (Drill)

 Trying to call an unknown function usually results in an error message like 
 that in the following:
 {noformat}
 0: jdbc:drill:zk=local SELECT NoSuchFunction('x') FROM 
 INFORMATION_SCHEMA.CATALOGS;
 May 17, 2015 9:15:13 PM org.apache.calcite.sql.validate.SqlValidatorException 
 init
 SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: No match found 
 for function signature NoSuchFunction(CHARACTER)
 May 17, 2015 9:15:13 PM org.apache.calcite.runtime.CalciteException init
 SEVERE: org.apache.calcite.runtime.CalciteContextException: From line 1, 
 column 8 to line 1, column 26: No match found for function signature 
 NoSuchFunction(CHARACTER)
 Error: PARSE ERROR: From line 1, column 8 to line 1, column 26: No match 
 found for function signature NoSuchFunction(CHARACTER)
 {noformat}
 However, trying to use a data type name in such a function call yields an 
 internal error:
 {noformat}
 [Error Id: 0439d30c-8cdb-4eda-a253-17bf5afc468b on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT `VARCHAR`('x') FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException: 
 Failure while trying to materialize incoming schema.  Errors:
  
 Error in expression at index -1.  Error: Missing function implementation: 
 [varchar(VARCHAR-REQUIRED)].  Full expression: --UNKNOWN EXPRESSION--..
 Fragment 0:0
 [Error Id: 3f20c811-a81f-41ad-9dc7-362456754eaf on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3126) SELECT `VARCHAR`('x') yields internal (SYSTEM ERROR) error

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3126:

Assignee: Daniel Barclay (Drill)

 SELECT `VARCHAR`('x')  yields internal (SYSTEM ERROR) error
 ---

 Key: DRILL-3126
 URL: https://issues.apache.org/jira/browse/DRILL-3126
 Project: Apache Drill
  Issue Type: Bug
  Components: Functions - Drill
Reporter: Daniel Barclay (Drill)
Assignee: Daniel Barclay (Drill)
Priority: Minor

 Trying to call an unknown function usually results in an error message like 
 that in the following:
 {noformat}
 0: jdbc:drill:zk=local SELECT NoSuchFunction('x') FROM 
 INFORMATION_SCHEMA.CATALOGS;
 May 17, 2015 9:15:13 PM org.apache.calcite.sql.validate.SqlValidatorException 
 init
 SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: No match found 
 for function signature NoSuchFunction(CHARACTER)
 May 17, 2015 9:15:13 PM org.apache.calcite.runtime.CalciteException init
 SEVERE: org.apache.calcite.runtime.CalciteContextException: From line 1, 
 column 8 to line 1, column 26: No match found for function signature 
 NoSuchFunction(CHARACTER)
 Error: PARSE ERROR: From line 1, column 8 to line 1, column 26: No match 
 found for function signature NoSuchFunction(CHARACTER)
 {noformat}
 However, trying to use a data type name in such a function call yields an 
 internal error:
 {noformat}
 [Error Id: 0439d30c-8cdb-4eda-a253-17bf5afc468b on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT `VARCHAR`('x') FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException: 
 Failure while trying to materialize incoming schema.  Errors:
  
 Error in expression at index -1.  Error: Missing function implementation: 
 [varchar(VARCHAR-REQUIRED)].  Full expression: --UNKNOWN EXPRESSION--..
 Fragment 0:0
 [Error Id: 3f20c811-a81f-41ad-9dc7-362456754eaf on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3082) Safeguards against dropping rows in StreamingAggBatch

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3082:

Assignee: Steven Phillips

 Safeguards against dropping rows in StreamingAggBatch
 -

 Key: DRILL-3082
 URL: https://issues.apache.org/jira/browse/DRILL-3082
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Relational Operators
Reporter: Mehant Baid
Assignee: Steven Phillips
 Fix For: 1.2.0


 As I was debugging DRILL-3069, Steven mentioned he had a patch to safeguard 
 against dropping rows in StreamingAggBatch.  It might be useful to get this 
 patch as it would cause asserts in such scenarios.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3039) Trying to connect to non-existent Zookeeper seems to try indefinitely

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3039:

Priority: Minor  (was: Major)

 Trying to connect to non-existent Zookeeper seems to try indefinitely
 -

 Key: DRILL-3039
 URL: https://issues.apache.org/jira/browse/DRILL-3039
 Project: Apache Drill
  Issue Type: Bug
Reporter: Daniel Barclay (Drill)
Priority: Minor

 Trying to make a JDBC connection using a JDBC URL of jdbc:drill:, which 
 causes defaulting to a zk configuration parameter value of 
 localhost:2181, when there is no Zookeeper running at that address doesn't 
 fail quickly, but seems to cause trying indefinitely.  
 (There's no response back to the JDBC level, and turning up logging verbosity 
 shows continued activity (every second or so) in org.apache.zookeeper code).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3067) Index out of bounds exception when in list contains exceeds 20 items and one of the items is a numeric expression

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3067?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3067:

Fix Version/s: 1.2.0

 Index out of bounds exception when in list contains exceeds 20 items and 
 one of the items is a numeric expression
 ---

 Key: DRILL-3067
 URL: https://issues.apache.org/jira/browse/DRILL-3067
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Relational Operators
Affects Versions: 1.0.0
Reporter: Victoria Markman
Assignee: Chris Westin
 Fix For: 1.2.0

 Attachments: in_list_integer.sql


 Index out of bounds exception when in list contains 10,000 integer values
 Failing query looks like this: select count(*) from t1 where a1 in (7680 
 integer values)
 drillbit.log
 {code}
 org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: 
 java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
 Fragment 0:0
 [Error Id: 89dd9d30-ff0b-4513-bd79-624d63efb5f0 on atsqa4-133.qa.lab:31010]
 at 
 org.apache.drill.exec.work.foreman.QueryManager$1.statusUpdate(QueryManager.java:481)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.QueryManager$RootStatusReporter.statusChange(QueryManager.java:461)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.AbstractStatusReporter.fail(AbstractStatusReporter.java:90)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.AbstractStatusReporter.fail(AbstractStatusReporter.java:86)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.sendFinalState(FragmentExecutor.java:291)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:255)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
  [drill-common-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  [na:1.7.0_71]
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  [na:1.7.0_71]
 at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
 2015-05-13 22:22:26,153 [2aac315d-a333-fa7d-3534-94912b01e07d:frag:0:0] INFO  
 o.a.d.e.w.fragment.FragmentExecutor - 
 2aac315d-a333-fa7d-3534-94912b01e07d:0:0: State change requested from FAILED 
 -- CANCELLATION_REQUESTED for
 2015-05-13 22:22:26,153 [2aac315d-a333-fa7d-3534-94912b01e07d:frag:0:0] WARN  
 o.a.d.e.w.fragment.FragmentExecutor - Ignoring unexpected state transition 
 FAILED = CANCELLATION_REQUESTED.
 2015-05-13 22:22:26,153 [2aac315d-a333-fa7d-3534-94912b01e07d:frag:0:0] INFO  
 o.a.drill.exec.work.foreman.Foreman - foreman cleaning up.
 2015-05-13 22:22:26,161 [2aac315d-a333-fa7d-3534-94912b01e07d:frag:0:0] ERROR 
 o.a.d.exec.work.foreman.QueryManager - Failure while storing Query Profile
 java.lang.RuntimeException: java.io.IOException: 
 java.lang.InterruptedException
 at 
 org.apache.drill.exec.store.sys.local.FilePStore.put(FilePStore.java:148) 
 ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.QueryManager.writeFinalProfile(QueryManager.java:307)
  ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman$ForemanResult.close(Foreman.java:743)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:838)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:780)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.common.EventProcessor.sendEvent(EventProcessor.java:73) 
 [drill-common-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman$StateSwitch.moveToState(Foreman.java:782)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman.moveToState(Foreman.java:891) 
 [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman.access$2700(Foreman.java:107) 
 [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 

[jira] [Updated] (DRILL-3067) Index out of bounds exception when in list contains exceeds 20 items and one of the items is a numeric expression

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3067?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3067:

Component/s: Execution - Relational Operators

 Index out of bounds exception when in list contains exceeds 20 items and 
 one of the items is a numeric expression
 ---

 Key: DRILL-3067
 URL: https://issues.apache.org/jira/browse/DRILL-3067
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Relational Operators
Affects Versions: 1.0.0
Reporter: Victoria Markman
 Fix For: 1.2.0

 Attachments: in_list_integer.sql


 Index out of bounds exception when in list contains 10,000 integer values
 Failing query looks like this: select count(*) from t1 where a1 in (7680 
 integer values)
 drillbit.log
 {code}
 org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: 
 java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
 Fragment 0:0
 [Error Id: 89dd9d30-ff0b-4513-bd79-624d63efb5f0 on atsqa4-133.qa.lab:31010]
 at 
 org.apache.drill.exec.work.foreman.QueryManager$1.statusUpdate(QueryManager.java:481)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.QueryManager$RootStatusReporter.statusChange(QueryManager.java:461)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.AbstractStatusReporter.fail(AbstractStatusReporter.java:90)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.AbstractStatusReporter.fail(AbstractStatusReporter.java:86)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.sendFinalState(FragmentExecutor.java:291)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:255)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
  [drill-common-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  [na:1.7.0_71]
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  [na:1.7.0_71]
 at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
 2015-05-13 22:22:26,153 [2aac315d-a333-fa7d-3534-94912b01e07d:frag:0:0] INFO  
 o.a.d.e.w.fragment.FragmentExecutor - 
 2aac315d-a333-fa7d-3534-94912b01e07d:0:0: State change requested from FAILED 
 -- CANCELLATION_REQUESTED for
 2015-05-13 22:22:26,153 [2aac315d-a333-fa7d-3534-94912b01e07d:frag:0:0] WARN  
 o.a.d.e.w.fragment.FragmentExecutor - Ignoring unexpected state transition 
 FAILED = CANCELLATION_REQUESTED.
 2015-05-13 22:22:26,153 [2aac315d-a333-fa7d-3534-94912b01e07d:frag:0:0] INFO  
 o.a.drill.exec.work.foreman.Foreman - foreman cleaning up.
 2015-05-13 22:22:26,161 [2aac315d-a333-fa7d-3534-94912b01e07d:frag:0:0] ERROR 
 o.a.d.exec.work.foreman.QueryManager - Failure while storing Query Profile
 java.lang.RuntimeException: java.io.IOException: 
 java.lang.InterruptedException
 at 
 org.apache.drill.exec.store.sys.local.FilePStore.put(FilePStore.java:148) 
 ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.QueryManager.writeFinalProfile(QueryManager.java:307)
  ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman$ForemanResult.close(Foreman.java:743)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:838)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:780)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.common.EventProcessor.sendEvent(EventProcessor.java:73) 
 [drill-common-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman$StateSwitch.moveToState(Foreman.java:782)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman.moveToState(Foreman.java:891) 
 [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman.access$2700(Foreman.java:107) 
 [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 

[jira] [Updated] (DRILL-2373) JSON query request returns all types as strings

2015-07-01 Thread Sudheesh Katkam (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-2373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sudheesh Katkam updated DRILL-2373:
---
Assignee: Adam Gilmore  (was: Sudheesh Katkam)

 JSON query request returns all types as strings
 ---

 Key: DRILL-2373
 URL: https://issues.apache.org/jira/browse/DRILL-2373
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - HTTP
Affects Versions: 0.7.0, 0.8.0
Reporter: Adam Gilmore
Assignee: Adam Gilmore
Priority: Minor
 Fix For: 1.2.0

 Attachments: DRILL-2373.1.patch.txt, DRILL-2373.2.patch.txt


 I'm not sure if the query JSON endpoint is a valid, documented feature of 
 Drill, but at the moment it returns all results as strings.
 So, for example:
 {code}select count(*) from cp.`employee.json`{code}
 Will return 1155 (as a string) as opposed to 1155 (as a numeric JSON value).
 It really should be returning numeric values as proper JSON numeric values.  
 Same should apply for boolean values.
 How we handle other data types (i.e. dates, intervals, timestamps, etc.) 
 needs discussion.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DRILL-3445) BufferAllocator.buffer() implementations should throw an OutOfMemoryRuntimeException

2015-07-01 Thread Deneche A. Hakim (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14611021#comment-14611021
 ] 

Deneche A. Hakim commented on DRILL-3445:
-

all unit tests are passing along with functional and tpch100

 BufferAllocator.buffer() implementations should throw an 
 OutOfMemoryRuntimeException
 

 Key: DRILL-3445
 URL: https://issues.apache.org/jira/browse/DRILL-3445
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types, Execution - Relational Operators
Affects Versions: 1.0.0
Reporter: Deneche A. Hakim
Assignee: Hanifi Gunes
 Fix For: 1.2.0

 Attachments: DRILL-3445.1.patch.txt


 current implementations of BufferAllocator.buffer() return null if it can't 
 allocate the buffer because of direct memory or fragment limits., but many 
 places in the code don't actually check if the buffer is null before trying 
 to access it, this will result in confusing NullPointerException(s) when we 
 are in fact running out of memory.
 We should change the implementations to throw an OutOfMemoryRuntimeException 
 instead. Drill already handles this exception properly in most cases and 
 displays a proper error message to the user.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3096) State change requested from ... -- ... for blank after for

2015-07-01 Thread Sudheesh Katkam (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sudheesh Katkam updated DRILL-3096:
---
Attachment: DRILL-3096.1.patch.txt

 State change requested from ... -- ... for  blank after for
 

 Key: DRILL-3096
 URL: https://issues.apache.org/jira/browse/DRILL-3096
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Flow
Reporter: Daniel Barclay (Drill)
Assignee: Sudheesh Katkam
 Fix For: 1.2.0

 Attachments: DRILL-3096.1.patch.txt


 Something seems to be missing (or sometimes blank) in state-change log 
 messages.  See the for with nothing after it in these messages:
 {noformat}
 18:27:44.578 [2aaab4ed-0f43-9290-b480-35aa0ec77cb0:frag:0:0] INFO  
 o.apache.drill.exec.work.fragment.FragmentExecutor - 
 2aaab4ed-0f43-9290-b480-35aa0ec77cb0:0:0
 : State change requested from CANCELLATION_REQUESTED -- FAILED for 
 18:27:44.587 [2aaab4ed-0f43-9290-b480-35aa0ec77cb0:frag:0:0] INFO  
 o.apache.drill.exec.work.fragment.FragmentExecutor - 
 2aaab4ed-0f43-9290-b480-35aa0ec77cb0:0:0
 : State change requested from FAILED -- FAILED for 
 18:27:44.588 [2aaab4ed-0f43-9290-b480-35aa0ec77cb0:frag:0:0] INFO  
 o.apache.drill.exec.work.fragment.FragmentExecutor - 
 2aaab4ed-0f43-9290-b480-35aa0ec77cb0:0:0
 : State change requested from FAILED -- FINISHED for 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3141) sqlline throws an exception when query is cancelled

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3141:

Assignee: Daniel Barclay (Drill)

 sqlline throws an exception when query is cancelled
 ---

 Key: DRILL-3141
 URL: https://issues.apache.org/jira/browse/DRILL-3141
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - CLI
Affects Versions: 1.0.0
Reporter: Victoria Markman
Assignee: Daniel Barclay (Drill)
 Fix For: 1.2.0


 I cancelled query and got a sqlline exception. Was able to reproduce it only 
 twice. Don't have a reliable reproduction.
 {code}
 0: jdbc:drill:schema=dfs select * from web_sales ws, web_returns wr where 
 ws.ws_customer_sk = wr.wr_customer_sk limit 1;
 java.lang.RuntimeException: java.sql.SQLException: Unexpected 
 RuntimeException: java.util.ConcurrentModificationException
 at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73)
 at 
 sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:92)
 at sqlline.TableOutputFormat.print(TableOutputFormat.java:127)
 at sqlline.SqlLine.print(SqlLine.java:1583)
 at sqlline.Commands.execute(Commands.java:852)
 at sqlline.Commands.sql(Commands.java:751)
 at sqlline.SqlLine.dispatch(SqlLine.java:738)
 at sqlline.SqlLine.begin(SqlLine.java:612)
 at sqlline.SqlLine.start(SqlLine.java:366)
 at sqlline.SqlLine.main(SqlLine.java:259)
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3141) sqlline throws an exception when query is cancelled

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3141:

Fix Version/s: 1.2.0

 sqlline throws an exception when query is cancelled
 ---

 Key: DRILL-3141
 URL: https://issues.apache.org/jira/browse/DRILL-3141
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - CLI
Affects Versions: 1.0.0
Reporter: Victoria Markman
Assignee: Daniel Barclay (Drill)
 Fix For: 1.2.0


 I cancelled query and got a sqlline exception. Was able to reproduce it only 
 twice. Don't have a reliable reproduction.
 {code}
 0: jdbc:drill:schema=dfs select * from web_sales ws, web_returns wr where 
 ws.ws_customer_sk = wr.wr_customer_sk limit 1;
 java.lang.RuntimeException: java.sql.SQLException: Unexpected 
 RuntimeException: java.util.ConcurrentModificationException
 at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73)
 at 
 sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:92)
 at sqlline.TableOutputFormat.print(TableOutputFormat.java:127)
 at sqlline.SqlLine.print(SqlLine.java:1583)
 at sqlline.Commands.execute(Commands.java:852)
 at sqlline.Commands.sql(Commands.java:751)
 at sqlline.SqlLine.dispatch(SqlLine.java:738)
 at sqlline.SqlLine.begin(SqlLine.java:612)
 at sqlline.SqlLine.start(SqlLine.java:366)
 at sqlline.SqlLine.main(SqlLine.java:259)
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3138) Doc.: BINARY example B@e6d9eb7 doesn't make sense

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3138:

Assignee: Daniel Barclay (Drill)

 Doc.: BINARY example B@e6d9eb7 doesn't make sense
 ---

 Key: DRILL-3138
 URL: https://issues.apache.org/jira/browse/DRILL-3138
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - CLI, Client - HTTP
Reporter: Daniel Barclay (Drill)
Assignee: Daniel Barclay (Drill)
 Fix For: 1.3.0


 On the Supported Data Types page at 
 http://drill.apache.org/docs/supported-data-types/, the example value of 
 {{B@e6d9eb7}} for type {{BINARY}} doesn't make sense.
 Strings like {{[B@e6d9eb7}} result from calling method {{toString()}} on 
 Java byte arrays (objects of type {{byte[]}} (represented as {{[B}} 
 internally).  The hex digits represent the hash code of the object.
 In particular, those hex digits are not a representation of the BINARY value. 
 They have no relationship to the bytes contained in and the BINARY value 
 represented by the object of type byte[].  (Two different objects containing 
 the same sequence of bytes have different [B@... strings.)
 nbsp;
 The root problem appears to be that our two user interfaces to Drill (SQLLine 
 and the web UI) display such {{[B@...}} strings rather than displaying 
 binary string values reasonably. 
 (They should render a BINARY value into a string of characters that actually 
 represents the string of bytes in the BINARY value (perhaps as a SQL 
 {{binary string literal}}).)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3138) Doc.: BINARY example B@e6d9eb7 doesn't make sense

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3138:

Component/s: Client - HTTP
 Client - CLI

 Doc.: BINARY example B@e6d9eb7 doesn't make sense
 ---

 Key: DRILL-3138
 URL: https://issues.apache.org/jira/browse/DRILL-3138
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - CLI, Client - HTTP
Reporter: Daniel Barclay (Drill)
 Fix For: 1.3.0


 On the Supported Data Types page at 
 http://drill.apache.org/docs/supported-data-types/, the example value of 
 {{B@e6d9eb7}} for type {{BINARY}} doesn't make sense.
 Strings like {{[B@e6d9eb7}} result from calling method {{toString()}} on 
 Java byte arrays (objects of type {{byte[]}} (represented as {{[B}} 
 internally).  The hex digits represent the hash code of the object.
 In particular, those hex digits are not a representation of the BINARY value. 
 They have no relationship to the bytes contained in and the BINARY value 
 represented by the object of type byte[].  (Two different objects containing 
 the same sequence of bytes have different [B@... strings.)
 nbsp;
 The root problem appears to be that our two user interfaces to Drill (SQLLine 
 and the web UI) display such {{[B@...}} strings rather than displaying 
 binary string values reasonably. 
 (They should render a BINARY value into a string of characters that actually 
 represents the string of bytes in the BINARY value (perhaps as a SQL 
 {{binary string literal}}).)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3138) Doc.: BINARY example B@e6d9eb7 doesn't make sense

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3138:

Fix Version/s: 1.3.0

 Doc.: BINARY example B@e6d9eb7 doesn't make sense
 ---

 Key: DRILL-3138
 URL: https://issues.apache.org/jira/browse/DRILL-3138
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - CLI, Client - HTTP
Reporter: Daniel Barclay (Drill)
Assignee: Daniel Barclay (Drill)
 Fix For: 1.3.0


 On the Supported Data Types page at 
 http://drill.apache.org/docs/supported-data-types/, the example value of 
 {{B@e6d9eb7}} for type {{BINARY}} doesn't make sense.
 Strings like {{[B@e6d9eb7}} result from calling method {{toString()}} on 
 Java byte arrays (objects of type {{byte[]}} (represented as {{[B}} 
 internally).  The hex digits represent the hash code of the object.
 In particular, those hex digits are not a representation of the BINARY value. 
 They have no relationship to the bytes contained in and the BINARY value 
 represented by the object of type byte[].  (Two different objects containing 
 the same sequence of bytes have different [B@... strings.)
 nbsp;
 The root problem appears to be that our two user interfaces to Drill (SQLLine 
 and the web UI) display such {{[B@...}} strings rather than displaying 
 binary string values reasonably. 
 (They should render a BINARY value into a string of characters that actually 
 represents the string of bytes in the BINARY value (perhaps as a SQL 
 {{binary string literal}}).)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-1760) Count on a map fails with SchemaChangeException

2015-07-01 Thread Hanifi Gunes (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hanifi Gunes updated DRILL-1760:

Priority: Major  (was: Minor)

 Count on a map fails with SchemaChangeException
 ---

 Key: DRILL-1760
 URL: https://issues.apache.org/jira/browse/DRILL-1760
 Project: Apache Drill
  Issue Type: Improvement
  Components: Functions - Drill
Affects Versions: 1.0.0
Reporter: Hanifi Gunes
Assignee: Hanifi Gunes
 Fix For: 1.2.0


 Take yelp business dataset and run
 {code:sql}
 select count(attributes) from dfs.`/path/to/yelp-business.json`
 {code}
 you should read
 {code:java}
 org.apache.drill.exec.exception.SchemaChangeException: Failure while 
 materializing expression. 
 Error in expression at index -1.  Error: Missing function implementation: 
 [count(MAP-REQUIRED)].  Full expression: --UNKNOWN EXPRESSION--.
   at 
 org.apache.drill.exec.physical.impl.aggregate.StreamingAggBatch.createAggregatorInternal(StreamingAggBatch.java:221)
  [classes/:na]
   at 
 org.apache.drill.exec.physical.impl.aggregate.StreamingAggBatch.createAggregator(StreamingAggBatch.java:173)
  [classes/:na]
   at 
 org.apache.drill.exec.physical.impl.aggregate.StreamingAggBatch.buildSchema(StreamingAggBatch.java:89)
  [classes/:na]
   at 
 org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.buildSchema(IteratorValidatorBatchIterator.java:80)
  [classes/:na]
   at 
 org.apache.drill.exec.record.AbstractSingleRecordBatch.buildSchema(AbstractSingleRecordBatch.java:109)
  [classes/:na]
   at 
 org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.buildSchema(IteratorValidatorBatchIterator.java:80)
  [classes/:na]
   at 
 org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.buildSchema(RemovingRecordBatch.java:64)
  [classes/:na]
   at 
 org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.buildSchema(IteratorValidatorBatchIterator.java:80)
  [classes/:na]
   at 
 org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.buildSchema(ScreenCreator.java:95)
  [classes/:na]
   at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:111)
  [classes/:na]
   at 
 org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:249)
  [classes/:na]
   at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  [na:1.7.0_65]
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  [na:1.7.0_65]
   at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]
 {code}
 I would expect to be able run count query on `attributes` field given that I 
 can run a select on the same field.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3128) LENGTH(..., CAST(... AS VARCHAR(0) ) ) yields ClassCastException

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3128:

Component/s: Functions - Drill

 LENGTH(..., CAST(... AS VARCHAR(0) ) ) yields ClassCastException
 

 Key: DRILL-3128
 URL: https://issues.apache.org/jira/browse/DRILL-3128
 Project: Apache Drill
  Issue Type: Bug
  Components: Functions - Drill
Reporter: Daniel Barclay (Drill)
 Fix For: 1.2.0


 Trying to make a function call with a function name of {{LENGTH}}, with two 
 arguments, and with the second argument being a cast expression having a 
 target type of {{VARCHAR(0)}} yields a {{ClassCastException}} (at least for 
 several cases of source expression):
 {noformat}
 0: jdbc:drill:zk=local SELECT LENGTH(1, CAST('x' AS VARCHAR(0) ) ) FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.ClassCastException: 
 org.apache.drill.common.expression.CastExpression cannot be cast to 
 org.apache.drill.common.expression.ValueExpressions$QuotedString
 [Error Id: 1860730b-b69b-4400-bb2c-935a56aa456e on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT LENGTH(1, CAST(1 AS VARCHAR(0) ) ) FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.ClassCastException: 
 org.apache.drill.common.expression.CastExpression cannot be cast to 
 org.apache.drill.common.expression.ValueExpressions$QuotedString
 [Error Id: 476c4848-4b53-4c1e-9005-2bab3a2a91a4 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT LENGTH(1, CAST(NULL AS VARCHAR(0) ) ) FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.ClassCastException: 
 org.apache.drill.common.expression.TypedNullConstant cannot be cast to 
 org.apache.drill.common.expression.ValueExpressions$QuotedString
 [Error Id: d888a336-2b18-45d9-a5e8-f4c2406a292e on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}
 This case (not with {{VARCHAR(0)}}) also yields a {{ClassCastException}}:
 {noformat}
 0: jdbc:drill:zk=local SELECT LENGTH(1, CAST(1 AS VARCHAR(2) ) ) FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.ClassCastException: 
 org.apache.drill.common.expression.CastExpression cannot be cast to 
 org.apache.drill.common.expression.ValueExpressions$QuotedString
 [Error Id: 04bd6cb1-2dd7-4938-ab9b-4d460aaaf05f on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3128) LENGTH(..., CAST(... AS VARCHAR(0) ) ) yields ClassCastException

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3128:

Assignee: Daniel Barclay (Drill)

 LENGTH(..., CAST(... AS VARCHAR(0) ) ) yields ClassCastException
 

 Key: DRILL-3128
 URL: https://issues.apache.org/jira/browse/DRILL-3128
 Project: Apache Drill
  Issue Type: Bug
  Components: Functions - Drill
Reporter: Daniel Barclay (Drill)
Assignee: Daniel Barclay (Drill)
 Fix For: 1.2.0


 Trying to make a function call with a function name of {{LENGTH}}, with two 
 arguments, and with the second argument being a cast expression having a 
 target type of {{VARCHAR(0)}} yields a {{ClassCastException}} (at least for 
 several cases of source expression):
 {noformat}
 0: jdbc:drill:zk=local SELECT LENGTH(1, CAST('x' AS VARCHAR(0) ) ) FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.ClassCastException: 
 org.apache.drill.common.expression.CastExpression cannot be cast to 
 org.apache.drill.common.expression.ValueExpressions$QuotedString
 [Error Id: 1860730b-b69b-4400-bb2c-935a56aa456e on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT LENGTH(1, CAST(1 AS VARCHAR(0) ) ) FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.ClassCastException: 
 org.apache.drill.common.expression.CastExpression cannot be cast to 
 org.apache.drill.common.expression.ValueExpressions$QuotedString
 [Error Id: 476c4848-4b53-4c1e-9005-2bab3a2a91a4 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT LENGTH(1, CAST(NULL AS VARCHAR(0) ) ) FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.ClassCastException: 
 org.apache.drill.common.expression.TypedNullConstant cannot be cast to 
 org.apache.drill.common.expression.ValueExpressions$QuotedString
 [Error Id: d888a336-2b18-45d9-a5e8-f4c2406a292e on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}
 This case (not with {{VARCHAR(0)}}) also yields a {{ClassCastException}}:
 {noformat}
 0: jdbc:drill:zk=local SELECT LENGTH(1, CAST(1 AS VARCHAR(2) ) ) FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.ClassCastException: 
 org.apache.drill.common.expression.CastExpression cannot be cast to 
 org.apache.drill.common.expression.ValueExpressions$QuotedString
 [Error Id: 04bd6cb1-2dd7-4938-ab9b-4d460aaaf05f on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3127) LENGTH(..., '') yields StringIndexOutOfBoundsException

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3127:

Component/s: Execution - Data Types

 LENGTH(..., '') yields StringIndexOutOfBoundsException
 --

 Key: DRILL-3127
 URL: https://issues.apache.org/jira/browse/DRILL-3127
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Reporter: Daniel Barclay (Drill)

 Trying to make a function call with a function name of {{LENGTH}}, with two 
 arguments, and with the second argument being an empy string literal yields a 
 StringIndexOutOfBoundsException:
 {noformat}
 0: jdbc:drill:zk=local SELECT LENGTH('','') FROM INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.StringIndexOutOfBoundsException: String index 
 out of range: 1
 [Error Id: 5afea96b-c9cc-45be-866c-8cfaa3917796 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3128) LENGTH(..., CAST(... AS VARCHAR(0) ) ) yields ClassCastException

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3128:

Fix Version/s: 1.2.0

 LENGTH(..., CAST(... AS VARCHAR(0) ) ) yields ClassCastException
 

 Key: DRILL-3128
 URL: https://issues.apache.org/jira/browse/DRILL-3128
 Project: Apache Drill
  Issue Type: Bug
  Components: Functions - Drill
Reporter: Daniel Barclay (Drill)
Assignee: Daniel Barclay (Drill)
 Fix For: 1.2.0


 Trying to make a function call with a function name of {{LENGTH}}, with two 
 arguments, and with the second argument being a cast expression having a 
 target type of {{VARCHAR(0)}} yields a {{ClassCastException}} (at least for 
 several cases of source expression):
 {noformat}
 0: jdbc:drill:zk=local SELECT LENGTH(1, CAST('x' AS VARCHAR(0) ) ) FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.ClassCastException: 
 org.apache.drill.common.expression.CastExpression cannot be cast to 
 org.apache.drill.common.expression.ValueExpressions$QuotedString
 [Error Id: 1860730b-b69b-4400-bb2c-935a56aa456e on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT LENGTH(1, CAST(1 AS VARCHAR(0) ) ) FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.ClassCastException: 
 org.apache.drill.common.expression.CastExpression cannot be cast to 
 org.apache.drill.common.expression.ValueExpressions$QuotedString
 [Error Id: 476c4848-4b53-4c1e-9005-2bab3a2a91a4 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT LENGTH(1, CAST(NULL AS VARCHAR(0) ) ) FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.ClassCastException: 
 org.apache.drill.common.expression.TypedNullConstant cannot be cast to 
 org.apache.drill.common.expression.ValueExpressions$QuotedString
 [Error Id: d888a336-2b18-45d9-a5e8-f4c2406a292e on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}
 This case (not with {{VARCHAR(0)}}) also yields a {{ClassCastException}}:
 {noformat}
 0: jdbc:drill:zk=local SELECT LENGTH(1, CAST(1 AS VARCHAR(2) ) ) FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.ClassCastException: 
 org.apache.drill.common.expression.CastExpression cannot be cast to 
 org.apache.drill.common.expression.ValueExpressions$QuotedString
 [Error Id: 04bd6cb1-2dd7-4938-ab9b-4d460aaaf05f on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3135) Indexing non-arrays yields AssertionError

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3135:

Priority: Minor  (was: Major)

 Indexing non-arrays yields AssertionError
 -

 Key: DRILL-3135
 URL: https://issues.apache.org/jira/browse/DRILL-3135
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Reporter: Daniel Barclay (Drill)
Assignee: Daniel Barclay (Drill)
Priority: Minor
 Fix For: 1.2.0


 Trying to index into a non-array yields an AssertionError (with no error 
 message other than a type name) rather that a message referring to the 
 problem (e.g., that an array indexing operation was applied to an expression 
 whose type turned out to be a non-array type):
 {noformat}
 0: jdbc:drill:zk=local SELECT catalog_name[1] FROM  
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.AssertionError: VARCHAR
 [Error Id: e6d65be4-c5cd-4b89-8d6c-a332ac578d23 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT '123'[1] FROM  INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.AssertionError: CHAR
 [Error Id: 8c5a10e7-34f7-427e-98be-22c13c39b0cc on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT CAST('123' as INTEGER)[1] FROM  
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.AssertionError: INTEGER
 [Error Id: b63a518f-0071-4c66-b051-fb54c724c090 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3068) Query fails and creates profile .drill file with size 0

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3068?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3068:

Assignee: Jason Altekruse

 Query fails and creates profile .drill file with size 0
 ---

 Key: DRILL-3068
 URL: https://issues.apache.org/jira/browse/DRILL-3068
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - HTTP
Reporter: Victoria Markman
Assignee: Jason Altekruse
 Fix For: 1.2.0


 This causes WebUI to fail with:
 HTTP ERROR 500
 Problem accessing /profiles. Reason:
 Request failed.
 Reproduction for profile with size 0 is in drill-3067



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3068) Query fails and creates profile .drill file with size 0

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3068?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3068:

Component/s: Client - HTTP

 Query fails and creates profile .drill file with size 0
 ---

 Key: DRILL-3068
 URL: https://issues.apache.org/jira/browse/DRILL-3068
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - HTTP
Reporter: Victoria Markman
 Fix For: 1.2.0


 This causes WebUI to fail with:
 HTTP ERROR 500
 Problem accessing /profiles. Reason:
 Request failed.
 Reproduction for profile with size 0 is in drill-3067



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3068) Query fails and creates profile .drill file with size 0

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3068?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3068:

Fix Version/s: 1.2.0

 Query fails and creates profile .drill file with size 0
 ---

 Key: DRILL-3068
 URL: https://issues.apache.org/jira/browse/DRILL-3068
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - HTTP
Reporter: Victoria Markman
 Fix For: 1.2.0


 This causes WebUI to fail with:
 HTTP ERROR 500
 Problem accessing /profiles. Reason:
 Request failed.
 Reproduction for profile with size 0 is in drill-3067



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3160) Make JDBC Javadoc documentation available to users

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3160:

Fix Version/s: 1.3.0

 Make JDBC Javadoc documentation available to users
 --

 Key: DRILL-3160
 URL: https://issues.apache.org/jira/browse/DRILL-3160
 Project: Apache Drill
  Issue Type: Bug
  Components: Tools, Build  Test
Reporter: Daniel Barclay (Drill)
 Fix For: 1.3.0


 The existing Javadoc documentation (source) for Drill JDBC classes/interfaces 
 such as org.apache.drill.jdbc.Driver and org.apache.drill.jdbc.DrillResultSet 
 is not generated into documentation pages and packaged for users by the 
 current Maven build scripts.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3141) sqlline throws an exception when query is cancelled

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3141:

Component/s: Client - CLI

 sqlline throws an exception when query is cancelled
 ---

 Key: DRILL-3141
 URL: https://issues.apache.org/jira/browse/DRILL-3141
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - CLI
Affects Versions: 1.0.0
Reporter: Victoria Markman

 I cancelled query and got a sqlline exception. Was able to reproduce it only 
 twice. Don't have a reliable reproduction.
 {code}
 0: jdbc:drill:schema=dfs select * from web_sales ws, web_returns wr where 
 ws.ws_customer_sk = wr.wr_customer_sk limit 1;
 java.lang.RuntimeException: java.sql.SQLException: Unexpected 
 RuntimeException: java.util.ConcurrentModificationException
 at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73)
 at 
 sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:92)
 at sqlline.TableOutputFormat.print(TableOutputFormat.java:127)
 at sqlline.SqlLine.print(SqlLine.java:1583)
 at sqlline.Commands.execute(Commands.java:852)
 at sqlline.Commands.sql(Commands.java:751)
 at sqlline.SqlLine.dispatch(SqlLine.java:738)
 at sqlline.SqlLine.begin(SqlLine.java:612)
 at sqlline.SqlLine.start(SqlLine.java:366)
 at sqlline.SqlLine.main(SqlLine.java:259)
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3160) Make JDBC Javadoc documentation available to users

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3160:

Assignee: Steven Phillips

 Make JDBC Javadoc documentation available to users
 --

 Key: DRILL-3160
 URL: https://issues.apache.org/jira/browse/DRILL-3160
 Project: Apache Drill
  Issue Type: Bug
  Components: Tools, Build  Test
Reporter: Daniel Barclay (Drill)
Assignee: Steven Phillips
 Fix For: 1.3.0


 The existing Javadoc documentation (source) for Drill JDBC classes/interfaces 
 such as org.apache.drill.jdbc.Driver and org.apache.drill.jdbc.DrillResultSet 
 is not generated into documentation pages and packaged for users by the 
 current Maven build scripts.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3160) Make JDBC Javadoc documentation available to users

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3160:

Component/s: Tools, Build  Test

 Make JDBC Javadoc documentation available to users
 --

 Key: DRILL-3160
 URL: https://issues.apache.org/jira/browse/DRILL-3160
 Project: Apache Drill
  Issue Type: Bug
  Components: Tools, Build  Test
Reporter: Daniel Barclay (Drill)
 Fix For: 1.3.0


 The existing Javadoc documentation (source) for Drill JDBC classes/interfaces 
 such as org.apache.drill.jdbc.Driver and org.apache.drill.jdbc.DrillResultSet 
 is not generated into documentation pages and packaged for users by the 
 current Maven build scripts.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3135) Indexing non-arrays yields AssertionError

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3135:

Component/s: Execution - Data Types

 Indexing non-arrays yields AssertionError
 -

 Key: DRILL-3135
 URL: https://issues.apache.org/jira/browse/DRILL-3135
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Reporter: Daniel Barclay (Drill)

 Trying to index into a non-array yields an AssertionError (with no error 
 message other than a type name) rather that a message referring to the 
 problem (e.g., that an array indexing operation was applied to an expression 
 whose type turned out to be a non-array type):
 {noformat}
 0: jdbc:drill:zk=local SELECT catalog_name[1] FROM  
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.AssertionError: VARCHAR
 [Error Id: e6d65be4-c5cd-4b89-8d6c-a332ac578d23 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT '123'[1] FROM  INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.AssertionError: CHAR
 [Error Id: 8c5a10e7-34f7-427e-98be-22c13c39b0cc on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT CAST('123' as INTEGER)[1] FROM  
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.AssertionError: INTEGER
 [Error Id: b63a518f-0071-4c66-b051-fb54c724c090 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3126) SELECT `VARCHAR`('x') yields internal (SYSTEM ERROR) error

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3126:

Priority: Minor  (was: Major)

 SELECT `VARCHAR`('x')  yields internal (SYSTEM ERROR) error
 ---

 Key: DRILL-3126
 URL: https://issues.apache.org/jira/browse/DRILL-3126
 Project: Apache Drill
  Issue Type: Bug
  Components: Functions - Drill
Reporter: Daniel Barclay (Drill)
Priority: Minor

 Trying to call an unknown function usually results in an error message like 
 that in the following:
 {noformat}
 0: jdbc:drill:zk=local SELECT NoSuchFunction('x') FROM 
 INFORMATION_SCHEMA.CATALOGS;
 May 17, 2015 9:15:13 PM org.apache.calcite.sql.validate.SqlValidatorException 
 init
 SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: No match found 
 for function signature NoSuchFunction(CHARACTER)
 May 17, 2015 9:15:13 PM org.apache.calcite.runtime.CalciteException init
 SEVERE: org.apache.calcite.runtime.CalciteContextException: From line 1, 
 column 8 to line 1, column 26: No match found for function signature 
 NoSuchFunction(CHARACTER)
 Error: PARSE ERROR: From line 1, column 8 to line 1, column 26: No match 
 found for function signature NoSuchFunction(CHARACTER)
 {noformat}
 However, trying to use a data type name in such a function call yields an 
 internal error:
 {noformat}
 [Error Id: 0439d30c-8cdb-4eda-a253-17bf5afc468b on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT `VARCHAR`('x') FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException: 
 Failure while trying to materialize incoming schema.  Errors:
  
 Error in expression at index -1.  Error: Missing function implementation: 
 [varchar(VARCHAR-REQUIRED)].  Full expression: --UNKNOWN EXPRESSION--..
 Fragment 0:0
 [Error Id: 3f20c811-a81f-41ad-9dc7-362456754eaf on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-1961) Field definition should match the structure of ValueVector

2015-07-01 Thread Hanifi Gunes (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-1961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hanifi Gunes updated DRILL-1961:

Fix Version/s: (was: 1.2.0)
   Future

 Field definition should match the structure of ValueVector
 --

 Key: DRILL-1961
 URL: https://issues.apache.org/jira/browse/DRILL-1961
 Project: Apache Drill
  Issue Type: Improvement
  Components: Execution - Data Types
Reporter: Hanifi Gunes
Assignee: Hanifi Gunes
Priority: Minor
 Fix For: Future


 Drill relies on container vectors to represent nested data types. In this 
 case, materialized field def'n should capture the state of the container 
 vector. Drill should either enforce synchrony between a MaterializedField and 
 its owning ValueVector or avoid using MaterializedField as ValueVectors 
 already represent a hierarchy of vectors which makes use of MaterializedField 
 redundant.
 An instance for this case would be TestFastComplexSchema#test3.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-1785) Infer operator return type from function templates

2015-07-01 Thread Hanifi Gunes (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-1785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hanifi Gunes updated DRILL-1785:

Component/s: Query Planning  Optimization

 Infer operator return type from function templates
 --

 Key: DRILL-1785
 URL: https://issues.apache.org/jira/browse/DRILL-1785
 Project: Apache Drill
  Issue Type: Improvement
  Components: Functions - Drill, Query Planning  Optimization
Reporter: Hanifi Gunes
Assignee: Hanifi Gunes
Priority: Minor
 Fix For: 1.2.0






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3127) LENGTH(..., '') yields StringIndexOutOfBoundsException

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3127:

Fix Version/s: 1.2.0

 LENGTH(..., '') yields StringIndexOutOfBoundsException
 --

 Key: DRILL-3127
 URL: https://issues.apache.org/jira/browse/DRILL-3127
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Reporter: Daniel Barclay (Drill)
 Fix For: 1.2.0


 Trying to make a function call with a function name of {{LENGTH}}, with two 
 arguments, and with the second argument being an empy string literal yields a 
 StringIndexOutOfBoundsException:
 {noformat}
 0: jdbc:drill:zk=local SELECT LENGTH('','') FROM INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.StringIndexOutOfBoundsException: String index 
 out of range: 1
 [Error Id: 5afea96b-c9cc-45be-866c-8cfaa3917796 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DRILL-3444) Implement Is Not Null/Is Null on List of objects - [isnotnull(MAP-REPEATED)] error

2015-07-01 Thread Ted Dunning (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14611048#comment-14611048
 ] 

Ted Dunning commented on DRILL-3444:



I talked to Tug about this today and we walked through the code looking at how 
to fix this.

The key lack is a missing IsNull operator.  Tug started in trying to figure out 
how to write such an operator.  Right now we have a bunch of template generated 
operators for all of the specific scalar types and also the uniform list types. 
 What we don't have is a null operator for general lists.

Can somebody point at how such an operator ought to be implemented?  



 Implement Is Not Null/Is Null on List of objects -  [isnotnull(MAP-REPEATED)] 
 error
 ---

 Key: DRILL-3444
 URL: https://issues.apache.org/jira/browse/DRILL-3444
 Project: Apache Drill
  Issue Type: Improvement
  Components: Execution - Data Types, Functions - Drill
 Environment: Drill 1.0
Reporter: Tugdual Grall
Assignee: Daniel Barclay (Drill)
Priority: Critical

 It is not possble to use the IS NULL / IS NOT NULL operator on an attribuite 
 that contains a list of object. (it is working with a list of scalar types)
 Query:
 {code}
 select *
 from dfs.`/working/json_array/*.json` p
 where p.tags IS NOT NULL
 {code}
 Document:
 {code}
 {
   name : PPRODUCT_002,
   price : 200.00,
   tags : [ { type : sports } , { type : ocean }]
 }
 {code}
 Error:
 {code}
 org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: 
 org.apache.drill.exec.exception.SchemaChangeException: Failure while trying 
 to materialize incoming schema. Errors: Error in expression at index -1. 
 Error: Missing function implementation: [isnotnull(MAP-REPEATED)]. Full 
 expression: --UNKNOWN EXPRESSION--.. Fragment 0:0 [Error Id: 
 384e6b86-ce17-4eb9-b5eb-27870a341c90 on 192.168.99.13:31010]
 {code}
 Workaround:
 By using a sub element it is working, for example:
 {code}
 select *
 from dfs.`/Users/tgrall/working/json_array/*.json` p
 where p.tags.type IS NULL
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3127) LENGTH(..., '') yields StringIndexOutOfBoundsException

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3127:

Assignee: Daniel Barclay (Drill)

 LENGTH(..., '') yields StringIndexOutOfBoundsException
 --

 Key: DRILL-3127
 URL: https://issues.apache.org/jira/browse/DRILL-3127
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Reporter: Daniel Barclay (Drill)
Assignee: Daniel Barclay (Drill)
 Fix For: 1.2.0


 Trying to make a function call with a function name of {{LENGTH}}, with two 
 arguments, and with the second argument being an empy string literal yields a 
 StringIndexOutOfBoundsException:
 {noformat}
 0: jdbc:drill:zk=local SELECT LENGTH('','') FROM INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.StringIndexOutOfBoundsException: String index 
 out of range: 1
 [Error Id: 5afea96b-c9cc-45be-866c-8cfaa3917796 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3067) Index out of bounds exception when in list contains exceeds 20 items and one of the items is a numeric expression

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3067?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3067:

Assignee: Chris Westin

 Index out of bounds exception when in list contains exceeds 20 items and 
 one of the items is a numeric expression
 ---

 Key: DRILL-3067
 URL: https://issues.apache.org/jira/browse/DRILL-3067
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Relational Operators
Affects Versions: 1.0.0
Reporter: Victoria Markman
Assignee: Chris Westin
 Fix For: 1.2.0

 Attachments: in_list_integer.sql


 Index out of bounds exception when in list contains 10,000 integer values
 Failing query looks like this: select count(*) from t1 where a1 in (7680 
 integer values)
 drillbit.log
 {code}
 org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: 
 java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
 Fragment 0:0
 [Error Id: 89dd9d30-ff0b-4513-bd79-624d63efb5f0 on atsqa4-133.qa.lab:31010]
 at 
 org.apache.drill.exec.work.foreman.QueryManager$1.statusUpdate(QueryManager.java:481)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.QueryManager$RootStatusReporter.statusChange(QueryManager.java:461)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.AbstractStatusReporter.fail(AbstractStatusReporter.java:90)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.AbstractStatusReporter.fail(AbstractStatusReporter.java:86)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.sendFinalState(FragmentExecutor.java:291)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:255)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
  [drill-common-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  [na:1.7.0_71]
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  [na:1.7.0_71]
 at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
 2015-05-13 22:22:26,153 [2aac315d-a333-fa7d-3534-94912b01e07d:frag:0:0] INFO  
 o.a.d.e.w.fragment.FragmentExecutor - 
 2aac315d-a333-fa7d-3534-94912b01e07d:0:0: State change requested from FAILED 
 -- CANCELLATION_REQUESTED for
 2015-05-13 22:22:26,153 [2aac315d-a333-fa7d-3534-94912b01e07d:frag:0:0] WARN  
 o.a.d.e.w.fragment.FragmentExecutor - Ignoring unexpected state transition 
 FAILED = CANCELLATION_REQUESTED.
 2015-05-13 22:22:26,153 [2aac315d-a333-fa7d-3534-94912b01e07d:frag:0:0] INFO  
 o.a.drill.exec.work.foreman.Foreman - foreman cleaning up.
 2015-05-13 22:22:26,161 [2aac315d-a333-fa7d-3534-94912b01e07d:frag:0:0] ERROR 
 o.a.d.exec.work.foreman.QueryManager - Failure while storing Query Profile
 java.lang.RuntimeException: java.io.IOException: 
 java.lang.InterruptedException
 at 
 org.apache.drill.exec.store.sys.local.FilePStore.put(FilePStore.java:148) 
 ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.QueryManager.writeFinalProfile(QueryManager.java:307)
  ~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman$ForemanResult.close(Foreman.java:743)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:838)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:780)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.common.EventProcessor.sendEvent(EventProcessor.java:73) 
 [drill-common-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman$StateSwitch.moveToState(Foreman.java:782)
  [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman.moveToState(Foreman.java:891) 
 [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 org.apache.drill.exec.work.foreman.Foreman.access$2700(Foreman.java:107) 
 [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
 at 
 

[jira] [Updated] (DRILL-3055) Query IDs are logged inconsistently (hex UUID vs. two-decimal-integers form)

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3055:

Component/s: Execution - Flow

 Query IDs are logged inconsistently (hex UUID vs. two-decimal-integers form)
 

 Key: DRILL-3055
 URL: https://issues.apache.org/jira/browse/DRILL-3055
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Flow
Reporter: Daniel Barclay (Drill)
Priority: Minor
 Fix For: 1.2.0


 In logs (and possibly error messages?), query IDs seem to be logged in at 
 least two different formats, the (lowercase) hex UUID format, as in:
 {noformat}
 Cancelling query 2aac76fa-8d1c-f1a5-a5e9-124ea8ee15e2
 {noformat}
 and one or more formats with two signed decimal values, as in:
 {noformat}
   Received query ID: part1: 3074963467172864782
   part2: 7984767231918607914
   .
 {noformat}
 This inconsistency makes it hard to recognize when two references in 
 different formats represent the same query ID.
 (Additionally, the above decimal format's line breaks sometime mess up 
 higher-level formatting.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3055) Query IDs are logged inconsistently (hex UUID vs. two-decimal-integers form)

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3055:

Priority: Minor  (was: Major)

 Query IDs are logged inconsistently (hex UUID vs. two-decimal-integers form)
 

 Key: DRILL-3055
 URL: https://issues.apache.org/jira/browse/DRILL-3055
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Flow
Reporter: Daniel Barclay (Drill)
Priority: Minor
 Fix For: 1.2.0


 In logs (and possibly error messages?), query IDs seem to be logged in at 
 least two different formats, the (lowercase) hex UUID format, as in:
 {noformat}
 Cancelling query 2aac76fa-8d1c-f1a5-a5e9-124ea8ee15e2
 {noformat}
 and one or more formats with two signed decimal values, as in:
 {noformat}
   Received query ID: part1: 3074963467172864782
   part2: 7984767231918607914
   .
 {noformat}
 This inconsistency makes it hard to recognize when two references in 
 different formats represent the same query ID.
 (Additionally, the above decimal format's line breaks sometime mess up 
 higher-level formatting.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3168) Char overflow in LimitRecordBatch

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3168:

Component/s: Execution - Relational Operators

 Char overflow in LimitRecordBatch 
 --

 Key: DRILL-3168
 URL: https://issues.apache.org/jira/browse/DRILL-3168
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Relational Operators
Affects Versions: 0.9.0
Reporter: 徐波
 Fix For: 1.2.0


 The variable named 'i' in 'limitWithNoSV' may overflow when fetch - offset  
 Character.MAX_VALUE - offset. eg. offset=0, fetch=65536. 
 Code in limitWithNoSV:
 int svIndex = 0;
 for(char i = (char) offset; i  fetch; i++) {
   outgoingSv.setIndex(svIndex, i);
   svIndex++;
 }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3168) Char overflow in LimitRecordBatch

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3168:

Assignee: Chris Westin

 Char overflow in LimitRecordBatch 
 --

 Key: DRILL-3168
 URL: https://issues.apache.org/jira/browse/DRILL-3168
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Relational Operators
Affects Versions: 0.9.0
Reporter: 徐波
Assignee: Chris Westin
 Fix For: 1.2.0


 The variable named 'i' in 'limitWithNoSV' may overflow when fetch - offset  
 Character.MAX_VALUE - offset. eg. offset=0, fetch=65536. 
 Code in limitWithNoSV:
 int svIndex = 0;
 for(char i = (char) offset; i  fetch; i++) {
   outgoingSv.setIndex(svIndex, i);
   svIndex++;
 }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3168) Char overflow in LimitRecordBatch

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3168:

Fix Version/s: 1.2.0

 Char overflow in LimitRecordBatch 
 --

 Key: DRILL-3168
 URL: https://issues.apache.org/jira/browse/DRILL-3168
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Relational Operators
Affects Versions: 0.9.0
Reporter: 徐波
Assignee: Chris Westin
 Fix For: 1.2.0


 The variable named 'i' in 'limitWithNoSV' may overflow when fetch - offset  
 Character.MAX_VALUE - offset. eg. offset=0, fetch=65536. 
 Code in limitWithNoSV:
 int svIndex = 0;
 for(char i = (char) offset; i  fetch; i++) {
   outgoingSv.setIndex(svIndex, i);
   svIndex++;
 }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DRILL-3136) Binary string literal spaces rejected

2015-07-01 Thread Chris Westin (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14611039#comment-14611039
 ] 

Chris Westin commented on DRILL-3136:
-

Does this only happen from the sqlline CLI, or does the API also reject these?

 Binary string literal spaces rejected
 -

 Key: DRILL-3136
 URL: https://issues.apache.org/jira/browse/DRILL-3136
 Project: Apache Drill
  Issue Type: Bug
Reporter: Daniel Barclay (Drill)

 Spaces allowed by standard SQL's grammar in binary string literals are 
 rejected:
 {noformat}
 0: jdbc:drill:zk=local SELECT X'0F 0F' FROM INFORMATION_SCHEMA.CATALOGS;
 May 18, 2015 12:55:21 PM 
 org.apache.calcite.sql.validate.SqlValidatorException init
 SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: Binary literal 
 string must contain only characters '0' - '9', 'A' - 'F'
 May 18, 2015 12:55:21 PM org.apache.calcite.runtime.CalciteException init
 SEVERE: org.apache.calcite.runtime.CalciteContextException: From line 1, 
 column 8 to line 1, column 15: Binary literal string must contain only 
 characters '0' - '9', 'A' - 'F'
 Error: PARSE ERROR: Binary literal string must contain only characters '0' - 
 '9', 'A' - 'F'
 [Error Id: 5e09f9b2-2029-4d83-9b3e-048ac5fdcad1 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}
 ISO-8075:2011 Part 2's section 5.3 (literal) says:
 {noformat}
 binary string literal ::=
   X quote [ space... ] [ { hexit [ space... ] hexit [ space... ] 
 }... ] quote
   [ { separator quote [ space... ] [ { hexit [ space... ]
   hexit [ space... ] }... ] quote }... ]
 hexit ::=
 digit | A | B | C | D | E | F | a | b | c | d | e | f
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2156) Create an abstraction for composite value vectors

2015-07-01 Thread Hanifi Gunes (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hanifi Gunes updated DRILL-2156:

Fix Version/s: (was: 1.2.0)
   Future

 Create an abstraction for composite value vectors
 -

 Key: DRILL-2156
 URL: https://issues.apache.org/jira/browse/DRILL-2156
 Project: Apache Drill
  Issue Type: Sub-task
  Components: Execution - Data Types
Reporter: Hanifi Gunes
Assignee: Hanifi Gunes
 Fix For: Future


 Composite value vectors are those that has parent child hierarchy. This 
 definition currently relates to any map vector Drill relies on. Currently 
 there is no base abstraction made for composite types. 
 This sub task is about designing a clean API for composite vector types.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-1768) Add multi-type support for numeric types in complex writer. (invisible up-promotion)

2015-07-01 Thread Hanifi Gunes (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-1768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hanifi Gunes updated DRILL-1768:

Fix Version/s: (was: 1.2.0)
   Future

 Add multi-type support for numeric types in complex writer. (invisible 
 up-promotion)
 

 Key: DRILL-1768
 URL: https://issues.apache.org/jira/browse/DRILL-1768
 Project: Apache Drill
  Issue Type: Improvement
  Components: Execution - Data Types
Reporter: Rahul Challapalli
Assignee: Hanifi Gunes
 Fix For: Future

 Attachments: error.log


 git.commit.id.abbrev=108d29f
 Dataset :
 {code}
 {
 id:1,
 val:1.1
 }
 {
 id:2,
 val:0
 }
 {code}
 Query :
 {code}
 select * from `temp.json`;
 Query failed: Failure while running fragment.[ 
 42bfb6bb-c09e-4eb3-a9ee-442d369c1b4b on qa-node190.qa.lab:31010 ]
 A '0' in a decimal field results in a schema change sort of error
 Error: exception while executing query: Failure while executing query. 
 (state=,code=0)
 {code}
 Attached the log file. Let me know if there are any questions



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3135) Indexing non-arrays yields AssertionError

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3135:

Assignee: Daniel Barclay (Drill)

 Indexing non-arrays yields AssertionError
 -

 Key: DRILL-3135
 URL: https://issues.apache.org/jira/browse/DRILL-3135
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Reporter: Daniel Barclay (Drill)
Assignee: Daniel Barclay (Drill)
 Fix For: 1.2.0


 Trying to index into a non-array yields an AssertionError (with no error 
 message other than a type name) rather that a message referring to the 
 problem (e.g., that an array indexing operation was applied to an expression 
 whose type turned out to be a non-array type):
 {noformat}
 0: jdbc:drill:zk=local SELECT catalog_name[1] FROM  
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.AssertionError: VARCHAR
 [Error Id: e6d65be4-c5cd-4b89-8d6c-a332ac578d23 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT '123'[1] FROM  INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.AssertionError: CHAR
 [Error Id: 8c5a10e7-34f7-427e-98be-22c13c39b0cc on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT CAST('123' as INTEGER)[1] FROM  
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.AssertionError: INTEGER
 [Error Id: b63a518f-0071-4c66-b051-fb54c724c090 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3135) Indexing non-arrays yields AssertionError

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3135:

Fix Version/s: 1.2.0

 Indexing non-arrays yields AssertionError
 -

 Key: DRILL-3135
 URL: https://issues.apache.org/jira/browse/DRILL-3135
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Reporter: Daniel Barclay (Drill)
Assignee: Daniel Barclay (Drill)
 Fix For: 1.2.0


 Trying to index into a non-array yields an AssertionError (with no error 
 message other than a type name) rather that a message referring to the 
 problem (e.g., that an array indexing operation was applied to an expression 
 whose type turned out to be a non-array type):
 {noformat}
 0: jdbc:drill:zk=local SELECT catalog_name[1] FROM  
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.AssertionError: VARCHAR
 [Error Id: e6d65be4-c5cd-4b89-8d6c-a332ac578d23 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT '123'[1] FROM  INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.AssertionError: CHAR
 [Error Id: 8c5a10e7-34f7-427e-98be-22c13c39b0cc on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT CAST('123' as INTEGER)[1] FROM  
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: java.lang.AssertionError: INTEGER
 [Error Id: b63a518f-0071-4c66-b051-fb54c724c090 on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-2147) ValueVector design refactoring umbrella

2015-07-01 Thread Hanifi Gunes (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-2147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hanifi Gunes updated DRILL-2147:

Fix Version/s: (was: 1.2.0)
   Future

 ValueVector design refactoring umbrella
 ---

 Key: DRILL-2147
 URL: https://issues.apache.org/jira/browse/DRILL-2147
 Project: Apache Drill
  Issue Type: Improvement
  Components: Execution - Data Types
Reporter: Hanifi Gunes
Assignee: Hanifi Gunes
 Fix For: Future


 The overall design of value vectors has become unclear and inconsistent with 
 additions from multiple contributors over the time. Also we need proper 
 documentation for the abstractions made for consistently communicating with 
 developers. 
 There are many instances that indicate possible design issues.
 For instance, ValueVector implements IteratorValueVector. This seems to 
 assume all vectors are somewhat hierarchical. This does not truly capture 
 scalar vectors as they have no child.
 Similarly, RepeatedVector has the following interface definition:
 {code:title=RepeatedVector}
 interface RepeatedVector {
   RepeatedFixedWidthVector.RepeatedAccessor getAccessor()
 }
 {code}
 Yet, RepeatedFixedWidthVector implements RepeatedVector as follows
 {code:title=RepeatedFixedWidthVector}
 interface RepeatedFixedWidthVector extends ValueVector, RepeatedVector {
   interface RepeatedAccessor extends Accessor {...}
   interface RepeatedMutator extends Mutator {...}
 }
 {code}
 A super-type that is aware of its sub-type hints a need for re-design.
 Examples could be multiplied here: some method names are not self-explaining 
 or wrongly named or seems to be misplaced. There are couple of more places 
 where design is not capturing the nature of vectors such like missing 
 abstractions for Repeated vs Composite vectors. We should consider a design 
 refactoring.
 This is an umbrella issue for tracking ValueVector design refactoring.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3126) SELECT `VARCHAR`('x') yields internal (SYSTEM ERROR) error

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3126:

Fix Version/s: 1.3.0

 SELECT `VARCHAR`('x')  yields internal (SYSTEM ERROR) error
 ---

 Key: DRILL-3126
 URL: https://issues.apache.org/jira/browse/DRILL-3126
 Project: Apache Drill
  Issue Type: Bug
  Components: Functions - Drill
Reporter: Daniel Barclay (Drill)
Assignee: Daniel Barclay (Drill)
Priority: Minor
 Fix For: 1.3.0


 Trying to call an unknown function usually results in an error message like 
 that in the following:
 {noformat}
 0: jdbc:drill:zk=local SELECT NoSuchFunction('x') FROM 
 INFORMATION_SCHEMA.CATALOGS;
 May 17, 2015 9:15:13 PM org.apache.calcite.sql.validate.SqlValidatorException 
 init
 SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: No match found 
 for function signature NoSuchFunction(CHARACTER)
 May 17, 2015 9:15:13 PM org.apache.calcite.runtime.CalciteException init
 SEVERE: org.apache.calcite.runtime.CalciteContextException: From line 1, 
 column 8 to line 1, column 26: No match found for function signature 
 NoSuchFunction(CHARACTER)
 Error: PARSE ERROR: From line 1, column 8 to line 1, column 26: No match 
 found for function signature NoSuchFunction(CHARACTER)
 {noformat}
 However, trying to use a data type name in such a function call yields an 
 internal error:
 {noformat}
 [Error Id: 0439d30c-8cdb-4eda-a253-17bf5afc468b on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local SELECT `VARCHAR`('x') FROM 
 INFORMATION_SCHEMA.CATALOGS;
 Error: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException: 
 Failure while trying to materialize incoming schema.  Errors:
  
 Error in expression at index -1.  Error: Missing function implementation: 
 [varchar(VARCHAR-REQUIRED)].  Full expression: --UNKNOWN EXPRESSION--..
 Fragment 0:0
 [Error Id: 3f20c811-a81f-41ad-9dc7-362456754eaf on dev-linux2:31010] 
 (state=,code=0)
 0: jdbc:drill:zk=local 
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3082) Safeguards against dropping rows in StreamingAggBatch

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3082:

Fix Version/s: 1.2.0

 Safeguards against dropping rows in StreamingAggBatch
 -

 Key: DRILL-3082
 URL: https://issues.apache.org/jira/browse/DRILL-3082
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Relational Operators
Reporter: Mehant Baid
 Fix For: 1.2.0


 As I was debugging DRILL-3069, Steven mentioned he had a patch to safeguard 
 against dropping rows in StreamingAggBatch.  It might be useful to get this 
 patch as it would cause asserts in such scenarios.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3082) Safeguards against dropping rows in StreamingAggBatch

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3082:

Component/s: Execution - Relational Operators

 Safeguards against dropping rows in StreamingAggBatch
 -

 Key: DRILL-3082
 URL: https://issues.apache.org/jira/browse/DRILL-3082
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Relational Operators
Reporter: Mehant Baid
 Fix For: 1.2.0


 As I was debugging DRILL-3069, Steven mentioned he had a patch to safeguard 
 against dropping rows in StreamingAggBatch.  It might be useful to get this 
 patch as it would cause asserts in such scenarios.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3244) Start unit precision getting into fractional seconds precision in View.FieldType serialization

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3244:

Assignee: Daniel Barclay (Drill)

 Start unit precision getting into fractional seconds precision in 
 View.FieldType serialization 
 ---

 Key: DRILL-3244
 URL: https://issues.apache.org/jira/browse/DRILL-3244
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Reporter: Daniel Barclay (Drill)
Assignee: Daniel Barclay (Drill)
Priority: Minor
 Fix For: 1.2.0


 For INTERVAL SECOND(n, m), the fractional seconds precision m gets 
 overwritten by the leading unit precision when a View.Field gets serialized 
 and then deserialized.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3244) Start unit precision getting into fractional seconds precision in View.FieldType serialization

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3244:

Component/s: Execution - Data Types

 Start unit precision getting into fractional seconds precision in 
 View.FieldType serialization 
 ---

 Key: DRILL-3244
 URL: https://issues.apache.org/jira/browse/DRILL-3244
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Reporter: Daniel Barclay (Drill)
 Fix For: 1.2.0


 For INTERVAL SECOND(n, m), the fractional seconds precision m gets 
 overwritten by the leading unit precision when a View.Field gets serialized 
 and then deserialized.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3244) Start unit precision getting into fractional seconds precision in View.FieldType serialization

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3244:

Priority: Minor  (was: Major)

 Start unit precision getting into fractional seconds precision in 
 View.FieldType serialization 
 ---

 Key: DRILL-3244
 URL: https://issues.apache.org/jira/browse/DRILL-3244
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Reporter: Daniel Barclay (Drill)
Priority: Minor
 Fix For: 1.2.0


 For INTERVAL SECOND(n, m), the fractional seconds precision m gets 
 overwritten by the leading unit precision when a View.Field gets serialized 
 and then deserialized.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-3244) Start unit precision getting into fractional seconds precision in View.FieldType serialization

2015-07-01 Thread Chris Westin (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-3244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Westin updated DRILL-3244:

Fix Version/s: 1.2.0

 Start unit precision getting into fractional seconds precision in 
 View.FieldType serialization 
 ---

 Key: DRILL-3244
 URL: https://issues.apache.org/jira/browse/DRILL-3244
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Reporter: Daniel Barclay (Drill)
 Fix For: 1.2.0


 For INTERVAL SECOND(n, m), the fractional seconds precision m gets 
 overwritten by the leading unit precision when a View.Field gets serialized 
 and then deserialized.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (DRILL-3435) Some reserved-keywords require table aliasing

2015-07-01 Thread Kristine Hahn (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-3435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14610613#comment-14610613
 ] 

Kristine Hahn edited comment on DRILL-3435 at 7/1/15 4:56 PM:
--

Here's one way to resolve this ticket: 
https://drill.apache.org/docs/from-clause/ 
The alias parameter description that says In other table references, aliases 
are optional. We change this to say that aliases might be required for 
querying nested JSON, link to 
https://drill.apache.org/docs/json-data-model/#analyzing-json, and to resolve 
ambiguous references such as using the name 'user' to query the Drill profiles. 
'user' is recognized as a function in this case, and the query fails. If you 
use a table alias, 'user' is recognized as a column reference, and the query 
succeeds.


was (Author: krishahn):
Using a table alias to query nested fields is mentioned a number of times in 
the docs. 
* 
https://drill.apache.org/docs/troubleshooting/#access-nested-fields-without-table-name/alias
* https://drill.apache.org/docs/json-data-model/#analyzing-json
* https://drill.apache.org/docs/selecting-multiple-columns-within-nested-data/
* https://drill.apache.org/docs/from-clause/ (The alias parameter description 
that says In other table references, aliases are optional needs to be changed 
to say that aliases might be required, and then maybe link to 
https://drill.apache.org/docs/json-data-model/#analyzing-json.
* 
https://drill.apache.org/docs/lesson-2-run-queries-with-ansi-sql/#queries-in-this-lesson
* 
https://drill.apache.org/docs/lesson-3-run-queries-on-complex-data-types/#explore-clickstream-data:

 Some reserved-keywords require table aliasing
 -

 Key: DRILL-3435
 URL: https://issues.apache.org/jira/browse/DRILL-3435
 Project: Apache Drill
  Issue Type: Bug
  Components: Documentation
Affects Versions: 1.0.0
Reporter: Andy Pernsteiner
Assignee: Bridget Bevens
Priority: Minor
  Labels: documentation

 Not only does drill have a number of reserved keywords that require 
 backticking (``), there also appear to be some reserved words that require 
 extra care, using table aliases to be able to perform queries.   One that 
 we've found so far is 'user' .  EG, consider the following scenario:
 bq. /usr/bin/sqlline -u jdbc:drill: -n root
 then:
 {code} select user from 
 `profiles/2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill` ;
 +---+
 | user  |
 +---+
 | root  |
 +---+
 {code}
 But the actual file in question has the 'user' as a different user:
 {code} cat 2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill|egrep -o 
 'user\:\[a-z]+\'
 user:apernsteiner
 {code} 
 The workaround  is to alias the table (t) and prefix the 'user' column in the 
 resultset w/ the table alias :
 {code}
 0: jdbc:drill: select t.`user` from 
 `profiles/2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill` t ;
 +-+
 |  user   |
 +-+
 | apernsteiner  |
 +-+
 {code}
 @jinfeng gave the following explanation on the user@ list:
 {quote}
 'user' is a SQL reserved word.
 When it's used alone, it is a system function, just like CURRENT_USER.  See
 http://calcite.incubator.apache.org/docs/reference.html  (System functions
 section).
 When 'user' is qualified with a table alias, it becomes a column
 identifier. 
 {quote}
 The drill documentation @ https://drill.apache.org/docs/reserved-keywords/ 
 merely says to use backticks (``), not to do any table aliasing.  For those 
 who have columns named 'user', this may be misleading...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


  1   2   3   >