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

Add Trino Support #294

Merged
merged 5 commits into from
Feb 19, 2024
Merged

Add Trino Support #294

merged 5 commits into from
Feb 19, 2024

Conversation

damian3031
Copy link
Contributor

Issue this PR Addresses/Closes

Closes #293

Summary of Changes

  • Added Trino support
  • Fixed expect_select_column_values_to_be_unique_within_record macro
  • Fixed timeseries_data_extended.row_value expect_column_distinct_count_ tests row_conditions

Reviewers

@clausherther

Fix ORDER BY to order by columns which are exptected to have unique values across them, instead of random column
@damian3031
Copy link
Contributor Author

@clausherther Could you approve the workflow in CircleCI, to verify if all tests will pass?

@clausherther
Copy link
Contributor

Thanks for this! I'll review by end of week.

@@ -40,7 +40,7 @@
with column_values as (

select
row_number() over(order by 1) as row_index,
row_number() over(order by {{ columns|join(', ') }}) as row_index,
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this failing? Is this required for Trino support? I'd have to look at this separately to step through, it's been a while, but if this is a bug, I'd rather roll this into a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In Trino, ordering by column's position number inside ranking functions doesn't work. row_number() over(order by 1) results in a random order. This test fails because of that.

However, IMHO it is a bug anyway.

Mentioned test passes in other dbt adapters, because in current test model the first column idx contains subsequent id numbers. But, for example, we could have same value for all rows in the first column, and we will receive a random order.

IMHO ordering by all columns that are expected to have unique values makes more sense, than ordering by the first arbitrary column.

WDYT? I can create a separate PR for this change, if you agree with the above.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense, thanks! Let me look at this some more. If this is a bug surfaced because of the Trino integration, it would make sense to leave it here. Just want to look at the data in this case to understand this better.

@damian3031 damian3031 changed the title Fix expect_select_column_values_to_be_unique_within_record macro Add Trino Support Nov 9, 2023
Co-authored-by: Damian Owsianny <113946744+damian3031@users.noreply.github.com>
@damian3031
Copy link
Contributor Author

Hi @clausherther, any progress on reviewing this PR?

@clausherther
Copy link
Contributor

Hi @clausherther, any progress on reviewing this PR?

Sorry, holidays and family stuff got in the way, I'll try to get to it this week!

@wjhrdy
Copy link

wjhrdy commented Dec 14, 2023

Thanks for all the hard work on this.

I really appreciate it.

@damian3031
Copy link
Contributor Author

Hi @clausherther, any update here?

@wjhrdy
Copy link

wjhrdy commented Feb 6, 2024

We are still interested in this as well. Thanks for the effort on this.

Copy link
Contributor

@clausherther clausherther left a comment

Choose a reason for hiding this comment

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

Sorry for the long wait on this one!

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.

Trino support
3 participants