[jira] [Created] (DRILL-5345) USING() should return error, when column in not present in the right table

2017-03-09 Thread Khurram Faraaz (JIRA)
Khurram Faraaz created DRILL-5345:
-

 Summary: USING() should return error, when column in 
not present in the right table
 Key: DRILL-5345
 URL: https://issues.apache.org/jira/browse/DRILL-5345
 Project: Apache Drill
  Issue Type: Bug
  Components: Query Planning & Optimization
Affects Versions: 1.10.0
Reporter: Khurram Faraaz


When the column used in, USING(column) is not present in the right table of the 
JOIN, we show report an error to user instead of returning zero rows.

{noformat}
 ::=
  USING   
 ::=
  
 ::=
   [ {   }... ]
 ::=
  
{noformat}

Postgres 9.3 reports an error for such a scenario, because column c1 is not 
present in the other table in the join.
{noformat}
postgres=# select * from tbl_l JOIN tbl_r USING (c1);
ERROR:  column "c1" specified in USING clause does not exist in right table
{noformat}

Drill 1.10.0 returns zero rows in one case and RuntimeException in the other 
case. In both cases Drill should return a meaning error message, like the one 
reported by Postgres.

{noformat}
0: jdbc:drill:schema=dfs.tmp> create table tbl_l as select cast(columns[0] as 
integer) c1, cast(columns[1] as varchar(25)) c2 from `tbl_l.txt`;
+---++
| Fragment  | Number of records written  |
+---++
| 0_0   | 10 |
+---++
1 row selected (0.197 seconds)

0: jdbc:drill:schema=dfs.tmp> create table tbl_r as select cast(columns[0] as 
integer) c3, cast(columns[1] as varchar(25)) c4 from `tbl_r.txt`;
+---++
| Fragment  | Number of records written  |
+---++
| 0_0   | 10 |
+---++
1 row selected (0.221 seconds)

## this is not right, we should report error for below query.

0: jdbc:drill:schema=dfs.tmp> select * from tbl_l JOIN tbl_r USING (c1);
+-+-+-+-+
| c1  | c2  | c3  | c4  |
+-+-+-+-+
+-+-+-+-+
No rows selected (0.222 seconds)

## we should return a meaningful error message

0: jdbc:drill:schema=dfs.tmp> select * from tbl_l JOIN tbl_r USING (c2);
Error: SYSTEM ERROR: DrillRuntimeException: Join only supports implicit casts 
between 1. Numeric data
 2. Varchar, Varbinary data 3. Date, Timestamp data Left type: INT, Right type: 
VARCHAR. Add explicit casts to avoid this error

Fragment 0:0

[Error Id: 56107e6e-54b5-4905-9aa4-b0af2aea4dd9 on centos-01.qa.lab:31010] 
(state=,code=0)
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (DRILL-5343) Wrong results on repeated DATE_ADD

2017-03-09 Thread Rahul Raj (JIRA)
Rahul Raj created DRILL-5343:


 Summary: Wrong results on repeated DATE_ADD
 Key: DRILL-5343
 URL: https://issues.apache.org/jira/browse/DRILL-5343
 Project: Apache Drill
  Issue Type: Bug
Affects Versions: 1.9.0
Reporter: Rahul Raj


On Drill 1.9, DATE_ADD(DATE_ADD ...) results in the inner most value getting 
added up N times. Its seen on MINUTE/SECOND/HOUR interval values, It works fine 
on DAY interval

See the results below; I have trimmed the sqlline results for brevity.


SELECT DATE_ADD(TIME '12:23:34',INTERVAL '1' minute) from (values(1));
+---+
| 12:24:34  |
+---+

SELECT DATE_ADD(TIME '12:23:34',INTERVAL '5' minute) from (values(1));
+---+
| 12:28:34  |
+---+

SELECT DATE_ADD(DATE_ADD(TIME '12:23:34',INTERVAL '5' minute),INTERVAL '1' 
minute) from (values(1));
+---+
| 12:33:34  |
+---+

SELECT DATE_ADD(DATE_ADD(DATE_ADD(TIME '12:23:34',INTERVAL '5' minute),INTERVAL 
'1' minute),INTERVAL '2' minute) from (values(1));
+---+
| 12:38:34  |
+---+


SELECT DATE_ADD(DATE_ADD(DATE '2008-2-23',INTERVAL '5' minute),INTERVAL '2' 
minute) from (values(1));
++
| 2008-02-23 00:10:00.0  |
++

SELECT DATE_ADD(DATE_ADD(DATE '2008-2-23',INTERVAL '5' second),INTERVAL '2' 
second) from (values(1));
++
| 2008-02-23 00:00:10.0  |
++

SELECT DATE_ADD(DATE_ADD(DATE '2008-2-23',INTERVAL '5' hour),INTERVAL '2' hour) 
from (values(1));
++
| 2008-02-23 10:00:00.0  |
++


DAY interval works fine.

SELECT DATE_ADD(DATE '2008-2-23',INTERVAL '5' day) from (values(1));
++
| 2008-02-28 00:00:00.0  |
++

SELECT DATE_ADD(DATE_ADD(DATE '2008-2-23',INTERVAL '5' day),INTERVAL '1' day) 
from (values(1));
++
| 2008-02-29 00:00:00.0  |
++

SELECT DATE_ADD(DATE_ADD(DATE '2008-2-23',INTERVAL '5' day),INTERVAL '2' day) 
from (values(1));
++
| 2008-03-01 00:00:00.0  |
++



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] drill issue #520: DRILL-3510: Add ANSI_QUOTES option so that Drill's SQL Par...

2017-03-09 Thread vdiravka
Github user vdiravka commented on the issue:

https://github.com/apache/drill/pull/520
  
@laurentgo Since you have already reviewed it, could you please take a look 
at this updated PR. There is only one commit now, because current PR differs 
very much from the previous one. Anyway I was replied into your previous 
comments.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill issue #772: DRILL-5316: Check drillbits size before we attempt to acce...

2017-03-09 Thread sohami
Github user sohami commented on the issue:

https://github.com/apache/drill/pull/772
  
Thanks @superbstreak for the change. 
LGTM. +1 from my side.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] drill pull request #772: DRILL-5316: Check drillbits size before we attempt ...

2017-03-09 Thread sohami
Github user sohami commented on a diff in the pull request:

https://github.com/apache/drill/pull/772#discussion_r105286121
  
--- Diff: contrib/native/client/src/clientlib/drillClientImpl.cpp ---
@@ -2143,6 +2146,9 @@ connectionStatus_t 
PooledDrillClientImpl::connect(const char* connStr, DrillUser
 Utils::shuffle(drillbits);
 // The original shuffled order is maintained if we shuffle 
first and then add any missing elements
 Utils::add(m_drillbits, drillbits);
+if (m_drillbits.empty()){
+return handleConnError(CONN_FAILURE, 
getMessage(ERR_CONN_ZKNODBIT));
--- End diff --

Since we are not removing the offline nodes from m_drillbits then I think 
we should return connection error before shuffle. Let's say on first client 
connection we get all the active node from zookeeper and store it in 
m_drillbits. Then all the nodes went dead or offline. In the next connection 
request, zookeeper will return zero drillbits but since m_drillbits is not 
empty we will still try to connect and fail later. 

Instead I think zero drillbits returned from zookeeper is a good indication 
that we won't be able to connect to any other node already present inside 
m_drillbits and should fail there itself ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: [Drill 1.9.0] : [CONNECTION ERROR] :- (user client) closed unexpectedly. Drillbit down?

2017-03-09 Thread Anup Tiwari
Hi John,

First of all sorry for delayed response and thanks for your suggestion,
reducing value of "planner.width.max_per_node" helped me a lot, above issue
which was coming 8 out of 10 times earlier now it is coming only 2 out of
10 times.

As mentioned above occurrences of connection error came down considerably,
but now sometimes i get "Heap Space Error" for few queries and due to this
sometimes drill-bits on some/all nodes gets killed. Let me know if any
other variable i can check for this(As of now, i have 8GB of Heap and 20GB
of Direct memory) :

*Error Log :*

ERROR o.a.drill.common.CatastrophicFailure - Catastrophic Failure Occurred,
exiting. Information message: Unable to handle out of memory condition in
FragmentExecutor.
java.lang.OutOfMemoryError: Java heap space
at org.apache.xerces.dom.DeferredDocumentImpl.getNodeObject(Unknown
Source) ~[xercesImpl-2.11.0.jar:na]
at
org.apache.xerces.dom.DeferredDocumentImpl.synchronizeChildren(Unknown
Source) ~[xercesImpl-2.11.0.jar:na]
at
org.apache.xerces.dom.DeferredElementImpl.synchronizeChildren(Unknown
Source) ~[xercesImpl-2.11.0.jar:na]
at org.apache.xerces.dom.ElementImpl.normalize(Unknown Source)
~[xercesImpl-2.11.0.jar:na]
at org.apache.xerces.dom.ElementImpl.normalize(Unknown Source)
~[xercesImpl-2.11.0.jar:na]
at org.apache.xerces.dom.ElementImpl.normalize(Unknown Source)
~[xercesImpl-2.11.0.jar:na]
at com.games24x7.device.NewDeviceData.setup(NewDeviceData.java:94)
~[DeviceDataClient-0.0.1-SNAPSHOT.jar:na]
at
org.apache.drill.exec.test.generated.FiltererGen5369.doSetup(FilterTemplate2.java:97)
~[na:na]
at
org.apache.drill.exec.test.generated.FiltererGen5369.setup(FilterTemplate2.java:54)
~[na:na]
at
org.apache.drill.exec.physical.impl.filter.FilterRecordBatch.generateSV2Filterer(FilterRecordBatch.java:195)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.physical.impl.filter.FilterRecordBatch.setupNewSchema(FilterRecordBatch.java:107)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:78)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.innerNext(RemovingRecordBatch.java:94)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:135)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.physical.impl.aggregate.HashAggBatch.buildSchema(HashAggBatch.java:108)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:135)
~[drill-java-exec-1.9.0.jar:1.9.0]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162)
~[drill-java-exec-1.9.0.jar:1.9.0]


Regards,
*Anup Tiwari*

On Mon, Mar 6, 2017 at 7:30 PM, John Omernik 

Re: [VOTE] Release Apache Drill 1.10.0 - rc0

2017-03-09 Thread Paul Rogers
Added a note to the JIRA.

Yes, I had asked Kunal to provide some visual indication that the detail values 
are different parts of the total run time. Neither of us are UI designers, so 
if anyone has a better visual solution, please let us know!

This should not be a blocker. 

Thanks,

- Paul

> On Mar 9, 2017, at 8:30 AM, Zelaine Fong  wrote:
> 
> This looks like it’s due to the changes Kunal made in 
> https://issues.apache.org/jira/browse/DRILL-5190.  Looking at the code 
> changes, it appears that the indentation was intended, as it denotes that 
> those indented timings are a breakdown of the overall duration.
> 
> Kunal?
> 
> -- Zelaine
> 
> On 3/9/17, 8:20 AM, "Arina Yelchiyeva"  wrote:
> 
>So far found one issue:
> 
>https://issues.apache.org/jira/browse/DRILL-5338
> 
> 
>Kind regards
>Arina
> 
>On Thu, Mar 9, 2017 at 9:31 AM, Jinfeng Ni  wrote:
> 
>> Hello all,
>> 
>> I'd like to propose the first release candidate (rc0) of Apache Drill,
>> version 1.10.0.
>> 
>> The release candidate covers a total of 126 resolved JIRAs [1]. Thanks
>> to everyone who contributed to this release.
>> 
>> The tarball artifacts are hosted at [2] and the maven artifacts are
>> hosted at [3].
>> 
>> This release candidate is based on commit
>> 38ef562b1ced59efe57b0dc606f2c36694569102 located at [4].
>> 
>> The vote will be open for the next ~96 hours (including an extra day
>> as the vote is happening over a weekend) ending at 8:00AM Pacific,
>> March 13th, 2017.
>> 
>> [ ] +1
>> [ ] +0
>> [ ] -1
>> 
>> Here's my vote: +1
>> 
>> Thanks,
>> 
>> Jinfeng
>> 
>> 1. https://issues.apache.org/jira/secure/ReleaseNote.jspa?
>> version=12338769=12313820
>> 2. http://home.apache.org/~jni/drill/1.10.0/rc0/
>> 3. https://repository.apache.org/content/repositories/orgapachedrill-1041/
>> 4. https://github.com/jinfengni/incubator-drill/commits/drill-1.10.0
>> 
> 
> 



[jira] [Created] (DRILL-5342) Refactor "managed" external sort for unit tests

