Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Minor Catalog refactors #1571

Merged
merged 3 commits into from
Apr 29, 2021
Merged

Minor Catalog refactors #1571

merged 3 commits into from
Apr 29, 2021

Conversation

mbutrovich
Copy link
Contributor

The only real logic change is that we were dumping columns for a new table into pg_statistic before we validated that creating the new table would even succeed. We should try to be more defensive in the catalog and not assume that operations will succeed.

Otherwise I just did my usual style nit fixes, trying to to focus on const & where we're currently doing deep copies on STL data structures that aren't changed in the local scope. I wish clang-tidy would yell at us about that.

@mbutrovich mbutrovich added ready-for-review This PR passes all checks and is ready to be reviewed. Mark PRs with this. best-practice Style fixes or refactor in the code base. Mark issues with this. ready-for-ci Indicate that this build should be run through CI. labels Apr 28, 2021
@mbutrovich mbutrovich requested a review from lmwnshn April 28, 2021 22:03
@mbutrovich mbutrovich self-assigned this Apr 28, 2021
Copy link
Contributor

@lmwnshn lmwnshn left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Technically, https://releases.llvm.org/8.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/performance-unnecessary-copy-initialization.html is a thing. I'm not sure if copy elision is happening in the majority of old cases (C++17 https://en.cppreference.com/w/cpp/language/copy_elision with its mandatory copy elision in some cases), which might be why it isn't throwing any kind of error. Anyways, this is clearer.

@lmwnshn
Copy link
Contributor

lmwnshn commented Apr 29, 2021

It looks like something broke on CI though.

@lmwnshn lmwnshn added in-progress This PR is being actively worked on and not ready to be reviewed or merged. Mark PRs with this. and removed ready-for-review This PR passes all checks and is ready to be reviewed. Mark PRs with this. labels Apr 29, 2021
@mbutrovich mbutrovich added ready-to-merge This PR is ready to be merged. Mark PRs with this. and removed in-progress This PR is being actively worked on and not ready to be reviewed or merged. Mark PRs with this. labels Apr 29, 2021
@mbutrovich mbutrovich merged commit ea19034 into cmu-db:master Apr 29, 2021
@mbutrovich mbutrovich deleted the catalog_fixes branch April 29, 2021 19:24
@mbutrovich
Copy link
Contributor Author

For posterity, this looks to be about a 20% performance improvement in the relevant microbenchmarks:

Screen Shot 2021-05-04 at 1 33 52 PM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
best-practice Style fixes or refactor in the code base. Mark issues with this. ready-for-ci Indicate that this build should be run through CI. ready-to-merge This PR is ready to be merged. Mark PRs with this.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants