Commit Graph

40 Commits

Author SHA1 Message Date
Amin Ghadersohi
5c57c9c0b2 fix: add utc=True to pd.to_datetime for timezone-aware datetimes (#35587) 2025-10-28 16:12:28 -07:00
JUST.in DO IT
75af53dc3d fix: customize column description limit size in db_engine_spec (#34808) 2025-08-22 10:00:39 -07:00
Maxime Beauchemin
274aa143d3 chore: python version to 3.11 (while supporting 3.10) (#31503) 2025-01-13 18:22:49 -08:00
Maxime Beauchemin
e51b95ffa8 chore: enforce more ruff rules (#31447)
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
2024-12-18 17:41:34 -08:00
Eyal Ezer
07b2449bd7 refactor: Unify all json.(loads|dumps) usage to utils.json (#28702)
Co-authored-by: Eyal Ezer <eyal.ezer@ge.com>
2024-05-28 14:17:41 -07:00
Eyal Ezer
56f0fc4ec2 refactor: Migration of json utilities from core (#28522)
Co-authored-by: Eyal Ezer <eyal.ezer@ge.com>
2024-05-20 10:27:22 -07:00
Maxime Beauchemin
2d63722150 chore: set up ruff as a new linter/formatter (#28158) 2024-04-24 17:19:53 -07:00
Ville Brofeldt
219c4a14b3 fix(plugin-chart-echarts): support forced categorical x-axis (#26404) 2024-01-08 12:04:22 -08:00
Beto Dealmeida
aca006f38b fix: timezone issue in Pandas 2 (#24955) 2023-08-11 00:25:33 -07:00
Hugh A. Miles II
93e1db4bd9 fix: save columns reference from sqllab save datasets flow (#24248) 2023-06-20 13:54:19 -04:00
John Bodley
a4d5d7c6b9 chore(pre-commit): Add pyupgrade and pycln hooks (#24197) 2023-06-01 12:01:10 -07:00
John Bodley
d583ca9ef5 chore: Embrace the walrus operator (#24127) 2023-05-19 00:37:13 -07:00
EugeneTorap
4a828f57f4 chore: Update mypy and fix stubs issue (#24033) 2023-05-12 08:47:14 +01:00
Elizabeth Thompson
f2b61fca15 fix: edit pyarrow stringify to better handle emojis and accents (#22881) 2023-01-30 12:29:19 -08:00
Ville Brofeldt
577ac81686 chore(ci): fix numpy type errors and revert #22610 (#22782) 2023-01-19 14:53:48 +02:00
Elizabeth Thompson
804e89d725 fix: stringify ValueErrors for NaT types (#22628) 2023-01-06 15:15:12 -08:00
Elizabeth Thompson
1c20206057 fix: convert <NA> values to None instead of stringifying (#22321) 2022-12-02 17:15:20 -08:00
John Bodley
059e53a39f fix: Crash caused by numpy.vectorize (#21936) 2022-10-26 15:06:18 -07:00
EugeneTorap
76d6a9af91 chore: Support Python 3.10 and bump pandas 1.4 and pyarrow 6 (#21002)
* Bump pandas 1.4 and pyarrow 6

* Use engine="pyarrow" for pd.read_csv()

* Refactoring

* Refactoring

* Refactoring

* Use bytes in pd.read_json()

* Fix test_contribution

* Fix pandas issue when 'arrays' are empty but 'names' contain values

* fix: ValueError: For argument "ascending" expected type bool, received type NoneType.

* Remove engine="pyarrow" and convert bytes to string

* make copy of selected df to fix regression

* Simplify pd.read_json() and pd.read_csv() for example data

Co-authored-by: Ville Brofeldt <ville.brofeldt@apple.com>
2022-08-17 10:36:36 -03:00
Beto Dealmeida
f3b289d3c3 fix: ensure column name in description is string (#20340)
* fix: ensure column name in description is string

* Add unit test
2022-06-21 10:10:46 -03:00
Yeachan Park
8b72354654 fix(sqllab/charts): casting from timestamp[us] to timestamp[ns] would result in out of bounds timestamp (#18873)
* fix casting from timestamp[us] to timestamp[ns] would result in out of bounds timestamp from sqllab and charts

* Add unittests

* Lint changes and parameter variable rename

* Fix linting
2022-05-04 09:47:12 +03:00
Yongjie Zhao
d954c3df86 fix: can't sync temporal flag on virtual table (#19366) 2022-04-01 16:40:50 +08:00
Craig Rueda
4b34817b19 feat(ui): Adding manifest prefix config (#19141)
* Adding manifest prefix config

* Fixing broken tests

* Fixing import

* Adding prefix for remaining assets

* Changing static prefix strategy

* Fixing DST test

* Fixing up formatting

* Fixing up async_query_manager.py types
2022-03-17 08:58:48 -07:00
Beto Dealmeida
c993c5845f fix(BigQuery): explicitly quote columns in select_star (#16822)
* fix (BigQuery): explicitly quote columns in select_star

* Fix test

* Fix SELECT * in BQ

* Add unit tests

* Remove type changes
2021-10-06 07:43:32 -07:00
John Bodley
7e4c940314 chore(pylint): Enable useless-suppression check (#16388)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-24 03:58:41 +12:00
Nikola Gigić
609c3594ef feat(explore): Postgres datatype conversion (#13294)
* test

* unnecessary import

* fix lint

* changes

* fix lint

* changes

* changes

* changes

* changes

* answering comments & changes

* answering comments

* answering comments

* changes

* changes

* changes

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests
2021-03-12 10:36:43 +02:00
Jesse Yang
c14ed80f28 refactor: rename DbColumnType to GenericDataType (#12617) 2021-01-20 10:07:42 -08:00
Beto Dealmeida
4f678272d6 fix(presto): Handle ROW data stored as string (#10456)
* Handle ROW data stored as string

* Use destringify

* Fix mypy

* Fix mypy with cast

* Bypass pylint
2020-07-28 16:05:58 -07:00
Will Barrett
0017b61f51 refactor: Re-enable pylint on 5 files (#10106)
* Re-enable lint on 5 files

* revert something questionable

* Address PR feedback

* One more PR comment...

* black?

* Update code wrapping

* Disable bugged check

* Add a disable for a failure that's only showing up in CI.

* Fix bad refactor

* A little more lint fixing, bug fixing
2020-06-25 11:14:41 -07:00
John Bodley
91517a56a3 style(mypy): Spit-and-polish pass (#10001)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-07 08:53:46 -07:00
Ville Brofeldt
aad8209922 chore: Bump PyArrow to latest stable version (#9696) 2020-04-30 22:34:27 +03:00
Ville Brofeldt
980dd2fd41 pylint: accept specific 2 character names by default (#9460)
* lint: accept 2 letter names by default

* Address review comments

* Remove e and d from good-names
2020-04-08 20:32:26 +03:00
Ville Brofeldt
f1edcebc79 fix: handle list of lists from fetch_data (#9322)
* fix: handle list of lists from fetch_data

* Address comments
2020-03-18 22:04:26 +02:00
Ville Brofeldt
7a91498cf1 fix: share column type matching between model and result set (#9161)
* Share column type matching between model and result set

* Address comments
2020-03-04 16:33:22 +02:00
Rob DiCiuccio
0992445ae9 Catch TypeError on PyArrow array instantiation (#9139) 2020-02-17 08:34:00 -08:00
Craig Rueda
607cfd1f29 Moving away from using the root logger everywhere (#9099)
* Moving away from using the root logger everywhere

* self.logger -> logger
2020-02-07 23:38:48 -08:00
Rob DiCiuccio
161d211c07 SQL Lab: Use numpy structured arrays, fallback to JSON serialization (#9096)
* Use numpy structured arrays, fallback to JSON serialization

* Explicitly cast data as list when creating numpy array
2020-02-06 17:25:22 -08:00
Rob DiCiuccio
2fc3d84b5a Serialize nested columns as JSON strings (#9007) 2020-01-28 15:50:36 -08:00
Ville Brofeldt
e46ff239af Bump pandas to 0.25.3 (#8985)
* Bump pandas to 0.25.3 as per recommendation to get ready for 1.0

* Localize timezone aware Pandas series prior to Arrow conversion
2020-01-22 09:03:19 +02:00
Rob DiCiuccio
6537d5ed8c Replace pandas.DataFrame with PyArrow.Table for nullable int typing (#8733)
* Use PyArrow Table for query result serialization

* Cleanup dev comments

* Additional cleanup

* WIP: tests

* Remove explicit dtype logic from db_engine_specs

* Remove obsolete  column property

* SupersetTable column types

* Port SupersetDataFrame methods to SupersetTable

* Add test for nullable boolean columns

* Support datetime values with timezone offsets

* Black formatting

* Pylint

* More linting/formatting

* Resolve issue with timezones not appearing in results

* Types

* Enable running of tests in tests/db_engine_specs

* Resolve application context errors

* Refactor and add tests for pyodbc.Row conversion

* Appease isort, regardless of isort:skip

* Re-enable RESULTS_BACKEND_USE_MSGPACK default based on benchmarks

* Dataframe typing and nits

* Renames to reduce ambiguity
2020-01-03 11:55:39 -05:00