2017-03-09 Thread Paul Rogers (JIRA)
Paul Rogers created DRILL-5342:
--

 Summary: Refactor "managed" external sort for unit tests
 Key: DRILL-5342
 URL: https://issues.apache.org/jira/browse/DRILL-5342
 Project: Apache Drill
  Issue Type: Sub-task
Affects Versions: 1.10.0
Reporter: Paul Rogers
Assignee: Paul Rogers
 Fix For: 1.11.0


The external sort was heavily refactored in 1.10 to allow adding memory 
management. (See DRILL-5080.) That effort focused on breaking up the large 
functions into smaller chunks to allow us to more easily modify the bits 
relevant to adding memory management.

This ticket discusses refining those changes to create modular bits that can be 
unit tested individually. For the most part, code will remain unchanged 
functionally, but functions will shift from class to class to break 
dependencies. Also, interfaces will be narrowed to remove global dependencies 
on things like {{FragmentContext}} or {{OperatorContext}}.

The code reviewer(s), when using GitHub, will simply see large changes. Notes 
below identify what was actually changed vs. what was merely moved.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (DRILL-5341) Web UI: remove duplicating link to documentation in Options page

2017-03-09 Thread Arina Ielchiieva (JIRA)
Arina Ielchiieva created DRILL-5341:
---

 Summary: Web UI: remove duplicating link to documentation in 
Options page
 Key: DRILL-5341
 URL: https://issues.apache.org/jira/browse/DRILL-5341
 Project: Apache Drill
  Issue Type: Bug
Reporter: Arina Ielchiieva
 Attachments: doc_link.JPG

