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

adapter_macro should use return #635

Closed
drewbanin opened this issue Jan 8, 2018 · 1 comment
Closed

adapter_macro should use return #635

drewbanin opened this issue Jan 8, 2018 · 1 comment
Labels
bug Something isn't working good_first_issue Straightforward + self-contained changes, good for new contributors!
Milestone

Comments

@drewbanin
Copy link
Contributor

Presently, adapter_macro does some munging to pick the correct macro given the active profile. This works reasonably well, but fails in the case when the underlying macro returns a value. The call stack looks like

1. macro_name() in model.sql
2. adapter_macro() in common.sql
3. {adapter}__macro_name() in macro.sql

Macro #2 converts all results to text, so non-text (eg. list, dict, number) results are mangled. This can be fixed by using the return function here

@drewbanin drewbanin added bug Something isn't working good_first_issue Straightforward + self-contained changes, good for new contributors! labels Jan 8, 2018
@drewbanin drewbanin added this to the 0.9.2 milestone Jan 8, 2018
@drewbanin
Copy link
Contributor Author

#666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good_first_issue Straightforward + self-contained changes, good for new contributors!
Projects
None yet
Development

No branches or pull requests

1 participant