Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClockFilter NPEs on Empty Tables #5315

Open
cpwright opened this issue Apr 2, 2024 · 0 comments
Open

ClockFilter NPEs on Empty Tables #5315

cpwright opened this issue Apr 2, 2024 · 0 comments
Assignees
Labels
bug Something isn't working triage

Comments

@cpwright
Copy link
Contributor

cpwright commented Apr 2, 2024

Description

A clear and concise description of what the bug is.

Steps to reproduce

    @Test
    public void testEmpty() {
        clock.reset();
        final UnsortedClockFilter filter = new UnsortedClockFilter("Timestamp", clock, true);

        final Table result = testInput3.where("false").where(filter);

        final ControlledUpdateGraph updateGraph = ExecutionContext.getContext().getUpdateGraph().cast();
        updateGraph.runWithinUnitTestCycle(() -> {
            clock.run();
            filter.run();
        });

        assertEquals(0, result.size());
    }

Expected results

An empty table at the end of the run.

Actual results

java.lang.NullPointerException
	at io.deephaven.engine.table.impl.select.UnsortedClockFilter.updateAndGetAddedIndex(UnsortedClockFilter.java:127)
	at io.deephaven.engine.table.impl.select.ClockFilter.run(ClockFilter.java:125)
	at io.deephaven.engine.table.impl.select.TestClockFilters.lambda$testEmpty$12(TestClockFilters.java:209)
	at io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph.runWithinUnitTestCycle(PeriodicUpdateGraph.java:636)
	at io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph.runWithinUnitTestCycle(PeriodicUpdateGraph.java:617)
	at io.deephaven.engine.table.impl.select.TestClockFilters.testEmpty(TestClockFilters.java:207)

Additional details and attachments

If applicable, add any additional screenshots, logs, or other attachments to help explain your problem.

Versions

@cpwright cpwright added bug Something isn't working triage labels Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants