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

fix: mssql should only load data for the views specified by materialize views #1559

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

conoremclaughlin
Copy link

No description provided.

Copy link
Collaborator

@svantevonerichsen6906 svantevonerichsen6906 left a comment

Choose a reason for hiding this comment

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

Please don't litter the code base with debugging prints, and please do adhere to the formatting standard that is very much established in the entire Lisp language ecosystem. Can't review like this.

@conoremclaughlin
Copy link
Author

conoremclaughlin commented Mar 8, 2024

Hi @svantevonerichsen6906, thanks for the comments. I wanted to get the PR up for anyone who found it useful before cleaning it up.

I've removed the debug statements and have changed the parentheses to follow more of Lisp's standards. Unfortunately it's been quite some time since I learned Lisp in Berkeley and Lisp doesn't have a good formatter, so this is about as far as I can go for formatting. If you can give me some more specifics I can address them! Otherwise I would run the formatter across the file. The original code's indentation formatting was also off. It's also specifically noted that this flow was untested by the author, so anything is an improvement over the untested / completely broken materialize views code path we currently have for MSSQL.

Thanks!

@conoremclaughlin
Copy link
Author

Fixes #1551.

@conoremclaughlin
Copy link
Author

Bumping this @svantevonerichsen6906. Thanks man!

((new-entry (cons schema-name nil))); Initially nil, intending to be a list
(push new-entry including)
new-entry))))
(push-to-end view-name (cdr schema-entry))))
Copy link
Collaborator

Choose a reason for hiding this comment

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

What I mean is: completely clean up the debugging alterations, and this is the indentation that should appear here:

(let* ((view-names (unless (eq :all materialize-views)
                     (mapcar #'matview-source-name materialize-views)))
       (including nil))
  (loop :for (schema-name . view-name) :in view-names
        :do (let* ((schema-name (or schema-name "dbo"))
                   (schema-entry (or
                                  (assoc schema-name including :test #'string=)
                                  (let ((new-entry (cons schema-name nil)))
                                    (push new-entry including)
                                    new-entry))))
              (push-to-end view-name (cdr schema-entry))))
  …)

I don't fully understand what's changed here yet, though

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