Re: [jira] (DRILL-6978) TypeOf sometimes doesn't work with "generated" tables

2019-01-18 Thread Kunal Khatua
I'm not sure why it doesn't work for the case where you have a nested function, 
since the function definition in sys.functions indicates some sort of late 
binding of the data types:

0: jdbc:drill:drillbit=kk127> select * from sys.functions where name like 
'%ypeOf%';
+--++-+---+---+
|     name     |   signature    | returnType  |  source   | internal  |
+--++-+---+---+
| drillTypeOf  | LATE-REQUIRED  | VARCHAR     | built-in  | false     |
| sqlTypeOf    | LATE-REQUIRED  | VARCHAR     | built-in  | false     |
| typeOf       | LATE-REQUIRED  | VARCHAR     | built-in  | false     |
+--++-+---+---+

Especially for the cast function, you are already aware that the return type is 
INT. 

So, it isn't like the schema is being discovered "late". 
(https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/scan/project/SchemaLevelProjection.java#L46)

Perhaps someone else with more knowledge might be able to explain the 
discrepancy and if this is an expected behavior.

~ Kunal

On 1/18/2019 1:36:02 PM, benj.dev  wrote:
Hi,

As the request of Kunal Khatua, I push this curiosity found in Drill 1.15.0
The Jira ticket is : https://issues.apache.org/jira/browse/DRILL-6978

I realized that TypeOf (drillTypeOf and sqlTypeOf) functions works
when request files but doesn't work in certain case
on "generated" data

This first request works :

SELECT typeof(md5), drillTypeOf(md5), sqlTypeOf(md5)
FROM dfs.tmp.`mytable.csv` LIMIT 2;
+--+--++
| EXPR$0 | EXPR$1 | EXPR$2 |
+--+--++
| VARCHAR | VARCHAR | CHARACTER VARYING |
| VARCHAR | VARCHAR | CHARACTER VARYING |
+--+--++


But this second doesn't :
SELECT typeOf(a) FROM (SELECT CAST (5 AS int) AS a) x;
Error: SYSTEM ERROR: IllegalArgumentException: Can not set
org.apache.drill.exec.vector.complex.reader.FieldReader field
org.apache.drill.exec.expr.fn.impl.UnionFunctions$GetType.input to
org.apache.drill.exec.expr.holders.IntHolder


And in a surprising way this third query works :
SELECT md5, typeof(t), drillTypeOf(t), sqlTypeOf(t)
FROM ((SELECT 'foo' AS t) UNION (SELECT 'bar' AS t)) x;
+---+--+--++
| md5 | EXPR$1 | EXPR$2 | EXPR$3 |
+---+--+--++
| foo | VARCHAR | VARCHAR | CHARACTER VARYING |
| bar | VARCHAR | VARCHAR | CHARACTER VARYING |
+---+--+--++

Thanks for any explanation and/or correction if necessary.


[jira] [Resolved] (DRILL-6972) Error: Could not find or load main class sqlline.SqlLine

2019-01-18 Thread Kunal Khatua (JIRA)


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

Kunal Khatua resolved DRILL-6972.
-
Resolution: Works for Me

[~elenacampean] this worked for me with the latest Apache 1.15.0 release. 
I am on a Windows 10 64-bit machine.

Here is the console output captured:
{code}
C:\Users\kkhatua\Downloads\ttl_3month\apache-drill-1.15.0.tar\apache-drill-1.15.0>dir
 Volume in drive C is Windows
 Volume Serial Number is 6C77-5BE3

 Directory of 
C:\Users\kkhatua\Downloads\ttl_3month\apache-drill-1.15.0.tar\apache-drill-1.15.0

01/18/2019  01:19 PM  .
01/18/2019  01:19 PM  ..
01/18/2019  01:19 PM  bin
01/18/2019  01:19 PM  conf
12/24/2018  10:30 AM   941 git.properties
01/18/2019  01:19 PM  jars
12/24/2018  09:29 AM46,514 KEYS
12/24/2018  09:29 AM63,245 LICENSE
12/24/2018  09:29 AM   238 NOTICE
12/24/2018  09:29 AM 1,301 README.md
01/18/2019  01:19 PM  sample-data
   5 File(s)112,239 bytes
   6 Dir(s)  351,264,067,584 bytes free

C:\Users\kkhatua\Downloads\ttl_3month\apache-drill-1.15.0.tar\apache-drill-1.15.0>type
 git.properties
#Generated by Git-Commit-Id-Plugin
#Mon Dec 24 20:30:32 EET 2018
git.branch=8743e8f1e8d5bca4d67c94d07a8560ad356ff2b6
git.build.host=vitalii-pc
git.build.time=24.12.2018 @ 20\:30\:32 EET
git.build.user.email=vitalii.dira...@gmail.com
git.build.user.name=Vitalii Diravka
git.build.version=1.15.0
git.closest.tag.commit.count=0
git.closest.tag.name=drill-1.15.0
git.commit.id=8743e8f1e8d5bca4d67c94d07a8560ad356ff2b6
git.commit.id.abbrev=8743e8f
git.commit.id.describe=drill-1.15.0-0-g8743e8f
git.commit.id.describe-short=drill-1.15.0-0
git.commit.message.full=[maven-release-plugin] prepare release drill-1.15.0
git.commit.message.short=[maven-release-plugin] prepare release drill-1.15.0
git.commit.time=24.12.2018 @ 20\:09\:05 EET
git.commit.user.email=vitalii.dira...@gmail.com
git.commit.user.name=Vitalii Diravka
git.dirty=false
git.remote.origin.url=https\://github.com/apache/drill.git
git.tags=drill-1.15.0
git.total.commit.count=3407

C:\Users\kkhatua\Downloads\ttl_3month\apache-drill-1.15.0.tar\apache-drill-1.15.0>cd
 bin

C:\Users\kkhatua\Downloads\ttl_3month\apache-drill-1.15.0.tar\apache-drill-1.15.0\bin>sqlline
 -u "jdbc:drill:zk=local"
DRILL_ARGS - " -u jdbc:drill:zk=local"
HADOOP_HOME not detected...
HBASE_HOME not detected...
Calculating Drill classpath...
Exception in thread "main" java.lang.IllegalArgumentException: Bad history file 
syntax! The history file `C:\Users\kkhatua\sqlline\history` may be an older 
history: please remove it or use a different history file.
at 
org.jline.reader.impl.history.DefaultHistory.addHistoryLine(DefaultHistory.java:104)
at 
org.jline.reader.impl.history.DefaultHistory.lambda$load$0(DefaultHistory.java:86)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at 
java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at 
java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
at 
org.jline.reader.impl.history.DefaultHistory.load(DefaultHistory.java:86)
at 
org.jline.reader.impl.history.DefaultHistory.attach(DefaultHistory.java:69)
at sqlline.SqlLine.getConsoleReader(SqlLine.java:614)
at sqlline.SqlLine.begin(SqlLine.java:510)
at sqlline.SqlLine.start(SqlLine.java:264)
at sqlline.SqlLine.main(SqlLine.java:195)

C:\Users\kkhatua\Downloads\ttl_3month\apache-drill-1.15.0.tar\apache-drill-1.15.0\bin>del
 C:\Users\kkhatua\sqlline\history

C:\Users\kkhatua\Downloads\ttl_3month\apache-drill-1.15.0.tar\apache-drill-1.15.0\bin>sqlline
 -u "jdbc:drill:zk=local"
DRILL_ARGS - " -u jdbc:drill:zk=local"
HADOOP_HOME not detected...
HBASE_HOME not detected...
Calculating Drill classpath...
Apache Drill 1.15.0
"Just Drill It."
0: jdbc:drill:zk=local> select * from sys.drillbits;
+-++---+++--+--+-+
|  hostname   | user_port  | control_port  | data_port  | http_port  | current  
| version  |  state  |
+-++---+++--+--+-+
| t470s-1196  | 31010  | 31011 | 31012  | 8047   | true 
| 1.15.0   | ONLINE  |
+-++---+++--+--+-+
1 row selected (2.941 seconds)
0: jdbc:drill:zk=local> !q
Closing: org.apache.drill.jdbc.impl.DrillConnectionImpl

{code}

> Error: Could not find or load main class sqlline.SqlLine
> 
>
> Key: DRILL-6972
> URL: https://issues.apache.org/jira/browse/DRILL-6972
> Project: Apache Drill

[jira] (DRILL-6978) TypeOf sometimes doesn't work with "generated" tables

2019-01-18 Thread benj.dev
Hi,

As the request of Kunal Khatua, I push this curiosity found in Drill 1.15.0
The Jira ticket is : https://issues.apache.org/jira/browse/DRILL-6978

I realized that TypeOf (drillTypeOf and sqlTypeOf) functions works
when request files but doesn't work in certain case
on "generated" data

This first request works :

SELECT typeof(md5), drillTypeOf(md5), sqlTypeOf(md5)
FROM dfs.tmp.`mytable.csv` LIMIT 2;
+--+--++
|  EXPR$0  |  EXPR$1  |   EXPR$2   |
+--+--++
| VARCHAR  | VARCHAR  | CHARACTER VARYING  |
| VARCHAR  | VARCHAR  | CHARACTER VARYING  |
+--+--++


But this second doesn't :
SELECT typeOf(a) FROM (SELECT CAST (5 AS int) AS a) x;
Error: SYSTEM ERROR: IllegalArgumentException: Can not set
org.apache.drill.exec.vector.complex.reader.FieldReader field
org.apache.drill.exec.expr.fn.impl.UnionFunctions$GetType.input to
org.apache.drill.exec.expr.holders.IntHolder


And in a surprising way this third query works :
SELECT md5, typeof(t), drillTypeOf(t), sqlTypeOf(t)
FROM ((SELECT 'foo' AS t) UNION (SELECT 'bar' AS t)) x;
+---+--+--++
|  md5  |  EXPR$1  |  EXPR$2  |   EXPR$3   |
+---+--+--++
| foo   | VARCHAR  | VARCHAR  | CHARACTER VARYING  |
| bar   | VARCHAR  | VARCHAR  | CHARACTER VARYING  |
+---+--+--++

Thanks for any explanation and/or correction if necessary.


[GitHub] kkhatua commented on issue #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-18 Thread GitBox
kkhatua commented on issue #1594: DRILL-6942: Provide ability to sort list of 
profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#issuecomment-455667056
 
 
   Thanks for fixing that, @vdiravka  !


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Re: Beginner Jira Bugs

2019-01-18 Thread Paul Rogers
Hi Vamsi,

Another way to get started is to create a UDF or file reader. Charles can 
probably suggest a few that he has not had time to create yet. And, I'll put in 
a shameless plug for our book, Learning Apache Drill, from O'Reilly which walks 
you though how to set up your dev environment, how to create a UDF and how to 
create a simple file format plug-in.

Oh, and please do give us feedback on both the web materials and the book: you 
are in a great position to tell us what is missing for newbies such as yourself.

Thanks,
- Paul

 

On Friday, January 18, 2019, 4:11:23 AM PST, Vitalii Diravka 
 wrote:  
 
 Hi Vamsi,

Nice to hear from you. Welcome!

To start with NewBie/Beginner issues is a great idea.
You can pick any ticket, which you like to solve. This may be related to
some Drill components you are interested in.

Regarding documentation for devs you can find it here:
https://github.com/apache/drill/tree/master/docs/dev
https://github.com/paul-rogers/drill/wiki

Kind regards
Vitalii


On Fri, Jan 18, 2019 at 12:31 PM srungarapu vamsi 
wrote:

> Hi,
>
> I find Drill Apache project interesting and i want to contribute to the
> project. I have cloned the source code, compiled it on my laptop. I am
> going through the code base , documentation available on the website
>  and  Dremel paper
> <
> https://storage.googleapis.com/pub-tools-public-publication-data/pdf/36632.pdf
> >
> .
>
> I see that all the Drill issues are tracked in Jira (
> https://issues.apache.org/jira/projects/DRILL/summary). Are there any
> labels available so that i can browse through NewBie/Beginner issues ?
> If not, is there any other way i can quickly ramp up on the Drill code base
> so that i can start contributing back as early as possible ?
>
> Thanks,
> /Vamsi
>
>
> --
> /Vamsi
>
  

[GitHub] kkhatua commented on a change in pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-18 Thread GitBox
kkhatua commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r249155738
 
 

 ##
 File path: exec/java-exec/src/main/resources/rest/profile/profile.ftl
 ##
 @@ -97,19 +97,6 @@
 };
 
 

[GitHub] asfgit closed pull request #1610: DRILL-6969: Fix inconsistency of reading MaprDB JSON tables using hive plugin when native reader is enabled

2019-01-18 Thread GitBox
asfgit closed pull request #1610: DRILL-6969: Fix inconsistency of reading 
MaprDB JSON tables using hive plugin when native reader is enabled
URL: https://github.com/apache/drill/pull/1610
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit closed pull request #1611: DRILL-6971: Display query state in query result page

2019-01-18 Thread GitBox
asfgit closed pull request #1611: DRILL-6971: Display query state in query 
result page
URL: https://github.com/apache/drill/pull/1611
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit closed pull request #1609: DRILL-6967: Fix TIMESTAMPDIFF function for QUARTER qualifier

2019-01-18 Thread GitBox
asfgit closed pull request #1609: DRILL-6967: Fix TIMESTAMPDIFF function for 
QUARTER qualifier
URL: https://github.com/apache/drill/pull/1609
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit closed pull request #1602: DRILL-6944: UnsupportedOperationException thrown for view over MapR-DB binary table

2019-01-18 Thread GitBox
asfgit closed pull request #1602: DRILL-6944: UnsupportedOperationException 
thrown for view over MapR-DB binary table
URL: https://github.com/apache/drill/pull/1602
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit closed pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-18 Thread GitBox
asfgit closed pull request #1594: DRILL-6942: Provide ability to sort list of 
profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] arina-ielchiieva opened a new pull request #1615: DRILL-6964: Implement CREATE / DROP TABLE SCHEMA commands

2019-01-18 Thread GitBox
arina-ielchiieva opened a new pull request #1615: DRILL-6964: Implement CREATE 
/ DROP TABLE SCHEMA commands
URL: https://github.com/apache/drill/pull/1615
 
 
   Note: this PR only adds support for CREATE / DROP TABLE SCHEMA commands 
which allow to store and delete table schema. Table schema usage during 
querying the data will be covered in other PRs.
   
   1. Added parser methods / handles to parse CREATE / DROP TABLE schema 
commands.
   2. Added TableSchemaProviders classes to separate ways of schema provision 
(file, table function).
   3. Added table schema parsing using ANTLR4 (lexer, parser, visitors).
   4. Added appropriate unit tests.
   
   Details in [DRILL-6964](https://issues.apache.org/jira/browse/DRILL-6964).


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] arina-ielchiieva commented on issue #335: DRILL-4303: ESRI Shapefile (shp) format plugin

2019-01-18 Thread GitBox
arina-ielchiieva commented on issue #335: DRILL-4303: ESRI Shapefile (shp) 
format plugin
URL: https://github.com/apache/drill/pull/335#issuecomment-455542002
 
 
   @cgivre process as usual, you wait from the original contributor feedback 
for a week or so. Then if no response or contributor is ok with you finishing 
his work, you cherry-pick his changes (squash in one commit) to preserve 
original author and then make your changes on top as them as second commit.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] cgivre commented on issue #335: DRILL-4303: ESRI Shapefile (shp) format plugin

