drill
DRILL-8512: ReduceAndSimplifyFilterRule fails with NullPointerException
#2944
Open

DRILL-8512: ReduceAndSimplifyFilterRule fails with NullPointerException #2944

rymarm wants to merge 1 commit into apache:master from rymarm:DRILL-8512
rymarm
rymarm245 days ago (edited 245 days ago)

DRILL-8512: ReduceAndSimplifyFilterRule fails with NullPointerException

Description

I'm not sure why the following issue wasn't before, but it's clear, why the issue appears at all - because we provide neither inputs RelNodes(we calling DrillOptiq.toDrill with null for the input, see code change) or RexBuilder along with RelDataType.

Testing

Tested with the query the issue was reproduced:

SELECT *
FROM
(
SELECT
(CASE WHEN (true) THEN 'qwe' ELSE null END) res1
FROM (VALUES(1)) test_tbl
) test
where res1 IN ('ab','dab','qw','qwe') 
rymarm DRILL-8512: ReduceAndSimplifyFilterRule fails with NullPointerException
dfac7f10
rymarm rymarm requested a review from jnturton jnturton 245 days ago
rymarm
rymarm245 days ago

@jnturton I'm unsure whether the fix is correct because calcite is a black box to me, but I think I found the correct place where the change should be made.

I'll be glad if you advise me on how to cover the case with unit tests.

cgivre
cgivre244 days ago😄 1

@jnturton I'm unsure whether the fix is correct because calcite is a black box to me, but I think I found the correct place where the change should be made.

I'll be glad if you advise me on how to cover the case with unit tests.

You're not the only one to whom Calcite is a black box... :-)

rymarm
rymarm243 days ago

I saw the failing tests. I need to find another solution to solve the issue...

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
No one assigned
Labels
Milestone