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

[PECOBLR-330] Support for complex params#559

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

Merged
jprakash-db merged 18 commits intomainfromjprakash-db/complex-param
Jun 16, 2025

Conversation

@jprakash-db
Copy link
Contributor

@jprakash-dbjprakash-db commentedMay 19, 2025
edited
Loading

Description

This PR introduces comprehensive support for complex parameter types (ARRAY andMAP) in the Databricks SQL Python client.

Key Changes

  • Added new parameter classes:ArrayParameter andMapParameter
  • These classes recursively wrap Python lists and dictionaries and serialize them into the appropriate Thrift structures.
  • The type inference logicdbsql_parameter_from_primitive is updated to recognize and construct these parameter types, including for nested complex values.
  • Added theTSparkParamValueArgs which is necessary to be passed as arguements for complex types

Testing

e2e

  • Added tests to insert and compare the results for nested structuresARRAY<ARRAY<STRING>>, ARRAY<MAP<STRING,INTEGER>>, MAP<STRING,ARRAY<STRING>>

unit

  • Added tests to verify the convertion of the params into the respective server contract format

@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in ourcontributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in ourcontributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in ourcontributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in ourcontributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in ourcontributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in ourcontributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

Working e2e tests prototype
@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in ourcontributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in ourcontributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@jprakash-dbjprakash-db changed the titleSupport for complex params[PECOBLR-330] Support for complex paramsJun 6, 2025
classParamEscaper:
_DATE_FORMAT="%Y-%m-%d"
_TIME_FORMAT="%H:%M:%S.%f"
_TIME_FORMAT="%H:%M:%S.%f %z"
Copy link
Contributor

Choose a reason for hiding this comment

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

Timezone will not be there for TIMESTAMP_NTZ param.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1, would like to know how we've accounted/tested for NTZ

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

If it is not there it will be an empty space, there is already a test suite that inserts NTZ and none NTZ and reads back to compare whether it is equal or not

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@vikrantpuppala@shivam2680 There are already existing tests that insert NTZ and non NTZ values and reads back from table to ensure everything is working as expected -

classParamEscaper:
_DATE_FORMAT="%Y-%m-%d"
_TIME_FORMAT="%H:%M:%S.%f"
_TIME_FORMAT="%H:%M:%S.%f %z"
Copy link
Contributor

Choose a reason for hiding this comment

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

+1, would like to know how we've accounted/tested for NTZ

Copy link

@gopalldbgopalldb left a comment

Choose a reason for hiding this comment

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

Is this not an opt-in feature, can't user disable this in favor of existing behavior?

@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in ourcontributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@jprakash-db
Copy link
ContributorAuthor

@gopalldb We are just adding support for more types, don't think there is anything to opt in. If the users don't use complex types they won't need this

@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in ourcontributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in ourcontributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

Copy link

@gopalldbgopalldb left a comment

Choose a reason for hiding this comment

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

Thanks!

@jprakash-dbjprakash-db merged commitad2bb62 intomainJun 16, 2025
22 of 23 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@vikrantpuppalavikrantpuppalavikrantpuppala approved these changes

@gopalldbgopalldbgopalldb approved these changes

@deeksha-dbdeeksha-dbAwaiting requested review from deeksha-db

@samikshya-dbsamikshya-dbAwaiting requested review from samikshya-db

@jackyhu-dbjackyhu-dbAwaiting requested review from jackyhu-db

@madhav-dbmadhav-dbAwaiting requested review from madhav-db

@jayantsing-dbjayantsing-dbAwaiting requested review from jayantsing-db

@shivam2680shivam2680Awaiting requested review from shivam2680

Assignees

@jprakash-dbjprakash-db

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@jprakash-db@vikrantpuppala@gopalldb@shivam2680

[8]ページ先頭

©2009-2025 Movatter.jp