Remove link to Documentation on Options page (http://localhost:8047/options) as 
we have the same link on page header. Screenshot - doc_link.JPG



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (DRILL-5340) Web UI: improve operator profiles metrics display

2017-03-09 Thread Arina Ielchiieva (JIRA)
Arina Ielchiieva created DRILL-5340:
---

 Summary: Web UI: improve operator profiles metrics display
 Key: DRILL-5340
 URL: https://issues.apache.org/jira/browse/DRILL-5340
 Project: Apache Drill
  Issue Type: Improvement
Affects Versions: 1.10.0
Reporter: Arina Ielchiieva


1. Display date with time Fragment Profile Major Fragment in Last Update
and Last Progress columns. Date with time won't occupy a much space but will 
look friendlier: 18:19:39 -> 03/09/2017 18:19:39
Screenshot - major_fragment_time.JPG

2. Operator metrics display columns should be in java constant style:
For example: BYTES_SENT -> Bytes Sent
Screnshots: screen_operator.JPG, group_scan_operator.JPG




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (DRILL-5339) Web UI: flaws in query profile display on error

2017-03-09 Thread Arina Ielchiieva (JIRA)
Arina Ielchiieva created DRILL-5339:
---

 Summary: Web UI: flaws in query profile display on error
 Key: DRILL-5339
 URL: https://issues.apache.org/jira/browse/DRILL-5339
 Project: Apache Drill
  Issue Type: Bug
Affects Versions: 1.10.0
Reporter: Arina Ielchiieva
Priority: Minor


1. Error is shifted to the right (screenshot - error_shift.jpg)
2. When Fragment Profiles doesn't have any data table, there is offset in 
overview tab (screenshot - fragment_profiles.jpg)
3. Verbose error message tab can be designed like overview tab to be more 
concise (screenshot - verbose_error.jpg)
4. Remove three dots in the end of "Verbose error message..." .
5. When visualized plan is empty, there is big offset (screenshot - 
visualized_plan.jpg)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Re: [VOTE] Release Apache Drill 1.10.0 - rc0

2017-03-09 Thread Zelaine Fong
This looks like it’s due to the changes Kunal made in 
https://issues.apache.org/jira/browse/DRILL-5190.  Looking at the code changes, 
it appears that the indentation was intended, as it denotes that those indented 
timings are a breakdown of the overall duration.

Kunal?

-- Zelaine

On 3/9/17, 8:20 AM, "Arina Yelchiyeva"  wrote:

So far found one issue:

https://issues.apache.org/jira/browse/DRILL-5338


Kind regards
Arina

On Thu, Mar 9, 2017 at 9:31 AM, Jinfeng Ni  wrote:

> Hello all,
>
> I'd like to propose the first release candidate (rc0) of Apache Drill,
> version 1.10.0.
>
> The release candidate covers a total of 126 resolved JIRAs [1]. Thanks
> to everyone who contributed to this release.
>
> The tarball artifacts are hosted at [2] and the maven artifacts are
> hosted at [3].
>
> This release candidate is based on commit
> 38ef562b1ced59efe57b0dc606f2c36694569102 located at [4].
>
> The vote will be open for the next ~96 hours (including an extra day
> as the vote is happening over a weekend) ending at 8:00AM Pacific,
> March 13th, 2017.
>
> [ ] +1
> [ ] +0
> [ ] -1
>
> Here's my vote: +1
>
> Thanks,
>
> Jinfeng
>
> 1. https://issues.apache.org/jira/secure/ReleaseNote.jspa?
> version=12338769=12313820
> 2. http://home.apache.org/~jni/drill/1.10.0/rc0/
> 3. https://repository.apache.org/content/repositories/orgapachedrill-1041/
> 4. https://github.com/jinfengni/incubator-drill/commits/drill-1.10.0
>




Re: [VOTE] Release Apache Drill 1.10.0 - rc0

2017-03-09 Thread Arina Yelchiyeva
So far found one issue:

https://issues.apache.org/jira/browse/DRILL-5338


Kind regards
Arina

On Thu, Mar 9, 2017 at 9:31 AM, Jinfeng Ni  wrote:

> Hello all,
>
> I'd like to propose the first release candidate (rc0) of Apache Drill,
> version 1.10.0.
>
> The release candidate covers a total of 126 resolved JIRAs [1]. Thanks
> to everyone who contributed to this release.
>
> The tarball artifacts are hosted at [2] and the maven artifacts are
> hosted at [3].
>
> This release candidate is based on commit
> 38ef562b1ced59efe57b0dc606f2c36694569102 located at [4].
>
> The vote will be open for the next ~96 hours (including an extra day
> as the vote is happening over a weekend) ending at 8:00AM Pacific,
> March 13th, 2017.
>
> [ ] +1
> [ ] +0
> [ ] -1
>
> Here's my vote: +1
>
> Thanks,
>
> Jinfeng
>
> 1. https://issues.apache.org/jira/secure/ReleaseNote.jspa?
> version=12338769=12313820
> 2. http://home.apache.org/~jni/drill/1.10.0/rc0/
> 3. https://repository.apache.org/content/repositories/orgapachedrill-1041/
> 4. https://github.com/jinfengni/incubator-drill/commits/drill-1.10.0
>


[jira] [Created] (DRILL-5338) Web UI: PLANNING, QUEUED, EXECUTION in Query Profile are shifted

2017-03-09 Thread Arina Ielchiieva (JIRA)
Arina Ielchiieva created DRILL-5338:
---

 Summary: Web UI: PLANNING, QUEUED, EXECUTION in Query Profile are 
shifted
 Key: DRILL-5338
 URL: https://issues.apache.org/jira/browse/DRILL-5338
 Project: Apache Drill
  Issue Type: Bug
Affects Versions: 1.10.0
Reporter: Arina Ielchiieva


Screenshot is attached.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (DRILL-5337) OpenTSDB storage plugin

2017-03-09 Thread Dmitriy Gavrilovych (JIRA)
Dmitriy Gavrilovych created DRILL-5337:
--

 Summary: OpenTSDB storage plugin
 Key: DRILL-5337
 URL: https://issues.apache.org/jira/browse/DRILL-5337
 Project: Apache Drill
  Issue Type: New Feature
  Components: Storage - Other
Reporter: Dmitriy Gavrilovych


Storage plugin for OpenTSDB

The plugin uses REST API to work with TSDB. 
Expected queries are listed below:

SELECT * FROM openTSDB.`warp.speed.test`;
Return all elements from warp.speed.test table with default aggregator SUM

SELECT * FROM openTSDB.`(metric=warp.speed.test)`;
Return all elements from (metric=warp.speed.test) table as a previous query, 
but with alternative FROM syntax

SELECT * FROM openTSDB.`(metric=warp.speed.test, aggregator=avg)`;
Return all elements from warp.speed.test table, but with the custom aggregator

SELECT `timestamp`, sum(`aggregated value`) FROM 
openTSDB.`(metric=warp.speed.test, aggregator=avg)` GROUP BY `timestamp`;
Return aggregated and grouped value by standard drill functions from 
warp.speed.test table, but with the custom aggregator

SELECT * FROM openTSDB.`(metric=warp.speed.test, downsample=5m-avg)`
Return data limited by downsample



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (DRILL-5336) Columns returned by select over CTAS created parquet are not in correct order.

2017-03-09 Thread Khurram Faraaz (JIRA)
Khurram Faraaz created DRILL-5336:
-

 Summary: Columns returned by select over CTAS created parquet are 
not in correct order.
 Key: DRILL-5336
 URL: https://issues.apache.org/jira/browse/DRILL-5336
 Project: Apache Drill
  Issue Type: Bug
  Components: Storage - Parquet
Affects Versions: 1.10.0
Reporter: Khurram Faraaz


The ordering of the columns in the result of the SELECT over CTAS created 
parquet file is not right.
Column col_int should be present before col_chr, however col_chr appears before 
col_int, in the result of select.
Note that there is a UNION ALL in the CTAS's SELECT statement.
And each of the select statements in the UNION ALL has an ORDER BY

The problem seems to be with the use of LIMIT clause in the SELECT on 
dfs.tmp.temp_tbl_unall.

Here is the parquet schema for the CTAS created parquet file. Note that col_int 
appears before col_chr in the parquet schema too.

{noformat}
[root@centos-01 parquet-tools]# hadoop fs -get 
/tmp/temp_tbl_unall/0_0_0.parquet .
[root@centos-01 parquet-tools]# ./parquet-schema 0_0_0.parquet
message root {
  optional int32 col_int;
  optional binary col_chr (UTF8);
  optional binary col_vrchr1 (UTF8);
  optional binary col_vrchr2 (UTF8);
}
{noformat}

Drill 1.10.0 git commit id : 3dfb4972

{noformat}
0: jdbc:drill:schema=dfs.tmp> CREATE TABLE dfs.tmp.temp_tbl_unall as ( SELECT 
col_int, col_chr, col_vrchr1, col_vrchr2 FROM typeall_l order by col_int ) 
UNION ALL ( SELECT col_int, col_chr, col_vrchr1, col_vrchr2 FROM typeall_r 
order by col_int );
+---++
| Fragment  | Number of records written  |
+---++
| 0_0   | 1107   |
+---++
1 row selected (0.381 seconds)
0: jdbc:drill:schema=dfs.tmp> SELECT * FROM dfs.tmp.temp_tbl_unall ORDER BY 
col_int LIMIT 100;
+-+-+++
| col_chr | col_int | col_vrchr1 | col_vrchr2 |
+-+-+++
| MI | 0 | Felecia Gourd | NLBQMg9 |
| DE | 1 | Alvina Jenkins | f9MqJlnNettlCVGcShifgMgnzL5FrZmHysoMBe6kDtA |
| HI | 1 | Fredrick Vanderburg | 
eN3CNLW8FE5voAksuJCSYnMdJrVown7my6DiAlI8KhrG69kQoAxKFJmOHPVca1FjGyHWd5Ag53vvODvKB8YwqXcbDihjR0DDbed1cgs7L1tndiPRvU1OreN5ByB8pF0QisgwSBWRKRvS8RVOzA3CyxOpjyxVujRLLlctww0jWwn09m3iINTi6Delw
 |
| CA | 19 | John Doe | test string |
| CA | 19 | John Doe | test string |
...
 
 
| LA | 6854 | William Burk | 
5krBT7wj8BkoiRUWV9HjkyIT1DRpPj6bNixK15g4gs9IEsKc5myCyzMKQk5k1 |
++--+---+-+
| col_chr | col_int | col_vrchr1 | col_vrchr2 |
++--+---+-+
| IN | 6870 | Caroline Bell | 
M2811poVmVJLuxqsHz0jzRSGrAJDXfl3UuE0Iz8ldqvRURURvq2dO4Q1358eiureI20NCGBl9lBpoKPc78TWS0gsWhIt280E8JZPQpj7lOJXnHUmvydDiBPgAzNoGn7SSP6xYlnMyBhvWRxB5NF3I9vszosjmpW1Yx7et56QvwLfWBb3unJPnrxVYXX5tAfeyednJ4A90aOE2dhMXy1wLwewMJ91SWBEUM8TU3aGikQ5Ax6dDhDBQLaP
 |
++--+---+-+
100 rows selected (0.173 seconds)
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)