korbit-ai[bot] commented on code in PR #33306:
URL: https://github.com/apache/superset/pull/33306#discussion_r2069436229
##########
superset/sql/parse.py:
##########
@@ -619,6 +637,16 @@ def optimize(self) -> KustoKQLStatement:
"""
return KustoKQLStatement(self._sql, self.engine, self._parsed)
+ def check_functions_present(self, functions: set[str]) -> bool:
+ """
+ Check if any of the given functions are present in the script.
+
+ :param function_list: List of functions to check for
+ :return: True if any of the functions are present
+ """
+ logger.warning("Kusto KQL doesn't support checking for functions
present.")
+ return True
Review Comment:
### Misleading Log Warning with Incorrect Return Value <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The warning log is followed by returning True, which is misleading since the
function checking is not actually supported.
###### Why this matters
Returning True after a warning about unsupported functionality could lead to
false positive results in production. Security or validation checks relying on
this method would incorrectly assume functions are present when they may not be.
###### Suggested change ∙ *Feature Preview*
```python
logger.error("Kusto KQL doesn't support checking for functions present.")
return False
```
###### Provide feedback to improve future suggestions
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/5e6ad63e-a187-4392-af1d-07382a74b90b/upvote)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/5e6ad63e-a187-4392-af1d-07382a74b90b?what_not_true=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/5e6ad63e-a187-4392-af1d-07382a74b90b?what_out_of_scope=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/5e6ad63e-a187-4392-af1d-07382a74b90b?what_not_in_standard=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/5e6ad63e-a187-4392-af1d-07382a74b90b)
</details>
<sub>
💬 Looking for more details? Reply to this comment to chat with Korbit.
</sub>
<!--- korbi internal id:31946209-385d-4850-b001-1f232eedb300 -->
[](31946209-385d-4850-b001-1f232eedb300)
--
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]