Re: [VOTE] Release Apache Drill 0.7.0 (rc1)

2014-12-18 Thread Neeraja Rentachintala
+1 (non-binding)
Tried the tar with few simple queries on JSON.

-Neeraja

On Thu, Dec 18, 2014 at 7:24 PM, Julian Hyde  wrote:
>
> Downloaded source, built on JDK 1.7 and Mac OS, started command line and
> ran some queries. Logged a minor bug [
> https://issues.apache.org/jira/browse/DRILL-1898 ], not a show-stopper.
>
> +1
>
> On Dec 18, 2014, at 4:27 PM, Ted Dunning  wrote:
>
> > Did you test it?  If so, it is good to say what you did so that others
> can
> > avoid duplication of effort.
> >
> > If not, it is best to not vote.
> >
> >
> >
> > On Thu, Dec 18, 2014 at 3:38 PM, Tomer Shiran 
> wrote:
> >>
> >> +1
> >>
> >>> On Dec 18, 2014, at 12:06 PM, Jacques Nadeau 
> wrote:
> >>>
> >>> Good morning,
> >>>
> >>> I would like to propose the release of Apache Drill, version 0.7.0.
> This
> >>> is the second release candidate (zero-index rc1) and includes fixes
> for a
> >>> few issues identified as part of the first candidate.
> >>>
> >>> This release includes 228 resolved JIRAs [1].
> >>>
> >>> The artifacts are hosted at [2].
> >>>
> >>> The vote will be open for 72 hours, ending Noon Pacific, December 21,
> >> 2014.
> >>>
> >>> [ ] +1
> >>> [ ] +0
> >>> [ ] -1
> >>>
> >>>
> >>> Thank you,
> >>> Jacques
> >>>
> >>> [1]
> >>>
> >>
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12313820&version=12327473
> >>> [2] http://people.apache.org/~jacques/apache-drill-0.7.0.rc1/
> >>
>
>


[jira] [Created] (DRILL-1899) Consider the read preference set by users

2014-12-18 Thread B Anil Kumar (JIRA)
B Anil Kumar created DRILL-1899:
---

 Summary: Consider the read preference set by users
 Key: DRILL-1899
 URL: https://issues.apache.org/jira/browse/DRILL-1899
 Project: Apache Drill
  Issue Type: Bug
  Components: Storage - MongoDB
Reporter: B Anil Kumar
Priority: Minor


As of now, Drillbits read data from nearest mongod. But users may set read 
preference through client uri. Consider the user's read preference.

However, if the users want data locality, users have to set read preference as 
nearest.



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


Re: [VOTE] Release Apache Drill 0.7.0 (rc1)

2014-12-18 Thread Julian Hyde
Downloaded source, built on JDK 1.7 and Mac OS, started command line and ran 
some queries. Logged a minor bug [ 
https://issues.apache.org/jira/browse/DRILL-1898 ], not a show-stopper.

+1

On Dec 18, 2014, at 4:27 PM, Ted Dunning  wrote:

> Did you test it?  If so, it is good to say what you did so that others can
> avoid duplication of effort.
> 
> If not, it is best to not vote.
> 
> 
> 
> On Thu, Dec 18, 2014 at 3:38 PM, Tomer Shiran  wrote:
>> 
>> +1
>> 
>>> On Dec 18, 2014, at 12:06 PM, Jacques Nadeau  wrote:
>>> 
>>> Good morning,
>>> 
>>> I would like to propose the release of Apache Drill, version 0.7.0.  This
>>> is the second release candidate (zero-index rc1) and includes fixes for a
>>> few issues identified as part of the first candidate.
>>> 
>>> This release includes 228 resolved JIRAs [1].
>>> 
>>> The artifacts are hosted at [2].
>>> 
>>> The vote will be open for 72 hours, ending Noon Pacific, December 21,
>> 2014.
>>> 
>>> [ ] +1
>>> [ ] +0
>>> [ ] -1
>>> 
>>> 
>>> Thank you,
>>> Jacques
>>> 
>>> [1]
>>> 
>> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12313820&version=12327473
>>> [2] http://people.apache.org/~jacques/apache-drill-0.7.0.rc1/
>> 



[jira] [Created] (DRILL-1898) SELECT DISTINCT fails when applied to boolean column

2014-12-18 Thread Julian Hyde (JIRA)
Julian Hyde created DRILL-1898:
--

 Summary: SELECT DISTINCT fails when applied to boolean column
 Key: DRILL-1898
 URL: https://issues.apache.org/jira/browse/DRILL-1898
 Project: Apache Drill
  Issue Type: Bug
Affects Versions: 0.7.0
Reporter: Julian Hyde


SELECT DISTINCT fails when applied to boolean column.

{code}
0: jdbc:drill:zk=local> select distinct `bool_val` from `sys`.`options`;
Query failed: Query failed: Failure while running fragment., Failure finding 
function that runtime code generation expected.  Signature: compare_to( 
BIT:OPTIONALBIT:OPTIONAL,  ) returns INT:REQUIRED [ 
af1536ff-eca4-4592-b0ac-2b625362bf2f on 10.11.4.182:31010 ]
[ af1536ff-eca4-4592-b0ac-2b625362bf2f on 10.11.4.182:31010 ]
{code}



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


[jira] [Created] (DRILL-1897) Using 'avg' along with 'length' results in wrong output when nulls are present

2014-12-18 Thread Rahul Challapalli (JIRA)
Rahul Challapalli created DRILL-1897:


 Summary: Using 'avg' along with 'length' results in wrong output 
when nulls are present
 Key: DRILL-1897
 URL: https://issues.apache.org/jira/browse/DRILL-1897
 Project: Apache Drill
  Issue Type: Bug
  Components: Functions - Drill
Reporter: Rahul Challapalli


git.commit.id.abbrev=9dfa4a1

Dataset :
{code}
{
 "col1":1,
 "col2":"abc"
}
{
 "col1":1,
 "col2":null
}
{
 "col1":null,
 "col2":null
}
{code}

The below query should return 3 instead of 1 (postgres correctly returns 3).
Query :
{code}
select avg(length(col2)) from `a.json`;
++
|   EXPR$0   |
++
| 1.0|
++
{code} 

Plan for the above query :
{code}
00-00Screen
00-01  Project(EXPR$0=[CAST(/(CastHigh(CASE(=($1, 0), null, $0)), $1)):ANY])
00-02StreamAgg(group=[{}], agg#0=[$SUM0($0)], agg#1=[COUNT()])
00-03  Project($f0=[length($0)])
00-04Scan(groupscan=[EasyGroupScan 
[selectionRoot=/drill/testdata/data-shapes/wide-columns/flat/json/a.json, 
numFiles=1, columns=[`col2`], 
files=[maprfs:/drill/testdata/data-shapes/wide-columns/flat/json/a.json]]])
{code}

The below query which does not involve a second function works as expected even 
though nulls are present
{code}
 select avg(col1) from `a.json`;
++
|   EXPR$0   |
++
| 1.0|
++
{code}

Let me know if you need any more information.



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


[jira] [Created] (DRILL-1896) Unit tests failing due to string based comparison at JsonStringHashMap & JsonStringArrayList #equals methods

2014-12-18 Thread Hanifi Gunes (JIRA)
Hanifi Gunes created DRILL-1896:
---

 Summary: Unit tests failing due to string based comparison at 
JsonStringHashMap & JsonStringArrayList #equals methods
 Key: DRILL-1896
 URL: https://issues.apache.org/jira/browse/DRILL-1896
 Project: Apache Drill
  Issue Type: Bug
Reporter: Hanifi Gunes
Assignee: Jason Altekruse


Unit test framework relies on JsonString*#equals methods to compare actual and 
expected results. We should properly implement these to prevent unit tests from 
failing.



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


Re: [VOTE] Release Apache Drill 0.7.0 (rc1)

2014-12-18 Thread Ted Dunning
Did you test it?  If so, it is good to say what you did so that others can
avoid duplication of effort.

If not, it is best to not vote.



On Thu, Dec 18, 2014 at 3:38 PM, Tomer Shiran  wrote:
>
> +1
>
> > On Dec 18, 2014, at 12:06 PM, Jacques Nadeau  wrote:
> >
> > Good morning,
> >
> > I would like to propose the release of Apache Drill, version 0.7.0.  This
> > is the second release candidate (zero-index rc1) and includes fixes for a
> > few issues identified as part of the first candidate.
> >
> > This release includes 228 resolved JIRAs [1].
> >
> > The artifacts are hosted at [2].
> >
> > The vote will be open for 72 hours, ending Noon Pacific, December 21,
> 2014.
> >
> > [ ] +1
> > [ ] +0
> > [ ] -1
> >
> >
> > Thank you,
> > Jacques
> >
> > [1]
> >
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12313820&version=12327473
> > [2] http://people.apache.org/~jacques/apache-drill-0.7.0.rc1/
>


[jira] [Created] (DRILL-1895) Exception is thrown when type value in the "IN clause" is incompatible with the column type

2014-12-18 Thread Victoria Markman (JIRA)
Victoria Markman created DRILL-1895:
---

 Summary: Exception is thrown when type value in the "IN clause" is 
incompatible with the column type
 Key: DRILL-1895
 URL: https://issues.apache.org/jira/browse/DRILL-1895
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Data Types
Affects Versions: 0.7.0
Reporter: Victoria Markman


-- Works, because value in "IN CLAUSE" is a compatible numeric type

0: jdbc:drill:schema=dfs> select * from cp.`tpch/nation.parquet` where 
n_regionkey in (4);
+-++-++
| n_nationkey |   n_name   | n_regionkey | n_comment  |
+-++-++
| 4   | EGYPT  | 4   | y above the carefully unusual 
theodolites. final dugouts are quickly across the furiously regular d |
| 10  | IRAN   | 4   | efully alongside of the slyly final 
dependencies.  |
| 11  | IRAQ   | 4   | nic deposits boost atop the quickly 
final requests? quickly regula |
| 13  | JORDAN | 4   | ic deposits are blithely about the 
carefully regular pa |
| 20  | SAUDI ARABIA | 4   | ts. silent requests haggle. 
closely express packages sleep across the blithely |
+-++-++
5 rows selected (0.092 seconds)


-- WORKS (suprisingly is trying to convert literal string to numeric and 
succeeds, because it can be implicitly converted)
0: jdbc:drill:schema=dfs> select * from cp.`tpch/nation.parquet` where 
n_regionkey in ('4');
+-++-++
| n_nationkey |   n_name   | n_regionkey | n_comment  |
+-++-++
| 4   | EGYPT  | 4   | y above the carefully unusual 
theodolites. final dugouts are quickly across the furiously regular d |
| 10  | IRAN   | 4   | efully alongside of the slyly final 
dependencies.  |
| 11  | IRAQ   | 4   | nic deposits boost atop the quickly 
final requests? quickly regula |
| 13  | JORDAN | 4   | ic deposits are blithely about the 
carefully regular pa |
| 20  | SAUDI ARABIA | 4   | ts. silent requests haggle. 
closely express packages sleep across the blithely |
+-++-++
5 rows selected (0.073 seconds)

-- FAILS (can't be converted to numeric type)
0: jdbc:drill:schema=dfs> select * from cp.`tpch/nation.parquet` where 
n_regionkey in ('abc');
Query failed: Query failed: Failure while running fragment., abc [ 
4578a64c-75c5-4acf-be8c-28ce0db8623d on atsqa4-133.qa.lab:31010 ]
[ 4578a64c-75c5-4acf-be8c-28ce0db8623d on atsqa4-133.qa.lab:31010 ]
Error: exception while executing query: Failure while executing query. 
(state=,code=0)

0: jdbc:drill:schema=dfs> select * from cp.`tpch/nation.parquet` where 
n_regionkey in ('4');
+-++-++
| n_nationkey |   n_name   | n_regionkey | n_comment  |
+-++-++
| 4   | EGYPT  | 4   | y above the carefully unusual 
theodolites. final dugouts are quickly across the furiously regular d |
| 10  | IRAN   | 4   | efully alongside of the slyly final 
dependencies.  |
| 11  | IRAQ   | 4   | nic deposits boost atop the quickly 
final requests? quickly regula |
| 13  | JORDAN | 4   | ic deposits are blithely about the 
carefully regular pa |
| 20  | SAUDI ARABIA | 4   | ts. silent requests haggle. 
closely express packages sleep across the blithely |
+-++-++
5 rows selected (0.073 seconds)

Error message would be really neat.
Postges example:

postgres=# select * from t1 where c1 in ('abc');
ERROR:  invalid input syntax for integer: "abc"




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


Re: [VOTE] Release Apache Drill 0.7.0 (rc1)

2014-12-18 Thread Tomer Shiran
+1

> On Dec 18, 2014, at 12:06 PM, Jacques Nadeau  wrote:
> 
> Good morning,
> 
> I would like to propose the release of Apache Drill, version 0.7.0.  This
> is the second release candidate (zero-index rc1) and includes fixes for a
> few issues identified as part of the first candidate.
> 
> This release includes 228 resolved JIRAs [1].
> 
> The artifacts are hosted at [2].
> 
> The vote will be open for 72 hours, ending Noon Pacific, December 21, 2014.
> 
> [ ] +1
> [ ] +0
> [ ] -1
> 
> 
> Thank you,
> Jacques
> 
> [1]
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12313820&version=12327473
> [2] http://people.apache.org/~jacques/apache-drill-0.7.0.rc1/


[jira] [Created] (DRILL-1894) Complex JSON cause NPE

2014-12-18 Thread Chun Chang (JIRA)
Chun Chang created DRILL-1894:
-

 Summary: Complex JSON cause NPE
 Key: DRILL-1894
 URL: https://issues.apache.org/jira/browse/DRILL-1894
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Flow
Affects Versions: 0.7.0
Reporter: Chun Chang


#Tue Dec 16 13:28:01 EST 2014
git.commit.id.abbrev=3b0ff5d

Have the following JSON record (actual dataset too big):

{code}
{
"id": 2,
"oooa": {
"oa": {
"oab": {
"oabc": [
{
"rowId": 2
},
{
"rowValue1": 2,
"rowValue2": 2
}
]
}
}
}
}
{code}

The following query caused NPE:

{code}
SELECT   t.id, 
 t.oooa.oa.oab.oabc, 
 t.oooa.oa.oab.oabc[1].rowvalue2 
FROM `complex.json` t 
ORDER BY t.oooa.oa.oab.oabc[1].rowvalue2 limit 50;
{code}

{code}
0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select t.id, t.oooa.oa.oab.oabc, 
t.oooa.oa.oab.oabc[1].rowValue2 from `complex.json` t order by 
t.oooa.oa.oab.oabc[1].rowValue2 limit 50;
Query failed: Query failed: Failure while running fragment.[ 
8a2ee7e8-8c7b-4881-883e-7924884a0878 on qa-node117.qa.lab:31010 ]
[ 8a2ee7e8-8c7b-4881-883e-7924884a0878 on qa-node117.qa.lab:31010 ]


Error: exception while executing query: Failure while executing query. 
(state=,code=0)
{code}

stack trace:

{code}
2014-12-18 15:11:54,916 [2b6ca0c5-5b7d-3832-091f-67b37d4e3e6c:frag:1:2] WARN  
o.a.d.e.w.fragment.FragmentExecutor - Error while initializing or executing 
fragment
java.lang.NullPointerException: null
2014-12-18 15:11:54,916 [2b6ca0c5-5b7d-3832-091f-67b37d4e3e6c:frag:1:2] ERROR 
o.a.drill.exec.ops.FragmentContext - Fragment Context received failure.
java.lang.NullPointerException: null
2014-12-18 15:11:54,916 [2b6ca0c5-5b7d-3832-091f-67b37d4e3e6c:frag:1:2] ERROR 
o.a.d.e.w.f.AbstractStatusReporter - Error 
798d65b7-9cfb-4276-a50a-e9bae311a7ec: Failure while running fragment.
java.lang.NullPointerException: null
2014-12-18 15:11:54,920 [2b6ca0c5-5b7d-3832-091f-67b37d4e3e6c:frag:2:0] ERROR 
o.a.d.e.p.i.p.StatusHandler - Failure while sending data to user.
org.apache.drill.exec.rpc.RpcException: Interrupted while trying to get sending 
semaphore.
at 
org.apache.drill.exec.rpc.data.DataTunnel.sendRecordBatch(DataTunnel.java:52) 
[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.test.generated.PartitionerGen609$OutgoingRecordBatch.flush(PartitionerTemplate.java:320)
 [na:na]
at 
org.apache.drill.exec.test.generated.PartitionerGen609.flushOutgoingBatches(PartitionerTemplate.java:134)
 [na:na]
at 
org.apache.drill.exec.physical.impl.partitionsender.PartitionSenderRootExec.innerNext(PartitionSenderRootExec.java:176)
 [drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:57) 
[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:114)
 [drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:254)
 [drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.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.InterruptedException: null
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1301)
 ~[na:1.7.0_45]
at java.util.concurrent.Semaphore.acquire(Semaphore.java:317) 
~[na:1.7.0_45]
at 
org.apache.drill.exec.rpc.data.DataTunnel.sendRecordBatch(DataTunnel.java:49) 
[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
... 9 common frames omitted
{code}

physical plan:

{code}
0: jdbc:drill:schema=dfs.drillTestDirComplexJ> explain plan for select t.id, 
t.oooa.oa.oab.oabc, t.oooa.oa.oab.oabc[1].rowValue2 from `complex.json` t order 
by t.oooa.oa.oab.oabc[1].rowValue2 limit 50;
+++
|text|json|
+++
| 00-00Screen
00-01  Project(id=[$0], EXPR$1=[$1], EXPR$2=[$2])
00-02SelectionVectorRemover
00-03  Limit(fetch=[50])
00-04SingleMergeExchange(sort0=[2 ASC])
01-01  SelectionVectorRemover
01-02TopN(limit=[50])
01-03  HashToRandomExchange(dist0=[[$2]])
02-01Project(id=[$1], EXPR$1=[ITEM(ITEM(ITEM($0, 'oa'), 
'oab'), 'oabc')], EXPR

[jira] [Created] (DRILL-1893) VectorContainer.add(VectorContainer.java:188) Assert

2014-12-18 Thread Chun Chang (JIRA)
Chun Chang created DRILL-1893:
-

 Summary: VectorContainer.add(VectorContainer.java:188) Assert
 Key: DRILL-1893
 URL: https://issues.apache.org/jira/browse/DRILL-1893
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Flow
Affects Versions: 0.7.0
Reporter: Chun Chang


#Tue Dec 16 13:28:01 EST 2014
git.commit.id.abbrev=3b0ff5d

Have a json record looks like this (actual dataset is too big to attach here):

{code}
{  "id":2,
"ooos": {
"oa": {
"oab": {
"oabc": "ooos string 2"
}
}
}
}
{code}

The following query causes assertion:

{code}
SELECT t.id, 
   t.ooos, 
   t.ooos.oa.oab.oabc 
FROM   `complex.json` t 
WHERE  Length(t.ooos.oa.oab.oabc) < 14 
OR Length(t.ooos.oa.oab.oabc) > 16 
ORDER  BY t.ooos.oa.oab.oabc 
LIMIT  50; 
{code}

{code}
0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select t.id, t.ooos, 
t.ooos.oa.oab.oabc from `complex.json` t where length(t.ooos.oa.oab.oabc) < 14 
or length(t.ooos.oa.oab.oabc) > 16 order by t.ooos.oa.oab.oabc limit 50;
++++
| id |ooos|   EXPR$2   |
++++
Query failed: Query failed: Failure while running fragment.[ 
d4b0530c-1f06-4b72-9836-07e181adaef1 on qa-node119.qa.lab:31010 ]
[ d4b0530c-1f06-4b72-9836-07e181adaef1 on qa-node119.qa.lab:31010 ]


java.lang.RuntimeException: java.sql.SQLException: Failure while executing 
query.
at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2514)
at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2148)
at sqlline.SqlLine.print(SqlLine.java:1809)
at sqlline.SqlLine$Commands.execute(SqlLine.java:3766)
at sqlline.SqlLine$Commands.sql(SqlLine.java:3663)
at sqlline.SqlLine.dispatch(SqlLine.java:889)
at sqlline.SqlLine.begin(SqlLine.java:763)
at sqlline.SqlLine.start(SqlLine.java:498)
at sqlline.SqlLine.main(SqlLine.java:460)
{code}

Here is the stack trace:

{code}
2014-12-18 14:40:02,615 [2b6ca84c-100a-9bb2-4d32-6798494f13ec:frag:1:3] WARN  
o.a.d.e.w.fragment.FragmentExecutor - Error while initializing or executing 
fragment
java.lang.AssertionError: null
at 
org.apache.drill.exec.record.VectorContainer.add(VectorContainer.java:188) 
~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.record.VectorContainer.addHyperList(VectorContainer.java:81)
 ~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.physical.impl.sort.SortRecordBatchBuilder.build(SortRecordBatchBuilder.java:196)
 ~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.physical.impl.TopN.TopNBatch.purge(TopNBatch.java:299) 
~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.physical.impl.TopN.TopNBatch.innerNext(TopNBatch.java:228)
 ~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)
 ~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
 ~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:99)
 ~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:89)
 ~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51)
 ~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.innerNext(RemovingRecordBatch.java:96)
 ~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)
 ~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
 ~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:67) 
~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.physical.impl.SingleSenderCreator$SingleSenderRootExec.innerNext(SingleSenderCreator.java:97)
 ~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]
at 
org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:57) 
~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.

[jira] [Created] (DRILL-1892) Implement 'Values' operator to handle large IN lists

2014-12-18 Thread Aman Sinha (JIRA)
Aman Sinha created DRILL-1892:
-

 Summary: Implement 'Values' operator to handle large IN lists 
 Key: DRILL-1892
 URL: https://issues.apache.org/jira/browse/DRILL-1892
 Project: Apache Drill
  Issue Type: New Feature
  Components: Execution - Operators
Affects Versions: 0.7.0
Reporter: Aman Sinha


This is a placeholder for implementing the Values operator to handle IN lists 
of size 20 or more.  DRILL-391 bumped up the IN list threshold from 20 to 200 
in Calcite as a temporary fix but we should eventually revert that (or make it 
configurable) and in order to do that Drill needs to have a physical 
implementation of ValuesRel logical plan node.  



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


[jira] [Created] (DRILL-1891) Error message does not get propagated correctly when reading from JSON file

2014-12-18 Thread Victoria Markman (JIRA)
Victoria Markman created DRILL-1891:
---

 Summary: Error message does not get propagated correctly when 
reading from JSON file
 Key: DRILL-1891
 URL: https://issues.apache.org/jira/browse/DRILL-1891
 Project: Apache Drill
  Issue Type: Bug
  Components: Storage - JSON
Affects Versions: 0.7.0
Reporter: Victoria Markman


I made a mistake in t.json file (extra colon in the last row):

{ "a1": 0 , "b1": "a"}
{ "a1": 1 , "b1": "b"}
{ "a1": 2 , "b1": "c"}
{ "a1":: 3 , "b1": "c"}

Error message below pretty much tells me everything that went wrong.

0: jdbc:drill:schema=dfs> select a1 from `t.json` where a1 is not null;
Query failed: Query stopped., Unexpected character (':' (code 58)): expected a 
valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: org.apache.drill.exec.vector.complex.fn.JsonReader@53c10ede; line: 
3, column: 9] [ 64182782-ebba-4c6a-a963-005b8cb48339 on atsqa4-133.qa.lab:31010 
]


However, if a result of query above is an input to any other operator, I get 
this error message:

0: jdbc:drill:schema=dfs> select a1 from `t.json` where a1 is not null group by 
a1;
Query failed: Query failed: Failure while running fragment., You tried to do a 
batch data read operation when you were in a state of STOP.  You can only do 
this type of operation when you are in a state of OK or OK_NEW_SCHEMA. [ 
955aac65-5e43-4430-baf6-ed6bb8a020d9 on atsqa4-133.qa.lab:31010 ]
[ 955aac65-5e43-4430-baf6-ed6bb8a020d9 on atsqa4-133.qa.lab:31010 ]
Error: exception while executing query: Failure while executing query. 
(state=,code=0)

