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

Vitalii Diravka updated DRILL-8058:
-----------------------------------
    Description: 
Checked in Drill embedded the query form 
_TestE2EUnnestAndLateral#testMultipleBatchesLateral_WithLimitInParent_  test 
case:
{code:java}
SELECT customer.c_name, avg(orders.o_totalprice) AS avgPrice FROM 
dfs.`/{custom_path}/drill/exec/java-exec/target/org.apache.drill.exec.physical.impl.lateraljoin.TestE2EUnnestAndLateral/root/lateraljoin/multipleFiles`
 
customer, LATERAL (SELECT t.ord.o_totalprice as o_totalprice FROM 
UNNEST(customer.c_orders) t(ord) 
WHERE t.ord.o_totalprice > 100000 LIMIT 2) orders GROUP BY customer.c_name; 
{code}

But it gives the following error:
{code:java}
Caused by: java.lang.NullPointerException: Cannot invoke 
"org.apache.calcite.rel.core.TableScan.getTable()" because "scan" is null
at 
org.apache.drill.exec.planner.common.DrillRelOptUtil.getDrillTable(DrillRelOptUtil.java:691)
at 
org.apache.drill.exec.store.iceberg.plan.IcebergPluginImplementor.canImplement(IcebergPluginImplementor.java:101)
at 
org.apache.drill.exec.store.plan.rule.PluginConverterRule.matches(PluginConverterRule.java:64)
at 
org.apache.calcite.plan.volcano.VolcanoRuleCall.matchRecurse(VolcanoRuleCall.java:263)
at 
org.apache.calcite.plan.volcano.VolcanoRuleCall.match(VolcanoRuleCall.java:247)
at 
org.apache.calcite.plan.volcano.VolcanoPlanner.fireRules(VolcanoPlanner.java:1566)
at 
org.apache.calcite.plan.volcano.VolcanoPlanner.registerImpl(VolcanoPlanner.java:1840)
at 
org.apache.calcite.plan.volcano.VolcanoPlanner.register(VolcanoPlanner.java:848)
at 
org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:864)
at 
org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:92)
at org.apache.calcite.rel.AbstractRelNode.onRegister(AbstractRelNode.java:329) 
{code}
 

  was:
Checked in Drill embedded the query form the test case:
SELECT customer.c_name, avg(orders.o_totalprice) AS avgPrice FROM 
dfs.`/\{custom_path}/drill/exec/java-exec/target/org.apache.drill.exec.physical.impl.lateraljoin.TestE2EUnnestAndLateral/root/lateraljoin/multipleFiles`
 
customer, LATERAL (SELECT t.ord.o_totalprice as o_totalprice FROM 
UNNEST(customer.c_orders) t(ord) 
WHERE t.ord.o_totalprice > 100000 LIMIT 2) orders GROUP BY customer.c_name;
But it gives the following error:
Caused by: java.lang.NullPointerException: Cannot invoke 
"org.apache.calcite.rel.core.TableScan.getTable()" because "scan" is null
        at 
org.apache.drill.exec.planner.common.DrillRelOptUtil.getDrillTable(DrillRelOptUtil.java:691)
        at 
org.apache.drill.exec.store.iceberg.plan.IcebergPluginImplementor.canImplement(IcebergPluginImplementor.java:101)
        at 
org.apache.drill.exec.store.plan.rule.PluginConverterRule.matches(PluginConverterRule.java:64)
        at 
org.apache.calcite.plan.volcano.VolcanoRuleCall.matchRecurse(VolcanoRuleCall.java:263)
        at 
org.apache.calcite.plan.volcano.VolcanoRuleCall.match(VolcanoRuleCall.java:247)
        at 
org.apache.calcite.plan.volcano.VolcanoPlanner.fireRules(VolcanoPlanner.java:1566)
        at 
org.apache.calcite.plan.volcano.VolcanoPlanner.registerImpl(VolcanoPlanner.java:1840)
        at 
org.apache.calcite.plan.volcano.VolcanoPlanner.register(VolcanoPlanner.java:848)
        at 
org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:864)
        at 
org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:92)
        at 
org.apache.calcite.rel.AbstractRelNode.onRegister(AbstractRelNode.java:329)


> NPE: Cannot invoke "org.apache.calcite.rel.core.TableScan.getTable()" because 
> "scan" is null
> --------------------------------------------------------------------------------------------
>
>                 Key: DRILL-8058
>                 URL: https://issues.apache.org/jira/browse/DRILL-8058
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Iceberg
>    Affects Versions: 1.19.0
>            Reporter: Vitalii Diravka
>            Priority: Major
>              Labels: iceberg, storage
>             Fix For: Future
>
>
> Checked in Drill embedded the query form 
> _TestE2EUnnestAndLateral#testMultipleBatchesLateral_WithLimitInParent_  test 
> case:
> {code:java}
> SELECT customer.c_name, avg(orders.o_totalprice) AS avgPrice FROM 
> dfs.`/{custom_path}/drill/exec/java-exec/target/org.apache.drill.exec.physical.impl.lateraljoin.TestE2EUnnestAndLateral/root/lateraljoin/multipleFiles`
>  
> customer, LATERAL (SELECT t.ord.o_totalprice as o_totalprice FROM 
> UNNEST(customer.c_orders) t(ord) 
> WHERE t.ord.o_totalprice > 100000 LIMIT 2) orders GROUP BY customer.c_name; 
> {code}
> But it gives the following error:
> {code:java}
> Caused by: java.lang.NullPointerException: Cannot invoke 
> "org.apache.calcite.rel.core.TableScan.getTable()" because "scan" is null
> at 
> org.apache.drill.exec.planner.common.DrillRelOptUtil.getDrillTable(DrillRelOptUtil.java:691)
> at 
> org.apache.drill.exec.store.iceberg.plan.IcebergPluginImplementor.canImplement(IcebergPluginImplementor.java:101)
> at 
> org.apache.drill.exec.store.plan.rule.PluginConverterRule.matches(PluginConverterRule.java:64)
> at 
> org.apache.calcite.plan.volcano.VolcanoRuleCall.matchRecurse(VolcanoRuleCall.java:263)
> at 
> org.apache.calcite.plan.volcano.VolcanoRuleCall.match(VolcanoRuleCall.java:247)
> at 
> org.apache.calcite.plan.volcano.VolcanoPlanner.fireRules(VolcanoPlanner.java:1566)
> at 
> org.apache.calcite.plan.volcano.VolcanoPlanner.registerImpl(VolcanoPlanner.java:1840)
> at 
> org.apache.calcite.plan.volcano.VolcanoPlanner.register(VolcanoPlanner.java:848)
> at 
> org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:864)
> at 
> org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:92)
> at 
> org.apache.calcite.rel.AbstractRelNode.onRegister(AbstractRelNode.java:329) 
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to