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

power and pow are synonyms (except in for some dialects) #354

Merged
merged 5 commits into from
Jun 6, 2021

Conversation

dataders
Copy link
Contributor

@dataders dataders commented Apr 27, 2021

This is a:

  • bug fix PR with no breaking changes — please ensure the base branch is master
  • new functionality — please ensure the base branch is the latest dev/ branch
  • a breaking change — please ensure the base branch is the latest dev/ branch

Description & motivation

TIL that TSQL does not have have pow() only power(). I was about ready to implement a dbt_utils.pow() macro, until I realized in most dialects, both are supported as synonyms see below.

I'm happy to make a dbt_utils.pow() macro, but think this change is much simpler -- especially because pow is only used in dbt_utils.generate_series()

dialects that support both POW and POWER:

Dialects that only support POWER

Checklist

  • I have verified that these changes work locally on the following warehouses (Note: it's okay if you do not have access to all warehouses, this helps us understand what has been covered)
    • BigQuery
    • Postgres
    • Redshift
    • Snowflake
  • I have updated the README.md (if applicable)
  • I have added tests & descriptions to my models (and macros if applicable)
  • I have added an entry to CHANGELOG.md

@dataders dataders requested a review from clrcrl as a code owner April 27, 2021 01:28
@dataders dataders changed the title power and pow are synonyms (except in TSQL) power and pow are synonyms (except in for some dialects) Apr 27, 2021
dataders added a commit to dbt-msft/tsql-utils that referenced this pull request May 30, 2021
dataders added a commit to dbt-msft/tsql-utils that referenced this pull request May 30, 2021
dataders added a commit to dbt-msft/tsql-utils that referenced this pull request May 30, 2021
dataders pushed a commit to dataders/dbt-utils that referenced this pull request May 30, 2021
clrcrl added a commit that referenced this pull request Jun 1, 2021
…tibility (#376)

* pending: pending: #354

* some db's dont have `timestamp` type

* document

* Update CHANGELOG.md

Co-authored-by: Claire Carroll <[email protected]>
Co-authored-by: Claire Carroll <[email protected]>
jtcohen6 pushed a commit that referenced this pull request Jun 6, 2021
* pending: pending: #354

* explicitly ask for macros to be dispatched

* move to checklist, match language

Co-authored-by: Claire Carroll <[email protected]>
Copy link
Contributor

@jtcohen6 jtcohen6 left a comment

Choose a reason for hiding this comment

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

Good by me, @swanderz! Thanks for the research that went into this one.

@jtcohen6 jtcohen6 merged commit 4f08f43 into dbt-labs:master Jun 6, 2021
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