bito-code-review[bot] commented on code in PR #44355:
URL: https://github.com/apache/superset/pull/44355#discussion_r4134178758
##########
superset/db_engine_specs/databricks.py:
##########
@@ -1055,6 +1078,18 @@ class DatabricksHiveEngineSpec(HiveEngineSpec):
# consolidates all Databricks connection methods. This spec exists for
# backwards compatibility with Interactive Cluster connections.
+ # Databricks Interactive Clusters apply the same strict type checking as
+ # Databricks SQL, so boolean filters need equality against boolean
keywords.
+ use_equality_for_boolean_filters: bool = True
+
+ @classmethod
+ def coerce_boolean_for_sql(cls, value: bool | None) -> Any:
+ # Same rationale as DatabricksBaseEngineSpec: the Hive driver renders
+ # Python booleans as 0/1 in some binding paths (#36765).
+ if value is None:
+ return None
+ return true() if value else false()
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Missing docstring (BITO 12147)</b></div>
<div id="fix">
BITO.md rule 12147 requires docstrings on all newly introduced Python
functions. The sibling override
`DatabricksBaseEngineSpec.coerce_boolean_for_sql` (line 260) has a full
docstring; this copy carries only inline comments.
</div>
</div>
<small><i>Code Review Run #a5b27e</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]