Very painful for the user if query is really complex.
The same behavior if file does not exist.



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


[VOTE] Release Apache Drill 0.7.0 (rc1)

2014-12-18 Thread Jacques Nadeau
Good morning,

I would like to propose the release of Apache Drill, version 0.7.0.  This
is the second release candidate (zero-index rc1) and includes fixes for a
few issues identified as part of the first candidate.

This release includes 228 resolved JIRAs [1].

The artifacts are hosted at [2].

The vote will be open for 72 hours, ending Noon Pacific, December 21, 2014.

[ ] +1
[ ] +0
[ ] -1


Thank you,
Jacques

[1]
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12313820&version=12327473
[2] http://people.apache.org/~jacques/apache-drill-0.7.0.rc1/


[jira] [Created] (DRILL-1890) Parquet reader throws an cryptic exception when reading a file with colliding column names accoring to Drill's case-insensitive field matching

2014-12-18 Thread Jason Altekruse (JIRA)
Jason Altekruse created DRILL-1890:
--

 Summary: Parquet reader throws an cryptic exception when reading a 
file with colliding column names accoring to Drill's case-insensitive field 
matching
 Key: DRILL-1890
 URL: https://issues.apache.org/jira/browse/DRILL-1890
 Project: Apache Drill
  Issue Type: Bug
Reporter: Jason Altekruse






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


[jira] [Created] (DRILL-1889) when 'select *' is used along with an order by on length of a column, Drill is adding the computed length to the list of columns

2014-12-18 Thread Rahul Challapalli (JIRA)
Rahul Challapalli created DRILL-1889:


 Summary: when 'select *' is used along with an order by on length 
of a column, Drill is adding the computed length to the list of columns
 Key: DRILL-1889
 URL: https://issues.apache.org/jira/browse/DRILL-1889
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Flow
Reporter: Rahul Challapalli


git.commit.id.abbrev=9dfa4a1

Dataset :
{code}
{
 "col1":1,
 "col2":"a"
}
{
 "col1":2,
 "col2":"b"
}
{
 "col1":2,
 "col2":"abc"
}
{code}

Query :
{code}
 select * from `b.json` order by length(col2);
++++
|col1|col2|   EXPR$1   |
++++
| 1  | a  | 1  |
| 2  | b  | 1  |
| 2  | abc| 3  |
++++
{code}

Drill adds the length column. (EXPR$1) Not sure if this is intended behavior 
since postgres does not do this



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


[jira] [Created] (DRILL-1888) Memory leak during execution

2014-12-18 Thread Victoria Markman (JIRA)
Victoria Markman created DRILL-1888:
---

 Summary: Memory leak during execution 
 Key: DRILL-1888
 URL: https://issues.apache.org/jira/browse/DRILL-1888
 Project: Apache Drill
  Issue Type: Bug
  Components: Execution - Operators
Affects Versions: 0.6.0
Reporter: Victoria Markman


Use TPC-DS scema and run query below:

SELECT
wr_returning_customer_sk,
wr_returned_date_sk,
sum(wr_return_amt)/sum(wr_return_quantity) as avg_return_amt
FROM web_returns
WHERE (
wr_item_sk in   (
SELECT
ws_item_sk
FROMweb_sales
WHERE ws_sales_price < 50 or ws_ext_sales_price < 1000)
or wr_item_sk in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) )
and wr_reason_sk in (10)
GROUP BY
wr_returning_customer_sk,
wr_returned_date_sk
HAVING sum(wr_return_amt)/sum(wr_return_quantity) >= 50.0;
Total 1 allocation(s) of byte size(s): 4096, at stack location:
   

>From drillbit.log

org.apache.drill.exec.memory.TopLevelAllocator$ChildAllocator.buffer(TopLevelAllocator.java:212)

org.apache.drill.exec.vector.UInt1Vector.allocateNewSafe(UInt1Vector.java:137)

org.apache.drill.exec.vector.UInt1Vector.allocateNew(UInt1Vector.java:123)

org.apache.drill.exec.vector.NullableIntVector.allocateNew(NullableIntVector.java:163)

org.apache.drill.exec.physical.impl.aggregate.HashAggBatch.buildSchema(HashAggBatch.java:101)

