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

NullPointerException in Sorter.logTuples #1277

Open
SergeySD opened this issue Oct 16, 2021 · 0 comments
Open

NullPointerException in Sorter.logTuples #1277

SergeySD opened this issue Oct 16, 2021 · 0 comments

Comments

@SergeySD
Copy link

In OrderFunDef.evaluateList there is code that makes all lists except ArrayTupleList null

    public TupleList evaluateList( Evaluator evaluator ) {
      evaluator.getTiming().markStart( TIMING_NAME );
      try {
        final TupleIterable iterable = iterCalc.evaluateIterable( evaluator );
        // REVIEW: If iterable happens to be a list, we'd like to pass it,
        // but we cannot yet guarantee that it is mutable.
        final TupleList list = iterable instanceof ArrayTupleList && false ? (TupleList) iterable : null;
        // go by size of keySpecList before purging

and if logging enabled this null pass to Sorter.LogTuples and create NullPointerException.

I can't understand how to fix it better, should I add a check for null in LogTuples, or OrderFunDef works incorrectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant