Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Test #1

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

Open
wants to merge 185 commits into
base: main
Choose a base branch
from
Open

Test #1

wants to merge 185 commits into from

Conversation

evb123
Copy link

@evb123 evb123 commented Jan 26, 2024

TEst

Jesse and others added 30 commits June 7, 2023 14:02
Signed-off-by: Jesse Whitehouse <[email protected]>
Signed-off-by: Jesse Whitehouse <[email protected]>
Signed-off-by: Jesse Whitehouse <[email protected]>
## Summary

Support OAuth flow for Databricks Azure

## Background

Some OAuth endpoints (e.g. Open ID Configuration) and scopes are different between Databricks Azure and AWS. Current code only supports OAuth flow on Databricks in AWS

## What changes are proposed in this pull request?

- Change `OAuthManager` to decouple Databricks AWS specific configuration from OAuth flow
- Add `sql/auth/endpoint.py` that implements cloud specific OAuth endpoint configuration
- Change `DatabricksOAuthProvider` to work with the OAuth configurations in different Databricks cloud (AWS, Azure)
- Add the corresponding unit tests
---------

Signed-off-by: Jesse Whitehouse <[email protected]>
Signed-off-by: Jesse Whitehouse <[email protected]>
* Cloud Fetch download handler

Signed-off-by: Matthew Kim <[email protected]>

* Issue fix: final result link compressed data has multiple LZ4 end-of-frame markers

Signed-off-by: Matthew Kim <[email protected]>

* Addressing PR comments
 - Linting
 - Type annotations
 - Use response.ok
 - Log exception
 - Remove semaphore and only use threading.event
 - reset() flags method
 - Fix tests after removing semaphore
 - Link expiry logic should be in secs
 - Decompress data static function
 - link_expiry_buffer and static public methods
 - Docstrings and comments

Signed-off-by: Matthew Kim <[email protected]>

* Changing logger.debug to remove url

Signed-off-by: Matthew Kim <[email protected]>

* _reset() comment to docstring

Signed-off-by: Matthew Kim <[email protected]>

* link_expiry_buffer -> link_expiry_buffer_secs

Signed-off-by: Matthew Kim <[email protected]>

---------

Signed-off-by: Matthew Kim <[email protected]>
* Cloud Fetch download manager

Signed-off-by: Matthew Kim <[email protected]>

* Bug fix: submit handler.run

Signed-off-by: Matthew Kim <[email protected]>

* Type annotations

Signed-off-by: Matthew Kim <[email protected]>

* Namedtuple -> dataclass

Signed-off-by: Matthew Kim <[email protected]>

* Shutdown thread pool and clear handlers

Signed-off-by: Matthew Kim <[email protected]>

* Docstrings and comments

Signed-off-by: Matthew Kim <[email protected]>

* handler.run is the correct call

Signed-off-by: Matthew Kim <[email protected]>

* Link expiry buffer in secs

Signed-off-by: Matthew Kim <[email protected]>

* Adding type annotations for download_handlers and downloadable_result_settings

Signed-off-by: Matthew Kim <[email protected]>

* Move DownloadableResultSettings to downloader.py to avoid circular import

Signed-off-by: Matthew Kim <[email protected]>

* Black linting

Signed-off-by: Matthew Kim <[email protected]>

* Timeout is never None

Signed-off-by: Matthew Kim <[email protected]>

---------

Signed-off-by: Matthew Kim <[email protected]>
* Cloud fetch queue and integration

Signed-off-by: Matthew Kim <[email protected]>

* Enable cloudfetch with direct results

Signed-off-by: Matthew Kim <[email protected]>

* Typing and style changes

Signed-off-by: Matthew Kim <[email protected]>

* Client-settable max_download_threads

Signed-off-by: Matthew Kim <[email protected]>

* Docstrings and comments

Signed-off-by: Matthew Kim <[email protected]>

* Increase default buffer size bytes to 104857600

Signed-off-by: Matthew Kim <[email protected]>

* Move max_download_threads to kwargs of ThriftBackend, fix unit tests

Signed-off-by: Matthew Kim <[email protected]>

* Fix tests: staticmethod make_arrow_table mock not callable

Signed-off-by: Matthew Kim <[email protected]>

* cancel_futures in shutdown() only available in python >=3.9.0

Signed-off-by: Matthew Kim <[email protected]>

* Black linting

Signed-off-by: Matthew Kim <[email protected]>

* Fix typing errors

Signed-off-by: Matthew Kim <[email protected]>

---------

Signed-off-by: Matthew Kim <[email protected]>
* Cloud Fetch e2e tests

Signed-off-by: Matthew Kim <[email protected]>

* Test case works for e2-dogfood shared unity catalog

Signed-off-by: Matthew Kim <[email protected]>

* Moving test to LargeQueriesSuite and setting catalog to hive_metastore

Signed-off-by: Matthew Kim <[email protected]>

* Align default value of buffer_size_bytes in driver tests

Signed-off-by: Matthew Kim <[email protected]>

* Adding comment to specify what's needed to run successfully

Signed-off-by: Matthew Kim <[email protected]>

---------

Signed-off-by: Matthew Kim <[email protected]>
Signed-off-by: Sebastian Eckweiler <[email protected]>
Signed-off-by: Jesse Whitehouse <[email protected]>
Co-authored-by: Sebastian Eckweiler <[email protected]>
Co-authored-by: Jesse Whitehouse <[email protected]>
Signed-off-by: Daniel Segesdi <[email protected]>
Signed-off-by: Jesse Whitehouse <[email protected]>
Co-authored-by: Jesse Whitehouse <[email protected]>
Signed-off-by: Jesse Whitehouse <[email protected]>
Co-authored-by: Jesse Whitehouse <[email protected]>
---------
Signed-off-by: Bogdan Kyryliuk <[email protected]>
Signed-off-by: Jesse Whitehouse <[email protected]>
Co-authored-by: Jesse Whitehouse <[email protected]>
Signed-off-by: William Gentry <[email protected]>
Signed-off-by: Jesse Whitehouse <[email protected]>
Co-authored-by: Jesse Whitehouse <[email protected]>
Signed-off-by: Jesse Whitehouse <[email protected]>
Behaviour is gated behind `enable_v3_retries` config. This will be removed and become the default behaviour in a subsequent release.

