[
https://issues.apache.org/jira/browse/CALCITE-7949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vladimir Sitnikov resolved CALCITE-7949.
----------------------------------------
Resolution: Fixed
Fixed in
https://github.com/apache/calcite/commit/1b291df8b5c913a1c5c6ae3ea867155cd6785d96
> 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)