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

[CT-78] [Bug] Adapters should be able to override string and numeric type of columns #4603

Closed
1 task done
mdesmet opened this issue Jan 20, 2022 · 1 comment · Fixed by #4604
Closed
1 task done
Labels
bug Something isn't working good_first_issue Straightforward + self-contained changes, good for new contributors! Team:Adapters Issues designated for the adapter area of the code
Milestone

Comments

@mdesmet
Copy link
Contributor

mdesmet commented Jan 20, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

String and numeric types are hardcoded in the base Column classes.

return Column.string_type(self.string_size())
elif self.is_numeric():
return Column.numeric_type(self.dtype, self.numeric_precision,

When running dbt_utils.union_relations with the Trino adapter, following columns are generated based, hoever varying is not supported by Trino and the Trino adapter suppleis an overriding method for string_type.

cast("administratieve groep/iov code" as character varying(256)) as "administratieve groep/iov code"

image

Expected Behavior

Adapters should be able to override the stirng and numeric types according to the specifications of the specific database.

Steps To Reproduce

No response

Relevant log output

No response

Environment

- OS: Macos
- Python: 3.9.10
- dbt: 1.0.0

What database are you using dbt with?

other (mention it in "Additional Context")

Additional Context

Trino

@mdesmet mdesmet added bug Something isn't working triage labels Jan 20, 2022
@github-actions github-actions bot changed the title [Bug] Adapters should be able to override string and numeric type of columns [CT-78] [Bug] Adapters should be able to override string and numeric type of columns Jan 20, 2022
@jtcohen6 jtcohen6 added the Team:Adapters Issues designated for the adapter area of the code label Jan 21, 2022
@jtcohen6 jtcohen6 added this to the v1.1.0 milestone Feb 3, 2022
@McKnight-42
Copy link
Contributor

@mdesmet Thank you for opening up this issue, been catching up on context and looking over your PRs going to go ahead and move this from triage to a good first issue and see if we can get the tests running on your PR.

@McKnight-42 McKnight-42 added good_first_issue Straightforward + self-contained changes, good for new contributors! and removed triage labels Feb 3, 2022
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! Team:Adapters Issues designated for the adapter area of the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants