presto 0.101 INTERNAL_ERROR

51 views
Skip to first unread message

wyu...@gmail.com

unread,
Apr 29, 2015, 11:07:44 PM4/29/15
to presto...@googlegroups.com
Hi

I try to use presto 0.101 + jdk1.8.0_25 + HDP 2.1 + CentOS 6.5.

I use hive connector.

but the INTERNAL_ERROR occurs.

java.lang.IndexOutOfBoundsException: index (0) must be less than size (0)
at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:310)
at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:292)
at com.google.common.collect.RegularImmutableList.get(RegularImmutableList.java:65)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.visitUnion(AddExchanges.java:830)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.visitUnion(AddExchanges.java:133)
at com.facebook.presto.sql.planner.plan.UnionNode.accept(UnionNode.java:133)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.planChild(AddExchanges.java:885)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.visitPlan(AddExchanges.java:156)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.visitPlan(AddExchanges.java:133)
at com.facebook.presto.sql.planner.plan.PlanVisitor.visitProject(PlanVisitor.java:40)
at com.facebook.presto.sql.planner.plan.ProjectNode.accept(ProjectNode.java:81)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.visitJoin(AddExchanges.java:661)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.visitJoin(AddExchanges.java:133)
at com.facebook.presto.sql.planner.plan.JoinNode.accept(JoinNode.java:158)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.planChild(AddExchanges.java:885)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.visitPlan(AddExchanges.java:156)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.visitPlan(AddExchanges.java:133)
at com.facebook.presto.sql.planner.plan.PlanVisitor.visitProject(PlanVisitor.java:40)
at com.facebook.presto.sql.planner.plan.ProjectNode.accept(ProjectNode.java:81)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.planChild(AddExchanges.java:885)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.visitWindow(AddExchanges.java:309)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.visitWindow(AddExchanges.java:133)
at com.facebook.presto.sql.planner.plan.WindowNode.accept(WindowNode.java:171)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.planChild(AddExchanges.java:885)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.visitOutput(AddExchanges.java:162)
at com.facebook.presto.sql.planner.optimizations.AddExchanges$Rewriter.visitOutput(AddExchanges.java:133)
at com.facebook.presto.sql.planner.plan.OutputNode.accept(OutputNode.java:79)
at com.facebook.presto.sql.planner.optimizations.AddExchanges.optimize(AddExchanges.java:129)
at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:89)
at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:207)
at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:186)
at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:147)
at com.facebook.presto.execution.QueuedExecution.lambda$start$113(QueuedExecution.java:68)
at com.facebook.presto.execution.QueuedExecution$$Lambda$162/282261966.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

I'm sorry for displaying query and table structure because of security reason.

but, It's not complex.

Regards
Wataru Yukawa

Dain Sundstrom

unread,
Apr 29, 2015, 11:16:46 PM4/29/15
to presto...@googlegroups.com
Thanks for the error report. I created an issue for this:

https://github.com/facebook/presto/issues/2824

Can you describe the general shape of the query you are running?

-dain
> --
> You received this message because you are subscribed to the Google Groups "Presto" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to presto-users...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Wataru Yukawa

unread,
Apr 29, 2015, 11:41:06 PM4/29/15
to presto...@googlegroups.com
Thank you for reply.

>Can you describe the general shape of the query you are running?

I use prestogres and BI tool issues the query.

the query is like the following.

SELECT
    "presto_view"."some_column", 
    "presto_view"."cnt", 
    SUM("presto_view"."cnt")
        OVER(
        )
FROM
    "hive_database"."presto_view" "presto_view" 
WHERE 
    "presto_view"."yyyymmdd" = SUBSTRING('2015-04-29' FROM 1 FOR 4) || SUBSTRING('2015-04-29' FROM 6 FOR 2) || SUBSTRING('2015-04-29' FROM 9 FOR 2)


Other error queries also use the window function.


You received this message because you are subscribed to a topic in the Google Groups "Presto" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/presto-users/YHxv3aBQOTQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to presto-users...@googlegroups.com.

Dain Sundstrom

unread,
Apr 30, 2015, 12:16:04 AM4/30/15
to presto...@googlegroups.com
What is the shape of the view? I ask because I’m expecting to see a UNION since the stack ended at visitUnion.

-dain

Wataru Yukawa

unread,
Apr 30, 2015, 1:28:43 AM4/30/15
to presto...@googlegroups.com
Hi

I try to minimize query and I can reproduce.

Error occurs at the following query.

select 
  a.*, b.*
from 
  hive_table a
LEFT OUTER JOIN
  presto_view b
ON
    a.code = cast(b.a as bigint)
limit 100

presto_view is like the following.

create view presto_view
as
select
  '01' as a, 'aaa' as b,'AAA' as c
union all
select
  '02' as a, 'bbb' as b, 'BBB' as c


So I use UNION.

Dain Sundstrom

unread,
May 4, 2015, 7:23:18 PM5/4/15
to presto...@googlegroups.com, wyu...@gmail.com
This is fixed in the 0.102 release.

-dain
> > To unsubscribe from this group and stop receiving emails from it, send an email to presto-users+unsubscribe@googlegroups.com.

> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Presto" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/presto-users/YHxv3aBQOTQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to presto-users+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Presto" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to presto-users+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Presto" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/presto-users/YHxv3aBQOTQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to presto-users+unsubscribe@googlegroups.com.

Wataru Yukawa

unread,
May 5, 2015, 1:32:58 AM5/5/15
to Dain Sundstrom, presto...@googlegroups.com
Thanks!!!

-dain
> > To unsubscribe from this group and stop receiving emails from it, send an email to presto-users...@googlegroups.com.

> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Presto" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/presto-users/YHxv3aBQOTQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to presto-users...@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Presto" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to presto-users...@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Presto" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/presto-users/YHxv3aBQOTQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to presto-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages