[GitHub] drill pull request: DRILL-4410: ListVector should initialize bits ...

2016-02-17 Thread minji-kim
Github user minji-kim commented on the pull request:

https://github.com/apache/drill/pull/380#issuecomment-185577973
  
That's a good point.  Just uploaded small patch to generate it.


---
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.
---


[jira] [Created] (DRILL-4412) Have an array of DrillBitEndPoints (at least) for leaf fragments instead of single one

2016-02-17 Thread Yuliya Feldman (JIRA)
Yuliya Feldman created DRILL-4412:
-

 Summary: Have an array of DrillBitEndPoints (at least) for leaf 
fragments instead of single one
 Key: DRILL-4412
 URL: https://issues.apache.org/jira/browse/DRILL-4412
 Project: Apache Drill
  Issue Type: Improvement
  Components: Query Planning & Optimization
Reporter: Yuliya Feldman
Assignee: Yuliya Feldman


To follow up on the ability to submit simple physical plan directly to a 
DrillBit for execution 
[JIRA-4132|https://issues.apache.org/jira/browse/DRILL-4132] it would be 
beneficial to have an array of DrillBitEndPoint in PlanFragment. Leaf fragments 
that scan the data can have an array of DrillBitEndPoint based on data 
locality, as data may be replicated and in case it is necessary to restart Scan 
fragment it can be restarted on DrillBits that have replica of the data, versus 
always retrying the same DrillBit.



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


[jira] [Created] (DRILL-4411) HashJoin should not only depend on number of records, but also on size

2016-02-17 Thread MinJi Kim (JIRA)
MinJi Kim created DRILL-4411:


 Summary: HashJoin should not only depend on number of records, but 
also on size
 Key: DRILL-4411
 URL: https://issues.apache.org/jira/browse/DRILL-4411
 Project: Apache Drill
  Issue Type: Bug
  Components:  Server
Reporter: MinJi Kim


In HashJoinProbeTemplate, each batch is limited to TARGET_RECORDS_PER_BATCH 
(4000).  But we should not only depend on the number of records, but also size 
(in case of extremely large records).



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


[GitHub] drill pull request: DRILL-4410: ListVector should initialize bits ...

2016-02-17 Thread jaltekruse
Github user jaltekruse commented on the pull request:

https://github.com/apache/drill/pull/380#issuecomment-185568844
  
Can you generate these files in the tests rather than check them in?


---
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: DRILL-4410: ListVector should initialize bits ...

2016-02-17 Thread minji-kim
GitHub user minji-kim opened a pull request:

https://github.com/apache/drill/pull/380

DRILL-4410: ListVector should initialize bits in allocateNew

ListVector does not initialize bits, but various ValueVectors depend on 
bits being initialized.  ONe of the side effects of not having bits set is that 
for each batch, the ValueVector will reAlloc() with 2x the previous buffer size 
(regardless of whether it needs it or not).  If there are enough batches, this 
results in reAlloc() request of size > Integer.MAX, which triggers 
out-of-memory/max-buffer exception.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/minji-kim/drill DRILL-4410

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/drill/pull/380.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #380


commit ca4ca48482c5066a07cd2727853c5a73df334519
Author: Minji Kim 
Date:   2016-02-18T06:29:11Z

DRILL-4410: ListVector should initialize bits in allocateNew




---
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.
---


[jira] [Created] (DRILL-4410) ListVector causes OversizedAllocationException

2016-02-17 Thread MinJi Kim (JIRA)
MinJi Kim created DRILL-4410:


 Summary: ListVector causes OversizedAllocationException
 Key: DRILL-4410
 URL: https://issues.apache.org/jira/browse/DRILL-4410
 Project: Apache Drill
  Issue Type: Bug
  Components:  Server
Reporter: MinJi Kim


Reading large data set with array/list causes the following problem.  This 
happens when union type is enabled.

(org.apache.drill.exec.exception.OversizedAllocationException) Unable to expand 
the buffer. Max allowed buffer size is reached.
org.apache.drill.exec.vector.UInt1Vector.reAlloc():214
org.apache.drill.exec.vector.UInt1Vector$Mutator.setSafe():406
org.apache.drill.exec.vector.complex.ListVector$Mutator.setNotNull():298
org.apache.drill.exec.vector.complex.ListVector$Mutator.startNewValue():307
org.apache.drill.exec.vector.complex.impl.UnionListWriter.startList():563
org.apache.drill.exec.vector.complex.impl.ComplexCopier.writeValue():115
org.apache.drill.exec.vector.complex.impl.ComplexCopier.copy():100
org.apache.drill.exec.vector.complex.ListVector.copyFrom():97
org.apache.drill.exec.vector.complex.ListVector.copyFromSafe():89
org.apache.drill.exec.test.generated.HashJoinProbeGen197.projectBuildRecord():356
org.apache.drill.exec.test.generated.HashJoinProbeGen197.executeProbePhase():173
org.apache.drill.exec.test.generated.HashJoinProbeGen197.probeAndProject():223
org.apache.drill.exec.physical.impl.join.HashJoinBatch.innerNext():233
org.apache.drill.exec.record.AbstractRecordBatch.next():162
org.apache.drill.exec.record.AbstractRecordBatch.next():119
org.apache.drill.exec.record.AbstractRecordBatch.next():109
org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():51
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext():129
org.apache.drill.exec.record.AbstractRecordBatch.next():162
org.apache.drill.exec.record.AbstractRecordBatch.next():119
org.apache.drill.exec.record.AbstractRecordBatch.next():109
org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():51
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext():129
org.apache.drill.exec.record.AbstractRecordBatch.next():162
org.apache.drill.exec.physical.impl.BaseRootExec.next():104
org.apache.drill.exec.physical.impl.SingleSenderCreator$SingleSenderRootExec.innerNext():92
org.apache.drill.exec.physical.impl.BaseRootExec.next():94
org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():257
org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():251
java.security.AccessController.doPrivileged():-2
javax.security.auth.Subject.doAs():422
org.apache.hadoop.security.UserGroupInformation.doAs():1657
org.apache.drill.exec.work.fragment.FragmentExecutor.run():251
org.apache.drill.common.SelfCleaningRunnable.run():38
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745 (state=,code=0)



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


[jira] [Created] (DRILL-4409) projecting literal will result in an empty resultset

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4409:
-

 Summary: projecting literal will result in an empty resultset
 Key: DRILL-4409
 URL: https://issues.apache.org/jira/browse/DRILL-4409
 Project: Apache Drill
  Issue Type: Bug
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell


A query which projects a literal as shown against a Postgres table will result 
in an empty result set being returned. 

select 'BB' from postgres.public.tversion





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


[jira] [Created] (DRILL-4408) re-written query projecting an aggregate on a boolean not supported by Postgres

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4408:
-

 Summary: re-written query projecting an aggregate on a boolean not 
supported by Postgres
 Key: DRILL-4408
 URL: https://issues.apache.org/jira/browse/DRILL-4408
 Project: Apache Drill
  Issue Type: Bug
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell


select rnum, c1, c2 from postgres.public.tset1 as t1 where exists ( select c1 
from postgres.public.tset2 where c1 = t1.c1 )


Error: DATA_READ ERROR: The JDBC storage plugin failed while trying setup the 
SQL query. 

sql SELECT *
FROM "public"."tset1"
INNER JOIN (SELECT "c10", MIN("$f0") AS "$f1"
FROM (SELECT "t0"."c1" AS "c10", TRUE AS "$f0"
FROM "public"."tset2"
INNER JOIN (SELECT "c1"
FROM (SELECT "c1"
FROM "public"."tset1") AS "t"
GROUP BY "c1") AS "t0" ON "tset2"."c1" = "t0"."c1") AS "t1"
GROUP BY "c10") AS "t2" ON "tset1"."c1" = "t2"."c10"
plugin postgres
Fragment 0:0

[Error Id: a00cd446-f168-463c-b2b9-bb3d6b43e729 on centos1:31010]

  (org.postgresql.util.PSQLException) ERROR: function min(boolean) does not 
exist
  Hint: No function matches the given name and argument types. You might need 
to add explicit type casts.
  Position: 58
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse():2182
org.postgresql.core.v3.QueryExecutorImpl.processResults():1911
org.postgresql.core.v3.QueryExecutorImpl.execute():173
org.postgresql.jdbc.PgStatement.execute():622
org.postgresql.jdbc.PgStatement.executeWithFlags():458
org.postgresql.jdbc.PgStatement.executeQuery():374
org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
org.apache.drill.exec.store.jdbc.JdbcRecordReader.setup():177
org.apache.drill.exec.physical.impl.ScanBatch.():108
org.apache.drill.exec.physical.impl.ScanBatch.():136
org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():40
org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():33
org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():147
org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():127
org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():127
org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
org.apache.drill.exec.physical.impl.ImplCreator.getRootExec():101
org.apache.drill.exec.physical.impl.ImplCreator.getExec():79
org.apache.drill.exec.work.fragment.FragmentExecutor.run():230
org.apache.drill.common.SelfCleaningRunnable.run():38
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745

SQLState:  null
ErrorCode: 0

create table TSET1 (RNUM integer   not null , C1 integer, C2 char(3));
create table TSET2 (RNUM integer   not null , C1 integer, C2 char(3));



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


[jira] [Created] (DRILL-4407) Group by subsquery causes Java NPE

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4407:
-

 Summary: Group by subsquery causes Java NPE
 Key: DRILL-4407
 URL: https://issues.apache.org/jira/browse/DRILL-4407
 Project: Apache Drill
  Issue Type: Bug
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell


select count(*) from postgres.public.tjoin2  group by ( select c1 from 
postgres.public.tjoin1 where rnum = 0)


Error: VALIDATION ERROR: java.lang.NullPointerException


[Error Id: d3453085-d77c-484e-8df7-f5fadc7bcc7d on centos1:31010]

  (org.apache.calcite.tools.ValidationException) java.lang.NullPointerException
org.apache.calcite.prepare.PlannerImpl.validate():189
org.apache.calcite.prepare.PlannerImpl.validateAndGetType():198

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateNode():451

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert():198
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():167
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():199
org.apache.drill.exec.work.foreman.Foreman.runSQL():924
org.apache.drill.exec.work.foreman.Foreman.run():250
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745
  Caused By (java.lang.NullPointerException) null

org.apache.calcite.sql.validate.SqlValidatorUtil$ExpansionAndDeepCopier.visit():633

org.apache.calcite.sql.validate.SqlValidatorUtil$ExpansionAndDeepCopier.visit():619
org.apache.calcite.sql.SqlIdentifier.accept():274
org.apache.calcite.sql.validate.SqlValidatorUtil$DeepCopier.visit():676
org.apache.calcite.sql.validate.SqlValidatorUtil$DeepCopier.visit():663
org.apache.calcite.sql.SqlNodeList.accept():152

org.apache.calcite.sql.util.SqlShuttle$CallCopyingArgHandler.visitChild():134

org.apache.calcite.sql.util.SqlShuttle$CallCopyingArgHandler.visitChild():101
org.apache.calcite.sql.SqlOperator.acceptCall():720
org.apache.calcite.sql.SqlSelectOperator.acceptCall():128

org.apache.calcite.sql.validate.SqlValidatorUtil$DeepCopier.visitScoped():686
org.apache.calcite.sql.validate.SqlScopedShuttle.visit():50
org.apache.calcite.sql.validate.SqlScopedShuttle.visit():32
org.apache.calcite.sql.SqlCall.accept():130
org.apache.calcite.sql.validate.SqlValidatorUtil$DeepCopier.visit():676
org.apache.calcite.sql.validate.SqlValidatorUtil$DeepCopier.visit():663
org.apache.calcite.sql.SqlNodeList.accept():152

org.apache.calcite.sql.validate.SqlValidatorUtil$ExpansionAndDeepCopier.copy():626
org.apache.calcite.sql.validate.AggregatingSelectScope.():92
org.apache.calcite.sql.validate.SqlValidatorImpl.registerQuery():2200
org.apache.calcite.sql.validate.SqlValidatorImpl.registerQuery():2122

org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression():835
org.apache.calcite.sql.validate.SqlValidatorImpl.validate():551
org.apache.calcite.prepare.PlannerImpl.validate():187
org.apache.calcite.prepare.PlannerImpl.validateAndGetType():198

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateNode():451

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert():198
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():167
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():199
org.apache.drill.exec.work.foreman.Foreman.runSQL():924
org.apache.drill.exec.work.foreman.Foreman.run():250
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745

SQLState:  null
ErrorCode: 0


create table TJOIN1 (RNUM integer   not null , C1 integer, C2 integer);
create table TJOIN2 (RNUM integer   not null , C1 integer, C2 char(2));




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


[jira] [Created] (DRILL-4406) extract () Error: SYSTEM ERROR: ClassCastException. Caused By (java.lang.ClassCastException)

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4406:
-

 Summary: extract () Error: SYSTEM ERROR: ClassCastException. 
Caused By (java.lang.ClassCastException) 
 Key: DRILL-4406
 URL: https://issues.apache.org/jira/browse/DRILL-4406
 Project: Apache Drill
  Issue Type: Bug
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell
 Fix For: 1.5.0


Trying to extract( ) from a Postgres timestamp column fails

create table TTS ( RNUM integer  not null , CTS timestamp(3 ) ) ;

Error: SYSTEM ERROR: ClassCastException


[Error Id: 4a6a1f6e-1caa-42c4-b44c-8db62146 on centos1:31010]

  (org.apache.drill.exec.work.foreman.ForemanException) Unexpected exception 
during fragment initialization: null
org.apache.drill.exec.work.foreman.Foreman.run():261
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745
  Caused By (java.lang.ClassCastException) null

SQLState:  null
ErrorCode: 0



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


[jira] [Created] (DRILL-4405) invalid Postgres SQL generated for CONCAT (literal, literal)

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4405:
-

 Summary: invalid Postgres SQL generated for CONCAT (literal, 
literal) 
 Key: DRILL-4405
 URL: https://issues.apache.org/jira/browse/DRILL-4405
 Project: Apache Drill
  Issue Type: Bug
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell


select concat( 'FF' , 'FF' )  from postgres.public.tversion

Error: DATA_READ ERROR: The JDBC storage plugin failed while trying setup the 
SQL query. 

sql SELECT CAST('' AS ANY) AS "EXPR$0"
FROM "public"."tversion"
plugin postgres
Fragment 0:0

[Error Id: c3f24106-8d75-4a57-a638-ac5f0aca0769 on centos1:31010]

  (org.postgresql.util.PSQLException) ERROR: syntax error at or near "ANY"
  Position: 23
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse():2182
org.postgresql.core.v3.QueryExecutorImpl.processResults():1911
org.postgresql.core.v3.QueryExecutorImpl.execute():173
org.postgresql.jdbc.PgStatement.execute():622
org.postgresql.jdbc.PgStatement.executeWithFlags():458
org.postgresql.jdbc.PgStatement.executeQuery():374
org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
org.apache.drill.exec.store.jdbc.JdbcRecordReader.setup():177
org.apache.drill.exec.physical.impl.ScanBatch.():108
org.apache.drill.exec.physical.impl.ScanBatch.():136
org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():40
org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():33
org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():147
org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
org.apache.drill.exec.physical.impl.ImplCreator.getRootExec():101
org.apache.drill.exec.physical.impl.ImplCreator.getExec():79
org.apache.drill.exec.work.fragment.FragmentExecutor.run():230
org.apache.drill.common.SelfCleaningRunnable.run():38
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745

SQLState:  null
ErrorCode: 0



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


[jira] [Created] (DRILL-4404) Java NPE. Unexpected exception during fragment initialization

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4404:
-

 Summary: Java NPE.  Unexpected exception during fragment 
initialization
 Key: DRILL-4404
 URL: https://issues.apache.org/jira/browse/DRILL-4404
 Project: Apache Drill
  Issue Type: Bug
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell


Error: SYSTEM ERROR: NullPointerException


[Error Id: a290df2c-d3ff-4229-bf26-50d0b6992d77 on centos1:31010]

  (org.apache.drill.exec.work.foreman.ForemanException) Unexpected exception 
during fragment initialization: Internal error: Error while applying rule 
ReduceExpressionsRule_Project, args 
[rel#830960:LogicalProject.NONE.ANY([]).[](input=rel#830959:Subset#0.JDBC.postgres.ANY([]).[],EXPR$0=-(*(2,
 2)))]
org.apache.drill.exec.work.foreman.Foreman.run():261
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745
  Caused By (java.lang.AssertionError) Internal error: Error while applying 
rule ReduceExpressionsRule_Project, args 
[rel#830960:LogicalProject.NONE.ANY([]).[](input=rel#830959:Subset#0.JDBC.postgres.ANY([]).[],EXPR$0=-(*(2,
 2)))]
org.apache.calcite.util.Util.newInternal():792
org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch():251
org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp():808
org.apache.calcite.tools.Programs$RuleSetProgram.run():303
org.apache.calcite.prepare.PlannerImpl.transform():313

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.doLogicalPlanning():542

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():218

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():252
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():172
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():199
org.apache.drill.exec.work.foreman.Foreman.runSQL():924
org.apache.drill.exec.work.foreman.Foreman.run():250
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745
  Caused By (java.lang.NullPointerException) null
org.apache.drill.exec.planner.logical.DrillOptiq$RexToDrill.visitCall():131
org.apache.drill.exec.planner.logical.DrillOptiq$RexToDrill.visitCall():79
org.apache.calcite.rex.RexCall.accept():107
org.apache.drill.exec.planner.logical.DrillOptiq.toDrill():76
org.apache.drill.exec.planner.logical.DrillConstExecutor.reduce():162
org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressions():499
org.apache.calcite.rel.rules.ReduceExpressionsRule$1.onMatch():241
org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch():228
org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp():808
org.apache.calcite.tools.Programs$RuleSetProgram.run():303
org.apache.calcite.prepare.PlannerImpl.transform():313

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.doLogicalPlanning():542

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():218

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():252
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():172
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():199
org.apache.drill.exec.work.foreman.Foreman.runSQL():924
org.apache.drill.exec.work.foreman.Foreman.run():250
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745

SQLState:  null
ErrorCode: 0



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


[jira] [Created] (DRILL-4403) AssertionError: Internal error: Conversion to relational algebra failed to preserve datatypes

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4403:
-

 Summary:  AssertionError: Internal error: Conversion to relational 
algebra failed to preserve datatypes
 Key: DRILL-4403
 URL: https://issues.apache.org/jira/browse/DRILL-4403
 Project: Apache Drill
  Issue Type: Bug
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell


select rnum, c1, c2, c3, stddev_pop( c3 ) over(partition by c1) from 
postgres.public.tolap

Error: SYSTEM ERROR: AssertionError: Internal error: Conversion to relational 
algebra failed to preserve datatypes:
validated type:
RecordType(INTEGER NOT NULL rnum, CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" c1, CHAR(2) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" c2, INTEGER c3, INTEGER EXPR$4) NOT NULL
converted type:
RecordType(INTEGER NOT NULL rnum, CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" c1, CHAR(2) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" c2, INTEGER c3, DOUBLE EXPR$4) NOT NULL
rel:
LogicalProject(rnum=[$0], c1=[$1], c2=[$2], c3=[$3], 
EXPR$4=[POWER(/(CastHigh(-(SUM(*(CastHigh($3), CastHigh($3))) OVER (PARTITION 
BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING), 
/(*(SUM(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING 
AND UNBOUNDED FOLLOWING), SUM(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN 
UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)), COUNT(CastHigh($3)) OVER 
(PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING, 
COUNT(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND 
UNBOUNDED FOLLOWING)), 0.5)])
  LogicalTableScan(table=[[postgres, public, tolap]])



[Error Id: 61be4aa1-6486-4118-a82b-86c22b551bb5 on centos1:31010]

  (org.apache.drill.exec.work.foreman.ForemanException) Unexpected exception 
during fragment initialization: Internal error: Conversion to relational 
algebra failed to preserve datatypes:
validated type:
RecordType(INTEGER NOT NULL rnum, CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" c1, CHAR(2) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" c2, INTEGER c3, INTEGER EXPR$4) NOT NULL
converted type:
RecordType(INTEGER NOT NULL rnum, CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" c1, CHAR(2) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" c2, INTEGER c3, DOUBLE EXPR$4) NOT NULL
rel:
LogicalProject(rnum=[$0], c1=[$1], c2=[$2], c3=[$3], 
EXPR$4=[POWER(/(CastHigh(-(SUM(*(CastHigh($3), CastHigh($3))) OVER (PARTITION 
BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING), 
/(*(SUM(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING 
AND UNBOUNDED FOLLOWING), SUM(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN 
UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)), COUNT(CastHigh($3)) OVER 
(PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING, 
COUNT(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND 
UNBOUNDED FOLLOWING)), 0.5)])
  LogicalTableScan(table=[[postgres, public, tolap]])

org.apache.drill.exec.work.foreman.Foreman.run():261
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745
  Caused By (java.lang.AssertionError) Internal error: Conversion to relational 
algebra failed to preserve datatypes:
validated type:
RecordType(INTEGER NOT NULL rnum, CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" c1, CHAR(2) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" c2, INTEGER c3, INTEGER EXPR$4) NOT NULL
converted type:
RecordType(INTEGER NOT NULL rnum, CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" c1, CHAR(2) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" c2, INTEGER c3, DOUBLE EXPR$4) NOT NULL
rel:
LogicalProject(rnum=[$0], c1=[$1], c2=[$2], c3=[$3], 
EXPR$4=[POWER(/(CastHigh(-(SUM(*(CastHigh($3), CastHigh($3))) OVER (PARTITION 
BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING), 
/(*(SUM(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING 
AND UNBOUNDED FOLLOWING), SUM(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN 
UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)), COUNT(CastHigh($3)) OVER 
(PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING, 
COUNT(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND 
UNBOUNDED FOLLOWING)), 0.5)])
  LogicalTableScan(table=[[postgres, public, tolap]])

org.apache.calcite.util.Util.newInternal():777
org.apache.calcite.sql2rel.SqlToRelConverter.checkConvertedType():435
org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery():541
org.apache.calcite.prepare.PlannerImpl.convert():214


[jira] [Created] (DRILL-4402) pushing unsupported full outer join to Postgres

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4402:
-

 Summary: pushing unsupported full outer join to Postgres
 Key: DRILL-4402
 URL: https://issues.apache.org/jira/browse/DRILL-4402
 Project: Apache Drill
  Issue Type: Bug
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell



Error: DATA_READ ERROR: The JDBC storage plugin failed while trying setup the 
SQL query. 

sql SELECT *
FROM "public"."tjoin1"
FULL JOIN "public"."tjoin2" ON "tjoin1"."c1" < "tjoin2"."c1"
plugin postgres
Fragment 0:0

[Error Id: bc54cf76-f4ff-474c-b3df-fa357bdf0ff8 on centos1:31010]

  (org.postgresql.util.PSQLException) ERROR: FULL JOIN is only supported with 
merge-joinable or hash-joinable join conditions
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse():2182
org.postgresql.core.v3.QueryExecutorImpl.processResults():1911
org.postgresql.core.v3.QueryExecutorImpl.execute():173
org.postgresql.jdbc.PgStatement.execute():622
org.postgresql.jdbc.PgStatement.executeWithFlags():458
org.postgresql.jdbc.PgStatement.executeQuery():374
org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
org.apache.drill.exec.store.jdbc.JdbcRecordReader.setup():177
org.apache.drill.exec.physical.impl.ScanBatch.():108
org.apache.drill.exec.physical.impl.ScanBatch.():136
org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():40
org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():33
org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():147
org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():127
org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():127
org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
org.apache.drill.exec.physical.impl.ImplCreator.getRootExec():101
org.apache.drill.exec.physical.impl.ImplCreator.getExec():79
org.apache.drill.exec.work.fragment.FragmentExecutor.run():230
org.apache.drill.common.SelfCleaningRunnable.run():38
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745

SQLState:  null
ErrorCode: 0

create table TJOIN1 (RNUM integer   not null , C1 integer, C2 integer);
insert into TJOIN1 (RNUM, C1, C2) values ( 0, 10, 15);
insert into TJOIN1 (RNUM, C1, C2) values ( 1, 20, 25);
insert into TJOIN1 (RNUM, C1, C2) values ( 2, NULL, 50);

create table TJOIN2 (RNUM integer   not null , C1 integer, C2 char(2));
insert into TJOIN2 (RNUM, C1, C2) values ( 0, 10, 'BB');
insert into TJOIN2 (RNUM, C1, C2) values ( 1, 15, 'DD');
insert into TJOIN2 (RNUM, C1, C2) values ( 2, NULL, 'EE');
insert into TJOIN2 (RNUM, C1, C2) values ( 3, 10, 'FF');



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


[jira] [Created] (DRILL-4401) multi-table join projection returning character instead of integer type

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4401:
-

 Summary: multi-table join projection returning character instead 
of integer type
 Key: DRILL-4401
 URL: https://issues.apache.org/jira/browse/DRILL-4401
 Project: Apache Drill
  Issue Type: Bug
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell


column 8 should be an integer type but is described by drill as character.


select tj.tj1rnum, tj.c1 tj1c1, tj.c2 tj1c2, tj2rnum, tj.tj2c1, tj.tj2c2,  
tjoin3.rnum tj3rnum, tjoin3.c1 tj3c1, tjoin3.c2 tj3c2 from   (select 
tjoin1.rnum tj1rnum, tjoin1.c1, tjoin2.c2, tjoin2.rnum tj2rnum,tjoin2.c1 
tj2c1, tjoin2.c2 tj2c2   from postgres.public.tjoin1 left outer join 
postgres.public.tjoin2 on tjoin1.c1=tjoin2.c1) tj  left outer join 
postgres.public.tjoin3 on tj.c1=tjoin3.c1  


create table TJOIN1 (RNUM integer   not null , C1 integer, C2 integer);
insert into TJOIN1 (RNUM, C1, C2) values ( 0, 10, 15);
insert into TJOIN1 (RNUM, C1, C2) values ( 1, 20, 25);
insert into TJOIN1 (RNUM, C1, C2) values ( 2, NULL, 50);

create table TJOIN2 (RNUM integer   not null , C1 integer, C2 char(2));
insert into TJOIN2 (RNUM, C1, C2) values ( 0, 10, 'BB');
insert into TJOIN2 (RNUM, C1, C2) values ( 1, 15, 'DD');
insert into TJOIN2 (RNUM, C1, C2) values ( 2, NULL, 'EE');
insert into TJOIN2 (RNUM, C1, C2) values ( 3, 10, 'FF');

create table TJOIN3 (RNUM integer   not null , C1 integer, C2 char(2));
insert into TJOIN3 (RNUM, C1, C2) values ( 0, 10, 'XX');
insert into TJOIN3 (RNUM, C1, C2) values ( 1, 15, 'YY');

create table TJOIN4 (RNUM integer   not null , C1 integer, C2 char(2));





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


[jira] [Created] (DRILL-4400) Cannot apply 'NOT' to arguments of type 'NOT<CHAR(2)>'.

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4400:
-

 Summary: Cannot apply 'NOT' to arguments of type 'NOT'.
 Key: DRILL-4400
 URL: https://issues.apache.org/jira/browse/DRILL-4400
 Project: Apache Drill
  Issue Type: Wish
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell


select tjoin2.rnum, tjoin1.c1, tjoin1.c2, tjoin2.c2 as c2j2 from 
postgres.public.tjoin1 inner join postgres.public.tjoin2 on ( tjoin1.c1 = 
tjoin2.c1 and not tjoin2.c2 = 'AA' )

Error: VALIDATION ERROR: From line 1, column 154 to line 1, column 163: Cannot 
apply 'NOT' to arguments of type 'NOT'. Supported form(s): 
'NOT'


[Error Id: f781f07a-2361-4f3d-8f03-0a3f1ddec8f0 on centos1:31010]

  (org.apache.calcite.tools.ValidationException) 
org.apache.calcite.runtime.CalciteContextException: From line 1, column 154 to 
line 1, column 163: Cannot apply 'NOT' to arguments of type 'NOT'. 
Supported form(s): 'NOT'
org.apache.calcite.prepare.PlannerImpl.validate():189
org.apache.calcite.prepare.PlannerImpl.validateAndGetType():198

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateNode():451

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert():198
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():167
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():199
org.apache.drill.exec.work.foreman.Foreman.runSQL():924
org.apache.drill.exec.work.foreman.Foreman.run():250
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745
  Caused By (org.apache.calcite.runtime.CalciteContextException) From line 1, 
column 154 to line 1, column 163: Cannot apply 'NOT' to arguments of type 
'NOT'. Supported form(s): 'NOT'
sun.reflect.GeneratedConstructorAccessor66.newInstance():-1
sun.reflect.DelegatingConstructorAccessorImpl.newInstance():45
java.lang.reflect.Constructor.newInstance():422
org.apache.calcite.runtime.Resources$ExInstWithCause.ex():405
org.apache.calcite.sql.SqlUtil.newContextException():714
org.apache.calcite.sql.SqlUtil.newContextException():702
org.apache.calcite.sql.validate.SqlValidatorImpl.newValidationError():3931
org.apache.calcite.sql.SqlCallBinding.newValidationSignatureError():275

org.apache.calcite.sql.type.FamilyOperandTypeChecker.checkSingleOperandType():92
org.apache.calcite.sql.type.FamilyOperandTypeChecker.checkOperandTypes():109
org.apache.calcite.sql.SqlOperator.checkOperandTypes():563
org.apache.calcite.sql.SqlOperator.validateOperands():420
org.apache.calcite.sql.SqlOperator.deriveType():487

org.apache.calcite.sql.validate.SqlValidatorImpl$DeriveTypeVisitor.visit():4268

org.apache.calcite.sql.validate.SqlValidatorImpl$DeriveTypeVisitor.visit():4255
org.apache.calcite.sql.SqlCall.accept():130
org.apache.calcite.sql.validate.SqlValidatorImpl.deriveTypeImpl():1495
org.apache.calcite.sql.validate.SqlValidatorImpl.deriveType():1478
org.apache.calcite.sql.type.InferTypes$1.inferOperandTypes():51
org.apache.calcite.sql.validate.SqlValidatorImpl.inferUnknownTypes():1672
org.apache.calcite.sql.validate.SqlValidatorImpl.inferUnknownTypes():1678
org.apache.calcite.sql.validate.SqlValidatorImpl.validateWhereOrOn():3370
org.apache.calcite.sql.validate.SqlValidatorImpl.validateJoin():2814
org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom():2772
org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect():2986
org.apache.calcite.sql.validate.SelectNamespace.validateImpl():60
org.apache.calcite.sql.validate.AbstractNamespace.validate():86
org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace():877
org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery():863
org.apache.calcite.sql.SqlSelect.validate():210

org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression():837
org.apache.calcite.sql.validate.SqlValidatorImpl.validate():551
org.apache.calcite.prepare.PlannerImpl.validate():187
org.apache.calcite.prepare.PlannerImpl.validateAndGetType():198

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateNode():451

org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert():198
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():167
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():199
org.apache.drill.exec.work.foreman.Foreman.runSQL():924
org.apache.drill.exec.work.foreman.Foreman.run():250
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745
  Caused By (org.apache.calcite.sql.validate.SqlValidatorException) Cannot 

[jira] [Created] (DRILL-4399) query using OVERLAPS function executes and returns 0 rows

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4399:
-

 Summary: query using OVERLAPS function executes and returns 0 rows
 Key: DRILL-4399
 URL: https://issues.apache.org/jira/browse/DRILL-4399
 Project: Apache Drill
  Issue Type: Wish
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell


Doc set makes not mention of this, but parses and executes

select 1 from postgres.public.tdt where (date '1999-12-01' , date '2001-12-31' 
) overlaps  ( date '2001-01-01' , tdt.cdt ) and rnum=0

This query executed by Postgres would return 1 row

create table TDT ( RNUM integer  not null , CDT date   ) ;
comment on table TDT is 'This describes table TDT.';
grant select on table TDT to public;
insert into TDT(RNUM, CDT) values ( 0, NULL);
insert into TDT(RNUM, CDT) values ( 1, DATE '1996-01-01');
insert into TDT(RNUM, CDT) values ( 2, DATE '2000-01-01');
insert into TDT(RNUM, CDT) values ( 3, DATE '2000-12-31');



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


[jira] [Created] (DRILL-4398) SYSTEM ERROR: IllegalStateException: Memory was leaked by query

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4398:
-

 Summary: SYSTEM ERROR: IllegalStateException: Memory was leaked by 
query
 Key: DRILL-4398
 URL: https://issues.apache.org/jira/browse/DRILL-4398
 Project: Apache Drill
  Issue Type: Wish
Reporter: N Campbell


Several queries fail with memory leaked errors

select tjoin2.rnum, tjoin1.c1, tjoin2.c1 as c1j2, tjoin2.c2 as c2j2 from 
postgres.public.tjoin1 full outer join postgres.public.tjoin2 on tjoin1.c1 = 
tjoin2.c1


select tjoin1.rnum, tjoin1.c1, tjoin2.c1 as c1j2, tjoin2.c2 from 
postgres.public.tjoin1, lateral ( select tjoin2.c1, tjoin2.c2 from 
postgres.public.tjoin2 where tjoin1.c1=tjoin2.c1) tjoin2


SYSTEM ERROR: IllegalStateException: Memory was leaked by query. Memory leaked: 
(40960)
Allocator(op:0:0:3:JdbcSubScan) 100/40960/135168/100 
(res/actual/peak/limit)

create table TJOIN1 (RNUM integer   not null , C1 integer, C2 integer);
insert into TJOIN1 (RNUM, C1, C2) values ( 0, 10, 15);
insert into TJOIN1 (RNUM, C1, C2) values ( 1, 20, 25);
insert into TJOIN1 (RNUM, C1, C2) values ( 2, NULL, 50);

create table TJOIN2 (RNUM integer   not null , C1 integer, C2 char(2));
insert into TJOIN2 (RNUM, C1, C2) values ( 0, 10, 'BB');
insert into TJOIN2 (RNUM, C1, C2) values ( 1, 15, 'DD');
insert into TJOIN2 (RNUM, C1, C2) values ( 2, NULL, 'EE');
insert into TJOIN2 (RNUM, C1, C2) values ( 3, 10, 'FF');



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


[jira] [Created] (DRILL-4397) Add support for NULL treatment in LAG/LEAD functions

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4397:
-

 Summary: Add support for NULL treatment in LAG/LEAD functions
 Key: DRILL-4397
 URL: https://issues.apache.org/jira/browse/DRILL-4397
 Project: Apache Drill
  Issue Type: Wish
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell


Add support re how LAG/LEAD should respect NULLS per ISO-SQL specification



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


[jira] [Created] (DRILL-4396) Generates invalid cast specification in re-written query to Postgres

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4396:
-

 Summary: Generates invalid cast specification in re-written query 
to Postgres
 Key: DRILL-4396
 URL: https://issues.apache.org/jira/browse/DRILL-4396
 Project: Apache Drill
  Issue Type: Bug
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell


select vint.rnum, tflt.rnum from postgres.public.vint , postgres.public.tflt 
where vint.cint = tflt.cflt

Error: DATA_READ ERROR: The JDBC storage plugin failed while trying setup the 
SQL query. 

sql SELECT *
FROM (SELECT "rnum", CAST("cint" AS DOUBLE) AS "$f2"
FROM "public"."vint") AS "t"
INNER JOIN "public"."tflt" ON "t"."$f2" = "tflt"."cflt"
plugin postgres
Fragment 0:0

[Error Id: 9985ca6b-1faf-43e0-9465-b7a6e8876c6d on centos1:31010]

  (org.postgresql.util.PSQLException) ERROR: type "double" does not exist
  Position: 46
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse():2182
org.postgresql.core.v3.QueryExecutorImpl.processResults():1911
org.postgresql.core.v3.QueryExecutorImpl.execute():173
org.postgresql.jdbc.PgStatement.execute():622
org.postgresql.jdbc.PgStatement.executeWithFlags():458
org.postgresql.jdbc.PgStatement.executeQuery():374
org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
org.apache.drill.exec.store.jdbc.JdbcRecordReader.setup():177
org.apache.drill.exec.physical.impl.ScanBatch.():108
org.apache.drill.exec.physical.impl.ScanBatch.():136
org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():40
org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():33
org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():147
org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():127
org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():127
org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
org.apache.drill.exec.physical.impl.ImplCreator.getRootExec():101
org.apache.drill.exec.physical.impl.ImplCreator.getExec():79
org.apache.drill.exec.work.fragment.FragmentExecutor.run():230
org.apache.drill.common.SelfCleaningRunnable.run():38
java.util.concurrent.ThreadPoolExecutor.runWorker():1142
java.util.concurrent.ThreadPoolExecutor$Worker.run():617
java.lang.Thread.run():745

SQLState:  null
ErrorCode: 0

create table TINT ( RNUM integer  not null , CINT integer   ) ;
create view VINT as select * from TINT;

create table TFLT ( RNUM integer  not null , CFLT float   ) ;
create view VFLT as select * from TFLT;



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


[jira] [Created] (DRILL-4395) equi-inner join of two tables in Postgres returns null one of the projected columns

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4395:
-

 Summary: equi-inner join of two tables in Postgres returns null 
one of the projected columns
 Key: DRILL-4395
 URL: https://issues.apache.org/jira/browse/DRILL-4395
 Project: Apache Drill
  Issue Type: Bug
  Components:  Server
Affects Versions: 1.5.0
Reporter: N Campbell


This query should return 1,2,3,4 in both columns but returns null in the second 
column. Both tables are in a Postgres 9.5 server mapped under Drill

select tint.rnum, tbint.rnum from postgres.public.tint , postgres.public.tbint 
where tint.cint = tbint.cbint

create table TINT ( RNUM integer  not null , CINT integer   ) ;
insert into TINT(RNUM, CINT) values ( 0, NULL);
insert into TINT(RNUM, CINT) values ( 1, -1);
insert into TINT(RNUM, CINT) values ( 2, 0);
insert into TINT(RNUM, CINT) values ( 3, 1);
insert into TINT(RNUM, CINT) values ( 4, 10);

create table TBINT ( RNUM integer  not null , CBINT bigint   ) ;
insert into TBINT(RNUM, CBINT) values ( 0, NULL);
insert into TBINT(RNUM, CBINT) values ( 1, -1);
insert into TBINT(RNUM, CBINT) values ( 2, 0);
insert into TBINT(RNUM, CBINT) values ( 3, 1);
insert into TBINT(RNUM, CBINT) values ( 4, 10);



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


[jira] [Created] (DRILL-4394) Can’t build the custom functions for Apache Drill 1.5.0

2016-02-17 Thread Kumiko Yada (JIRA)
Kumiko Yada created DRILL-4394:
--

 Summary: Can’t build the custom functions for Apache Drill 1.5.0
 Key: DRILL-4394
 URL: https://issues.apache.org/jira/browse/DRILL-4394
 Project: Apache Drill
  Issue Type: Bug
Affects Versions: 1.5.0
Reporter: Kumiko Yada
Priority: Critical


I tried to build the custom functions for Drill 1.5.0, but I got the below 
error:

Failure to find org.apache.drill.exec:drill-java-exec:jar:1.5.0 in 
http://repo.maven.apache.org/maven2 was cached in the local repository.



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


[jira] [Created] (DRILL-4393) JDBC driver does not always return SQLState and Message on exceptions

2016-02-17 Thread N Campbell (JIRA)
N Campbell created DRILL-4393:
-

 Summary: JDBC driver does not always return SQLState and Message 
on exceptions
 Key: DRILL-4393
 URL: https://issues.apache.org/jira/browse/DRILL-4393
 Project: Apache Drill
  Issue Type: Bug
  Components: Client - JDBC
Affects Versions: 1.5.0
Reporter: N Campbell


Various interface methods appear to not be implemented. 

Statement.setEscapeProcessing 
Statement.getMaxFieldSize
PreparedStatement.clearParameters
PreparedStatement.isPoolable
Statement.setPoolable(true)
Connection.isValid()
Connection.getTypeMap

Should an application attempt to look at the exceptions returned, often null is 
returned.

SQLException.getSQLState returned a null
SQLException.getMessage returned a null
SQLException.sqlState(null) SQLException.Message(null)

Would be ideal if the driver implemented the newer JDBC 4.x exceptions to 
denote that something is not implemented as well.




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


[jira] [Resolved] (DRILL-4190) Don't hold on to batches from left side of merge join

2016-02-17 Thread Victoria Markman (JIRA)

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

Victoria Markman resolved DRILL-4190.
-
Resolution: Fixed

> Don't hold on to batches from left side of merge join
> -
>
> Key: DRILL-4190
> URL: https://issues.apache.org/jira/browse/DRILL-4190
> Project: Apache Drill
>  Issue Type: Bug
>  Components: Execution - Relational Operators
>Affects Versions: 1.3.0, 1.4.0, 1.5.0
>Reporter: Victoria Markman
>Assignee: amit hadke
>Priority: Blocker
> Fix For: 1.5.0
>
> Attachments: 2990f5f8-ec64-1223-c1d8-97dd7e601cee.sys.drill, 
> exception.log, query3.sql
>
>
> TPCDS queries with the latest 1.4.0 release when hash join is disabled:
> 22 queries fail with out of memory 
> 2 wrong results (I did not validate the nature of wrong result yet)
> Only query97.sql is a legitimate failure: we don't support full outer join 
> with the merge join.
> It is important to understand what has changed between 1.2.0 and 1.4.0 that 
> made these tests not runnable with the same configuration. 
> Same tests with the same drill configuration pass in 1.2.0 release.
> (I hope I did not make a mistake somewhere in my cluster setup :))
> {code}
> 0: jdbc:drill:schema=dfs> select * from sys.version;
> +-+---+-++--++
> | version | commit_id |   
> commit_message|commit_time
>  | build_email  | build_time |
> +-+---+-++--++
> | 1.4.0-SNAPSHOT  | b9068117177c3b47025f52c00f67938e0c3e4732  | DRILL-4165 
> Add a precondition for size of merge join record batch.  | 08.12.2015 @ 
> 01:25:34 UTC  | Unknown  | 08.12.2015 @ 03:36:25 UTC  |
> +-+---+-++--++
> 1 row selected (2.211 seconds)
> Execution Failures:
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query50.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query33.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query74.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query68.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query34.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query21.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query46.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query91.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query59.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query3.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query66.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query84.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query97.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query19.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query96.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query43.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query15.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query2.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query60.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query79.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query73.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query45.sql
> Verification Failures
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query52.sql
> /root/drill-tests-new/framework/resources/Advanced/tpcds/tpcds_sf100/original/query40.sql
> Timeout Failures
> 
> Passing tests: 3
> Execution Failures: 22
> 

[GitHub] drill pull request: DRILL-4287: During initial DrillTable creation...

2016-02-17 Thread jacques-n
Github user jacques-n commented on the pull request:

https://github.com/apache/drill/pull/376#issuecomment-185315093
  
Super helpful! I wrote the original class and I was losing track of the 
state model. Figured that it would be even harder for others to understand the 
dynamics. This helps a lot. +1


---
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: DRILL-4387: GroupScan or ScanBatchCreator shou...

2016-02-17 Thread jinfengni
GitHub user jinfengni opened a pull request:

https://github.com/apache/drill/pull/379

DRILL-4387: GroupScan or ScanBatchCreator should not use star column …

…in case of skipAll query.

The skipAll query should be handled in RecordReader.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jinfengni/incubator-drill DRILL-4387

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/drill/pull/379.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #379


commit 5c1edc42dcad6c3b5943424b9a8373cf6ff51753
Author: Jinfeng Ni 
Date:   2016-02-12T22:18:59Z

DRILL-4387: GroupScan or ScanBatchCreator should not use star column in 
case of skipAll query.

The skipAll query should be handled in RecordReader.




---
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.
---