Commit Graph
114 Commits
Author SHA1 Message Date
Claude Code 9ae1de960c experiment: fix Presto/Trino TIMESTAMP/DATE literal rendering under SQLAlchemy 2.0
Root cause of the where_latest_partition CompileError across hive/
presto/trino tests ("Could not render literal value '2023-05-01' with
datatype TIMESTAMP"): superset/models/sql_types/presto_sql_types.py's
TimeStamp/Date TypeDecorator subclasses only override process_bind_param,
which returns the *final* literal SQL text ("TIMESTAMP '2023-05-01'") -
Presto/Trino don't support parameter binding for these types, so
process_bind_param has always done double duty as the literal-rendering
hook too.

TypeDecorator.literal_processor()'s standard composition, when only
process_bind_param is overridden (no process_literal_param), pipes its
output through the *impl* type's own literal_processor - i.e. it takes
the string "TIMESTAMP '2023-05-01'" and still runs it through the real
TIMESTAMP type's literal processor, which expects an actual datetime
and calls .isoformat() on it. That blows up with a CompileError. This
composition happens for the process_bind_param fallback path
regardless of whether SQLAlchemy 1.4 or 2.0 - confirmed empirically
that overriding process_literal_param instead doesn't help either,
since TypeDecorator's own literal_processor() chains *both* paths
through the impl processor when the impl has one.

Fixed by overriding literal_processor() directly on both classes -
against TypeDecorator's own docstring advice ("should not implement
this method"), but correct here since process_bind_param already
returns final SQL text rather than a value for further impl
processing to convert.

Separately, hive_tests.py/presto_tests.py hardcoded the expected
compiled SQL for an empty-column select() with two spaces before the
newline ("SELECT  \n"); SQLAlchemy 2.0 renders it with one ("SELECT
\n") - a cosmetic Core-compiler change, fixed the expected strings to
match.

Verified locally (sqlite): tests/integration_tests/db_engine_specs/
and tests/unit_tests/db_engine_specs/ where_latest_partition tests
(hive, presto, trino, both integration and unit) all pass.
2026-08-10 04:39:58 -07:00
Evan RusackasandClaude Code f9378baba8 test(sqla): add the jinja orderby calculated column to the session (#42274)
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-07-21 10:16:29 -07:00
Hans Yu 6c58afe6ac refactor: do not cascade to TableColumn (#42222) 2026-07-21 09:00:47 -07:00
Evan RusackasandClaude Opus 4.8 e4005f02c6 fix(sqla): render Jinja templates in calculated columns used via orderby adhoc metrics (#41870)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 00:11:26 -07:00
Hans Yu 68ebc22e1e refactor: replace Engine.execute() with Connection.execute() (#41917) 2026-07-13 09:40:33 -07:00
Amin Ghadersohi c3f5e997a1 feat(mcp): chart type plugin registry for extensible generate_chart (#39922) 2026-07-02 00:31:19 -04:00
Ville Brofeldt b061b5d317 chore: fix lint on untouched files (#41333) 2026-06-23 11:29:19 -07:00
Hans Yu c49391ab08 refactor: update Connection.execute() to use queries with text() (#40277) 2026-06-22 15:36:15 -07:00
Amin Ghadersohi c1b5d05f83 fix(bigquery): set default dataset from schema in adjust_engine_params (#40776) 2026-06-15 18:37:06 -04:00
b85a2cdab1 fix: ODPS (MaxCompute) data source table preview failed (#38174)
Co-authored-by: zhutong6688 <zhutong66@163.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-06-05 17:57:44 -07:00
3cb00bf116 feat(database): add Google Cloud Datastore db engine spec (#37677)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
2026-03-06 16:40:17 -08:00
Daniel Vaz GasparandVille Brofeldt bb22eb1ca8 feat: add option for hash algorithms (#35621)
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2025-12-09 16:59:07 +00: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
Elizabeth Thompson 695a20d009 fix: catch no table error (#32640) 2025-08-21 10:40:44 -07:00
Maxime Beauchemin 3f8472ca7b chore: move some rules from ruff -> pylint (#34292) 2025-07-24 09:40:49 -07:00
Beto Dealmeida a26e1d822a chore: remove sqlparse (#33564) 2025-06-04 19:31:41 -04:00
Beto Dealmeida 8de58b9848 feat: use sqlglot to set limit (#33473) 2025-05-27 15:20:02 -04:00
Maxime Beauchemin c83eda9551 feat: add latest partition support for BigQuery (#30760) 2025-04-01 17:13:09 -07:00
Evan Rusackas 90651dfe3e fix(dev/ci): pre-commit fixes galore (#32352) 2025-02-24 11:26:45 -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 BeaucheminandElizabeth Thompson e51b95ffa8 chore: enforce more ruff rules (#31447)
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
2024-12-18 17:41:34 -08:00
Maxime Beauchemin 529aed5da1 chore(deps): cap async_timeout<5.0.0 (#31170) 2024-11-26 14:12:04 -08:00
Beto Dealmeida 09802acf0d refactor: remove more sqlparse (#31032) 2024-11-26 17:01:07 -05:00
Maxime Beauchemin fd9d3301f6 chore: deprecate tox in favor of act (#29382) 2024-11-26 13:27:37 -08:00
Michael S. Molina ff282492a1 fix: Revert "feat(trino): Add functionality to upload data (#29164)" (#31151) 2024-11-25 15:16:28 -03:00
c5f6cc6382 chore(🦾): bump python et-xmlfile 1.1.0 -> 2.0.0 & remove pyhive[hive] from requirements/development.in (#31040)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
2024-11-24 13:35:50 -08:00
Jack 849d426e06 feat(oauth): adding necessary changes to support bigquery oauth (#30674) 2024-10-30 14:56:22 -05:00
Maxime Beauchemin a849c29288 chore: enable lint PT009 'use regular assert over self.assert.*' (#30521) 2024-10-07 13:17:27 -07:00
Beto Dealmeida 0b34197815 fix: don't reformat generated queries (#30350) 2024-10-04 11:09:37 -04:00
1818054166 chore(tests): Spelling (#25454)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
2024-08-20 14:47:29 -06:00
Beto Dealmeida 39209c2b40 fix: handle empty catalog when DB supports them (#29840) 2024-08-13 10:08:43 -04:00
Beto Dealmeida fa095a98ed fix: Trino get_columns (#29566) 2024-07-12 16:37:49 -04:00
John Bodley 53798c7904 feat(trino): Add functionality to upload data (#29164) 2024-06-13 08:55:09 -07:00
Beto Dealmeida e90246fd1f feat(SIP-95): permissions for catalogs (#28317) 2024-05-06 11:41:58 -04:00
Beto Dealmeida 6cf681df68 feat(SIP-95): new endpoint for table metadata (#28122) 2024-04-25 12:23:49 -04:00
Maxime Beauchemin 2d63722150 chore: set up ruff as a new linter/formatter (#28158) 2024-04-24 17:19:53 -07:00
Beto Dealmeida 68a982dfe6 feat(sip-95): new endpoint for extra table metadata (#28063) 2024-04-18 10:42:53 -04:00
Beto Dealmeida 99a1601aea refactor: rename get_sqla_engine_with_context (#28012) 2024-04-12 13:31:05 -04:00
Beto Dealmeida 26d8077e97 chore: improve SQL parsing (#26767) 2024-03-13 18:27:01 -04:00
John Bodley 847ed3f5b0 refactor: Ensure Flask framework leverages the Flask-SQLAlchemy session (Phase II) (#26909) 2024-02-14 06:20:15 +13:00
Erich 484901f483 fix(pinot): typo in the name for epoch_ms_to_dttm (#26906) 2024-01-30 20:49:55 -08:00
Vitor Avila 4592dd13fa fix(BigQuery): Support special characters in column/metric names used in ORDER BY (#26461) 2024-01-23 20:26:53 -07:00
Mikel VukaandMikel Vuka 9972ac6908 refactor: use DATE_TRUNC for Elasticsearch time grain (#25717)
Co-authored-by: Mikel Vuka <mikel.vuka@zalando.de>
2023-10-20 10:05:05 -07:00
Mikel VukaandMikel Vuka e7cdfeeb2c feat: Add week time grain for Elasticsearch datasets (#25683)
Co-authored-by: Mikel Vuka <mikel.vuka@zalando.de>
2023-10-18 19:39:16 -07:00
Rui ZhaoandRui Zhao be3714e131 fix(Presto): catch DatabaseError when testing Presto views (#25559)
Co-authored-by: Rui Zhao <zhaorui@dropbox.com>
2023-10-11 11:31:07 -06:00
Erich c2a21d2da0 refactor(pinot): The python_date_format for a temporal column was not being passed to get_timestamp_expr (#24942) 2023-08-27 18:46:39 +02:00
Hugh A. Miles II 226c7f807d fix: SSH Tunnel creation with dynamic form (#24196) 2023-07-02 23:48:48 -04:00
Daniel Vaz Gaspar 0ddc0a6738 chore: remove marshmallow-enum dependency and bump FAB (#24499) 2023-06-27 08:37:43 +01: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