cmu-db / dbgym

An end-to-end research vehicle for studying self-driving DBMSs.
MIT License
9 stars 1 forks source link

Fix extract_aliases() to ignore view names in CREATE VIEW. #10

Closed wangpatrick57 closed 4 months ago

wangpatrick57 commented 4 months ago

This PR modifies extract_aliases() to ignore the names of views that only appear in a CREATE VIEW statement.

These semantics were part of the old extract_aliases() function back when we were using pglast 3.8. When we migrated to pglast 6.2, we fixed all errors from the version change except for the one in this PR. Thus, this PR completes the migration. Fix #8.


Summary: extract_aliases() now ignores the names of views if they only appear in a CREATE VIEW statement and do not appear anywhere else in the query.

Demo: Added two unit tests to verify this behavior.

Screenshot 2024-03-03 at 21 46 10

Details: