[ 
https://issues.apache.org/jira/browse/CALCITE-7949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18148105#comment-18148105
 ] 

Vladimir Sitnikov commented on CALCITE-7949:
--------------------------------------------

Sorry for that. I would avoid force pushes to main branch though. I can do 
whatever community agrees (keep as is or force push).

> Piglet: executing a plan that scans a PigTable throws NullPointerException
> --------------------------------------------------------------------------
>
>                 Key: CALCITE-7949
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7949
>             Project: Calcite
>          Issue Type: Bug
>          Components: piglet
>    Affects Versions: 1.42.0
>            Reporter: Vladimir Sitnikov
>            Priority: Major
>              Labels: pull-request-available
>
> A table loaded with a Pig schema converts to a plan, but executing that plan 
> throws a NullPointerException, because PigTable.scan returns null.
> {code:java}
> RelNode rel = converter.pigQuery2Rel(
>     "A = LOAD 'testSchema.testTable' as (a:int, b:chararray);").get(0);
> RelRunners.run(rel).executeQuery();
> {code}
> fails with:
> {noformat}
> java.lang.NullPointerException: Cannot invoke 
> "org.apache.calcite.linq4j.Enumerable.select(org.apache.calcite.linq4j.function.Function1)"
>  because "enumerable" is null
> {noformat}
> (converter is the PigConverter used in PigRelOpTest.)
> Expected: execution fails with an error that says the table has no rows to 
> scan, for example UnsupportedOperationException from PigTable.scan.
> Reproduced on main at 9801f30e72 with OpenJDK 21.0.9.
> Found while reviewing CALCITE-7736, which keeps PigTable.scan returning null.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to