Skip to content

Conversation

@zachmu
Copy link
Member

@zachmu zachmu commented Oct 11, 2023

This needs a lot more tests, but this demonstrates the approach within can work well enough

@zachmu zachmu requested a review from max-hoffman October 11, 2023 00:41
Copy link
Contributor

@max-hoffman max-hoffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main two things that stand out are 1) the indexing changes are kind of confusing, like the whole entrypoint function is centralized around virtual columns now, when the stuff that matters is now relegated to a helper function, and 2) i'm trying to remove the "resolved" qualifiers because plans are by default resolved now; the qualifiers are kind of redundant. Like I'm pretty sure sql.Node.Resolved() is mostly deprecated by now. For (1) I'd index upfront, in planbuilder, hide the special logic in the place it matters to avoid general indexing being even more confusing. Or just reorganize in a way that doesn't hide the hard part behind default expression boilerplate. And then (2) I'd prefer we use tablescan instead of resolvedTable as a conceptual progression of removing resolved stuff, but not really going to die on that hill.

@zachmu
Copy link
Member Author

zachmu commented Oct 11, 2023

The main two things that stand out are 1) the indexing changes are kind of confusing, like the whole entrypoint function is centralized around virtual columns now, when the stuff that matters is now relegated to a helper function, and 2) i'm trying to remove the "resolved" qualifiers because plans are by default resolved now; the qualifiers are kind of redundant. Like I'm pretty sure sql.Node.Resolved() is mostly deprecated by now. For (1) I'd index upfront, in planbuilder, hide the special logic in the place it matters to avoid general indexing being even more confusing. Or just reorganize in a way that doesn't hide the hard part behind default expression boilerplate. And then (2) I'd prefer we use tablescan instead of resolvedTable as a conceptual progression of removing resolved stuff, but not really going to die on that hill.

I'll take a pass at 1). 2) seems out of scope provided I get rid of *ResolvedTable in the indexing logic.

Copy link
Contributor

@max-hoffman max-hoffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing indexing. Are there any tests? Presumably need plan + correctness tests and run on the Dolt side, though I don't see any reason why Dolt side would't work.

@zachmu
Copy link
Member Author

zachmu commented Oct 11, 2023

Thanks for fixing indexing. Are there any tests? Presumably need plan + correctness tests and run on the Dolt side, though I don't see any reason why Dolt side would't work.

Just the new engine tests I wrote. This code path should only impact tables with virtual columns, so no immediate impact to dolt

@zachmu zachmu merged commit 11634aa into main Oct 11, 2023
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

Successfully merging this pull request may close these issues.

2 participants