Copilot commented on code in PR #38299:
URL: https://github.com/apache/superset/pull/38299#discussion_r2885521339
##########
superset/db_engine_specs/spark.py:
##########
@@ -40,6 +42,8 @@
class SparkEngineSpec(HiveEngineSpec):
+ engine = "spark"
+ registry.register("spark", "pyhive.sqlalchemy_hive", "HiveDialect")
Review Comment:
Changing `SparkEngineSpec.engine` to `"spark"` means this engine spec will
only be considered “available” if `get_available_engine_specs()` can detect an
installed SQLAlchemy dialect backend named `spark`. Today that detection only
scans SQLAlchemy built-in dialects plus installed entry points; a runtime
`registry.register("spark", ...)` doesn’t feed into that scan, so
`drivers["spark"]` will likely stay empty and `/api/v1/database/available` will
filter Spark out entirely (it skips engine specs with no drivers). Consider
updating driver discovery to also check
`sqlalchemy.dialects.registry.load("spark")` (or similar) and populate
`drivers["spark"]`, or add an alias/fallback mechanism that doesn’t cause
`get_engine_spec("hive")` to resolve to `SparkEngineSpec`.
```suggestion
engine = "hive"
```
--
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]