2019-01-18 Thread GitBox
cgivre commented on issue #335: DRILL-4303: ESRI Shapefile (shp) format plugin
URL: https://github.com/apache/drill/pull/335#issuecomment-455541113
 
 
   Hello @k255, 
   Do you have time/interest in completing this PR?  If not, do you mind if I 
see this through to completion?
   
   @arina-ielchiieva, @vdiravka 
   What would I have to do in order to get this across the finish line?
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Re: Beginner Jira Bugs

2019-01-18 Thread Vitalii Diravka
Hi Vamsi,

Nice to hear from you. Welcome!

To start with NewBie/Beginner issues is a great idea.
You can pick any ticket, which you like to solve. This may be related to
some Drill components you are interested in.

Regarding documentation for devs you can find it here:
https://github.com/apache/drill/tree/master/docs/dev
https://github.com/paul-rogers/drill/wiki

Kind regards
Vitalii


On Fri, Jan 18, 2019 at 12:31 PM srungarapu vamsi 
wrote:

> Hi,
>
> I find Drill Apache project interesting and i want to contribute to the
> project. I have cloned the source code, compiled it on my laptop. I am
> going through the code base , documentation available on the website
>  and  Dremel paper
> <
> https://storage.googleapis.com/pub-tools-public-publication-data/pdf/36632.pdf
> >
> .
>
> I see that all the Drill issues are tracked in Jira (
> https://issues.apache.org/jira/projects/DRILL/summary). Are there any
> labels available so that i can browse through NewBie/Beginner issues ?
> If not, is there any other way i can quickly ramp up on the Drill code base
> so that i can start contributing back as early as possible ?
>
> Thanks,
> /Vamsi
>
>
> --
> /Vamsi
>


[GitHub] vdiravka commented on a change in pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-18 Thread GitBox
vdiravka commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r249017671
 
 

 ##
 File path: exec/java-exec/src/main/resources/rest/profile/profile.ftl
 ##
 @@ -97,19 +97,6 @@
 };
 
 

[GitHub] vdiravka commented on a change in pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-18 Thread GitBox
vdiravka commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r249015464
 
 

 ##
 File path: exec/java-exec/src/main/resources/rest/profile/profile.ftl
 ##
 @@ -97,19 +97,6 @@
 };
 
 

[GitHub] vdiravka commented on a change in pull request #1594: DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

2019-01-18 Thread GitBox
vdiravka commented on a change in pull request #1594: DRILL-6942: Provide 
ability to sort list of profiles on Drill Web UI
URL: https://github.com/apache/drill/pull/1594#discussion_r249017671
 
 

 ##
 File path: exec/java-exec/src/main/resources/rest/profile/profile.ftl
 ##
 @@ -97,19 +97,6 @@
 };
 
 

Beginner Jira Bugs

2019-01-18 Thread srungarapu vamsi
Hi,

I find Drill Apache project interesting and i want to contribute to the
project. I have cloned the source code, compiled it on my laptop. I am
going through the code base , documentation available on the website
 and  Dremel paper

.

I see that all the Drill issues are tracked in Jira (
https://issues.apache.org/jira/projects/DRILL/summary). Are there any
labels available so that i can browse through NewBie/Beginner issues ?
If not, is there any other way i can quickly ramp up on the Drill code base
so that i can start contributing back as early as possible ?

Thanks,
/Vamsi