Signed-off-by: Jesse Whitehouse <[email protected]>
jprakash-db and others added 30 commits March 7, 2025 16:38
* Base changes

* Black formatter

* Cache version fix

* Added the changed test_retry.py file

* retry_test_mixins changes
Updated the codeowners
* make user_agent_header part of public API

* removed user_agent_entry from list of internal params

* add backward compatibility
…er (#521)

* commit 1

Signed-off-by: Madhav Sainanee <[email protected]>

* commit 1

Signed-off-by: Madhav Sainanee <[email protected]>

* updates runner for dco check

Signed-off-by: Madhav Sainanee <[email protected]>

* removes contributing file changes

Signed-off-by: Madhav Sainanee <[email protected]>

---------

Signed-off-by: Madhav Sainanee <[email protected]>
* Added check for 2 formats

* Wrote unit tests

* Added more supporting formats

* Added the T format datetime

* Added more timestamp formats

* Added python-dateutil library
Changed bound for python-datetutil
Added examples and fixed the async execute not working without pyarrow
* Added version check

* Removed packaging
Updated the version to 4.0.3
…re (#553)

* Clean thrift files

Signed-off-by: Vikrant Puppala <[email protected]>
…544)

This PR replaces the previous implementation of convert_decimals_in_arrow_table() with a more efficient approach that uses PyArrow's native casting operation instead of going through pandas conversion and array creation.

- Remove conversion to pandas DataFrame via to_pandas() and apply() methods
- Remove intermediate steps of creating array from decimal column and setting it back
- Replace with direct type casting using PyArrow's cast() method
- Build a new table with transformed columns rather than modifying the original table
- Create a new schema based on the modified fields

The new approach is more performant by avoiding pandas conversion overhead. The table below highlights substantial performance improvements when retrieving all rows from a table containing decimal columns, particularly when compression is disabled. Even greater gains were observed with compression enabled—showing approximately an 84% improvement (6 seconds compared to 39 seconds). Benchmarking was performed against e2-dogfood, with the client located in the us-west-2 region.
![image](https://github.com/user-attachments/assets/5407b651-8ab6-4c13-b525-cf912f503ba0)

Signed-off-by: Jayant Singh <[email protected]>
…t to prevent server side resource leaks (#554)

* Enhance Cursor close handling and context manager exception management

* tests

* fmt

* Fix Cursor.close() to properly handle CursorAlreadyClosedError

* Remove specific test message from Cursor.close() error handling

* Improve error handling in connection and cursor context managers to ensure proper closure during exceptions, including KeyboardInterrupt. Add tests for nested cursor management and verify operation closure on server-side errors.

* add

* add
* PECOBLR-86 Improve logging for debug level

Signed-off-by: Sai Shree Pradhan <[email protected]>

* PECOBLR-86 Improve logging for debug level

Signed-off-by: Sai Shree Pradhan <[email protected]>

* fixed format

Signed-off-by: Sai Shree Pradhan <[email protected]>

* used lazy logging

Signed-off-by: Sai Shree Pradhan <[email protected]>

* changed debug to error logs

Signed-off-by: Sai Shree Pradhan <[email protected]>

* used lazy logging

Signed-off-by: Sai Shree Pradhan <[email protected]>

---------

Signed-off-by: Sai Shree Pradhan <[email protected]>
More conditions to run github actions
* [init] working code for corrected test

Signed-off-by: varun-edachali-dbx <[email protected]>

* excess comments

Signed-off-by: varun-edachali-dbx <[email protected]>

* use pytest parametrize instead of unittest subtests, switch to pytest instead of unittest primitives

Signed-off-by: varun-edachali-dbx <[email protected]>

* initialisations, function calls, then assertions

Signed-off-by: varun-edachali-dbx <[email protected]>

* remove pytest parametrize, move back to unittest subTest

to allow keeping the test inside ClientTestSuite

Signed-off-by: varun-edachali-dbx <[email protected]>

* clean up docstring

Signed-off-by: varun-edachali-dbx <[email protected]>

* remove pytest import

Signed-off-by: varun-edachali-dbx <[email protected]>

---------

Signed-off-by: varun-edachali-dbx <[email protected]>
* Basic testing

* testing examples

* Basic working prototype

* ttypes fix

* Refractored the ttypes

* nit

* Added inline support

* Reordered boolean to be above int

* Check

Working e2e tests prototype

* More tests

* Added unit tests

* refractor

* nit

* nit

* nit

* nit
* Added change log

* Update CHANGELOG.md

Co-authored-by: Vikrant Puppala <[email protected]>

---------

Co-authored-by: Vikrant Puppala <[email protected]>
* Add test to check thrift field IDs

---------

Signed-off-by: Vikrant Puppala <[email protected]>
#613)

* Revert "Enhance Cursor close handling and context manager exception management to prevent server side resource leaks (#554)"

This reverts commit edfb283.

* revert e2e
* Release version 4.0.5: Reverted cursor close handling changes to fix user errors. Updated version numbers in pyproject.toml and __init__.py.

* Update CHANGELOG.md to include reference to issue #613 for cursor close handling fix.
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.