org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:130)

org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)

org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:99)

org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:89)

org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51)

org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)

org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)

org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:99)

org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:89)

org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51)

org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.innerNext(RemovingRecordBatch.java:96)

org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)

org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)

org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:99)

org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:89)

org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51)

org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:132)

org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)

org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)

org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:99)

org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:89)

org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51)

org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:132)

org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)

org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)

org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:67)

org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:97)

org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:57)

org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:114)

org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:254)
   

[jira] [Created] (DRILL-1887) SQL Standard : NULL values are not considered equal. But drill treats them as equal

2014-12-18 Thread Rahul Challapalli (JIRA)
Rahul Challapalli created DRILL-1887:


 Summary: SQL Standard : NULL values are not considered equal. But 
drill treats them as equal
 Key: DRILL-1887
 URL: https://issues.apache.org/jira/browse/DRILL-1887
 Project: Apache Drill
  Issue Type: Bug
Reporter: Rahul Challapalli


git.commit.id.abbrev=9dfa4a1

Dataset1:
{code}
{
 "col1":1,
 "col2":"abc"
}
{
 "col1":2,
 "col2":null
}
{code}

Dataset 2:
{code}
{
 "col1":1,
 "col2":null
}
{
 "col1":2,
 "col2":null
}
{
 "col1":2,
 "col2":"abc"
}
{code}

Query :
{code}
select * from `a.json` a join `b.json` b on a.col2=b.col2; 
+++++
|col1|col2|   col10|   col20|
+++++
| 1  | abc| 2  | abc|
| 2  | null   | 1  | null   |
| 2  | null   | 2  | null   |
+++++
{code}

Most database engines treat 2 NULL values as not being equal. This makes it 
hard to compare DRILL's results against any Standard SQL engine. However I am 
not sure whether drill is intentionally designed to behave this way.



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