aminghadersohi opened a new pull request, #44718:
URL: https://github.com/apache/superset/pull/44718
### SUMMARY
Fixes found by running Superset against a local Apache Doris 4.1.3
(all-in-one image) through SQL Lab, dataset sync and the chart data API:
- **Quarter time grain fails.** The grain inherited from MySQL uses `+
INTERVAL QUARTER(col) QUARTER - INTERVAL 1 QUARTER`; Doris rejects it (`Cannot
invoke ... TimeUnit.ordinal() because "this.timeUnit" is null`), so every chart
with a quarter grain on Doris errors. It now uses `MAKEDATE(YEAR(col), 1) +
INTERVAL (QUARTER(col) - 1) * 3 MONTH`. The other grains were verified live
against expected buckets.
- **SSL switch does not encrypt.** `encryption_parameters` was `{"ssl":
"0"}`. mysqlclient receives URI query values as strings and neither `ssl="0"`
nor `ssl="1"` enables TLS, so the session goes out in cleartext (confirmed with
a loopback relay that saw the query text). `ssl_mode=REQUIRED` is honoured and
encrypts.
- **URIs built from connection parameters cannot load.**
`build_sqlalchemy_uri` produced `pydoris+pydoris://...`; no SQLAlchemy entry
point provides `pydoris.pydoris` (`NoSuchModuleError`). It now produces
`doris://...`.
- **Error mapping.** Host-down and unknown-host messages from MariaDB
Connector/C (`Can't connect to server on ...`, `Unknown server host ...`) and
Doris' own syntax, missing table, missing database and unknown column errors
all surfaced as `GENERIC_DB_ENGINE_ERROR`.
- **Column types.** `VARIANT`, `IPV4` and `IPV6` had no generic type, and
because the Doris mappings replace MySQL's, SQL Lab result columns reported by
the MySQL protocol as `NEWDECIMAL`, `TINY`, `SHORT` or `BLOB` also had none.
MySQL's mappings are now a fallback after the Doris ones.
### TESTING INSTRUCTIONS
`pytest tests/unit_tests/db_engine_specs/test_doris.py` (16 of the new cases
fail on master). Live: Doris 4.1.3 all-in-one, mysqlclient 2.2.8, charts for
every offered time grain, the connection-parameters URI with and without
encryption, and each error message above.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]