Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sqlalchemy: support TINYINT type#126

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
susodapop wants to merge6 commits intomainfromissue-125
Closed

sqlalchemy: support TINYINT type#126

susodapop wants to merge6 commits intomainfromissue-125

Conversation

@susodapop
Copy link
Contributor

@susodapopsusodapop commentedMay 16, 2023
edited
Loading

Description

Adds support for the DatabricksTINYINT type.

To use theTINYINT users can:

fromdatabricks.sqlalchemy.dialectimportTINYINTSampleTable=Table("some_table_name",metadata_obj,Column("small_number",TINYINT),)

Related Tickets & Documents

Closes#123

Related to#108 since we'll need to implement BINARY in a similar fashion.

gdippolito reacted with thumbs up emoji
Jesse Whitehouse added4 commitsMay 15, 2023 14:55
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
There seems to be two mechanisms where I can hook into the type compilerIn this one, I explicitly set a dialect-specific compilation overwrite.Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
mechanism. This is simpler than the approach in the commit I'm reverting.This partially reverts commitb35f0c9.Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
@susodapop
Copy link
ContributorAuthor

For future reference, I identified a couple ways to register this type with SQLAlchemy's type compiler. I committed both on this branch but reverted the more complicated solution and kept the simplest one (using thevisit_ mechanism).

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
@susodapop
Copy link
ContributorAuthor

In this PR, I also want to updateexamples/sqlalchemy.py tos how how to use the TINYINT type. When I tried this I'm seeing this exceptionModuleNotFoundError: No module named 'sqlalchemy.orm'; 'sqlalchemy' is not a package which seems like an environment problem. Going to revisit this after I open a PR for reusing TCP connections.

@susodapopsusodapop marked this pull request as draftMay 24, 2023 19:06
@gdippolito
Copy link

Hello! I think we are facing an issue that would be fixed by this PR. Would it be possible to merge it?

@gdippolito
Copy link

Ping@susodapop in case you didn't see my previous comment 😄

Do you have any plans to add support for TINYINT?

@susodapop
Copy link
ContributorAuthor

Hey@gdippolito I'm dropping this PR in favour of#265 which will merge and be released next week. Thanks for your patience in this regard. We've completely rewritten our dialect and incorporated this addition into that effort.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@arikfrarikfrAwaiting requested review from arikfr

@yunbodeng-dbyunbodeng-dbAwaiting requested review from yunbodeng-db

@andrefurlan-dbandrefurlan-dbAwaiting requested review from andrefurlan-db

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Delta has TINYINT now which needs to be added in?

3 participants

@susodapop@gdippolito

[8]ページ先頭

©2009-2025 Movatter.jp