You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Tyler Akidau (JIRA)" <ji...@apache.org> on 2017/08/07 21:59:00 UTC
[jira] [Commented] (BEAM-2749) update BeamSqlExample
[ https://issues.apache.org/jira/browse/BEAM-2749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16117390#comment-16117390 ]
Tyler Akidau commented on BEAM-2749:
------------------------------------
Error messages given the query:
{code:java}
select team, SUM(user_score) from PCOLLECTION WHERE team='team1' GROUP BY team
{code}
{code}
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:294)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.calcite.plan.RelOptPlanner$CannotPlanException: Node [rel#11:Subset#2.BEAM_LOGICAL.[]] could not be implemented; planner state:
Root: rel#11:Subset#2.BEAM_LOGICAL.[]
Original rel:
LogicalAggregate(subset=[rel#11:Subset#2.BEAM_LOGICAL.[]], group=[{0}], EXPR$1=[SUM($1)]): rowcount = 1.5, cumulative cost = {1.7062500715255737 rows, 0.0 cpu, 0.0 io}, id = 9
LogicalFilter(subset=[rel#8:Subset#1.NONE.[]], condition=[=($0, 'team1')]): rowcount = 15.0, cumulative cost = {15.0 rows, 100.0 cpu, 0.0 io}, id = 7
LogicalTableScan(subset=[rel#6:Subset#0.NONE.[]], table=[[PCOLLECTION]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 3
Sets:
Set#0, type: RecordType(VARCHAR team, INTEGER user_score)
rel#6:Subset#0.NONE.[], best=null, importance=0.7290000000000001
rel#3:LogicalTableScan.NONE.[](table=[PCOLLECTION]), rowcount=100.0, cumulative cost={inf}
rel#13:Subset#0.BEAM_LOGICAL.[], best=rel#16, importance=0.36450000000000005
rel#16:BeamIOSourceRel.BEAM_LOGICAL.[](table=[PCOLLECTION]), rowcount=100.0, cumulative cost={100.0 rows, 101.0 cpu, 0.0 io}
Set#1, type: RecordType(VARCHAR team, INTEGER user_score)
rel#8:Subset#1.NONE.[], best=null, importance=0.81
rel#7:LogicalFilter.NONE.[](input=rel#6:Subset#0.NONE.[],condition==($0, 'team1')), rowcount=15.0, cumulative cost={inf}
rel#15:Subset#1.BEAM_LOGICAL.[], best=rel#14, importance=0.405
rel#14:BeamFilterRel.BEAM_LOGICAL.[](input=rel#13:Subset#0.BEAM_LOGICAL.[],condition==($0, 'team1')), rowcount=15.0, cumulative cost={115.0 rows, 201.0 cpu, 0.0 io}
Set#2, type: RecordType(VARCHAR team, INTEGER EXPR$1)
rel#10:Subset#2.NONE.[], best=null, importance=0.9
rel#9:LogicalAggregate.NONE.[](input=rel#8:Subset#1.NONE.[],group={0},EXPR$1=SUM($1)), rowcount=1.5, cumulative cost={inf}
rel#11:Subset#2.BEAM_LOGICAL.[], best=null, importance=1.0
rel#12:AbstractConverter.BEAM_LOGICAL.[](input=rel#10:Subset#2.NONE.[],convention=BEAM_LOGICAL,sort=[]), rowcount=1.5, cumulative cost={inf}
at org.apache.calcite.plan.volcano.RelSubset$CheapestPlanReplacer.visit(RelSubset.java:441)
at org.apache.calcite.plan.volcano.RelSubset.buildCheapestPlan(RelSubset.java:291)
at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:666)
at org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:368)
at org.apache.calcite.prepare.PlannerImpl.transform(PlannerImpl.java:313)
at org.apache.beam.sdk.extensions.sql.impl.planner.BeamQueryPlanner.convertToBeamRel(BeamQueryPlanner.java:148)
at org.apache.beam.sdk.extensions.sql.impl.planner.BeamQueryPlanner.validateAndConvert(BeamQueryPlanner.java:139)
at org.apache.beam.sdk.extensions.sql.impl.planner.BeamQueryPlanner.convertToBeamRel(BeamQueryPlanner.java:127)
at org.apache.beam.sdk.extensions.sql.BeamSql$QueryTransform.expand(BeamSql.java:151)
at org.apache.beam.sdk.extensions.sql.BeamSql$QueryTransform.expand(BeamSql.java:112)
at org.apache.beam.sdk.Pipeline.applyInternal(Pipeline.java:514)
at org.apache.beam.sdk.Pipeline.applyTransform(Pipeline.java:454)
at org.apache.beam.sdk.values.PCollectionTuple.apply(PCollectionTuple.java:159)
at org.apache.beam.sdk.extensions.sql.BeamSql$SimpleQueryTransform.expand(BeamSql.java:238)
at org.apache.beam.sdk.extensions.sql.BeamSql$SimpleQueryTransform.expand(BeamSql.java:179)
at org.apache.beam.sdk.Pipeline.applyInternal(Pipeline.java:514)
at org.apache.beam.sdk.Pipeline.applyTransform(Pipeline.java:454)
at org.apache.beam.sdk.values.PCollection.apply(PCollection.java:284)
at org.apache.beam.sdk.extensions.sql.example.BookExample.main(BookExample.java:75)
... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.188 s
[INFO] Finished at: 2017-08-07T14:55:49-07:00
[INFO] Final Memory: 80M/946M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:java (default-cli) on project beam-sdks-java-extensions-sql: An exception occured while executing the Java class. null: InvocationTargetException: Node [rel#11:Subset#2.BEAM_LOGICAL.[]] could not be implemented; planner state:
[ERROR]
[ERROR] Root: rel#11:Subset#2.BEAM_LOGICAL.[]
[ERROR] Original rel:
[ERROR] LogicalAggregate(subset=[rel#11:Subset#2.BEAM_LOGICAL.[]], group=[{0}], EXPR$1=[SUM($1)]): rowcount = 1.5, cumulative cost = {1.7062500715255737 rows, 0.0 cpu, 0.0 io}, id = 9
[ERROR] LogicalFilter(subset=[rel#8:Subset#1.NONE.[]], condition=[=($0, 'team1')]): rowcount = 15.0, cumulative cost = {15.0 rows, 100.0 cpu, 0.0 io}, id = 7
[ERROR] LogicalTableScan(subset=[rel#6:Subset#0.NONE.[]], table=[[PCOLLECTION]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 3
[ERROR]
[ERROR] Sets:
[ERROR] Set#0, type: RecordType(VARCHAR team, INTEGER user_score)
[ERROR] rel#6:Subset#0.NONE.[], best=null, importance=0.7290000000000001
[ERROR] rel#3:LogicalTableScan.NONE.[](table=[PCOLLECTION]), rowcount=100.0, cumulative cost={inf}
[ERROR] rel#13:Subset#0.BEAM_LOGICAL.[], best=rel#16, importance=0.36450000000000005
[ERROR] rel#16:BeamIOSourceRel.BEAM_LOGICAL.[](table=[PCOLLECTION]), rowcount=100.0, cumulative cost={100.0 rows, 101.0 cpu, 0.0 io}
[ERROR] Set#1, type: RecordType(VARCHAR team, INTEGER user_score)
[ERROR] rel#8:Subset#1.NONE.[], best=null, importance=0.81
[ERROR] rel#7:LogicalFilter.NONE.[](input=rel#6:Subset#0.NONE.[],condition==($0, 'team1')), rowcount=15.0, cumulative cost={inf}
[ERROR] rel#15:Subset#1.BEAM_LOGICAL.[], best=rel#14, importance=0.405
[ERROR] rel#14:BeamFilterRel.BEAM_LOGICAL.[](input=rel#13:Subset#0.BEAM_LOGICAL.[],condition==($0, 'team1')), rowcount=15.0, cumulative cost={115.0 rows, 201.0 cpu, 0.0 io}
[ERROR] Set#2, type: RecordType(VARCHAR team, INTEGER EXPR$1)
[ERROR] rel#10:Subset#2.NONE.[], best=null, importance=0.9
[ERROR] rel#9:LogicalAggregate.NONE.[](input=rel#8:Subset#1.NONE.[],group={0},EXPR$1=SUM($1)), rowcount=1.5, cumulative cost={inf}
[ERROR] rel#11:Subset#2.BEAM_LOGICAL.[], best=null, importance=1.0
[ERROR] rel#12:AbstractConverter.BEAM_LOGICAL.[](input=rel#10:Subset#2.NONE.[],convention=BEAM_LOGICAL,sort=[]), rowcount=1.5, cumulative cost={inf}
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
{code}
> update BeamSqlExample
> ---------------------
>
> Key: BEAM-2749
> URL: https://issues.apache.org/jira/browse/BEAM-2749
> Project: Beam
> Issue Type: Sub-task
> Components: dsl-sql
> Reporter: Xu Mingmin
> Assignee: Xu Mingmin
> Labels: dsl_sql_merge, dsl_sql_review
>
> change usage to reflect the latest status, and add an example with GROUP_BY
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)