codeant-ai-for-open-source[bot] commented on PR #36544:
URL: https://github.com/apache/superset/pull/36544#issuecomment-3644015047

   ## Nitpicks 🔍
   
   <table>
   <tr><td>🔒&nbsp;<strong>No security issues identified</strong></td></tr>
   <tr><td>⚡&nbsp;<strong>Recommended areas for review</strong><br><br>
   
   - [ ] <a 
href='https://github.com/apache/superset/pull/36544/files#diff-b58b27c8628fa734d26ecadeb23f8c78701dd56b66fc445a4a1c1b5e82ffe805R86-R91'><strong>Type
 mismatch / casting</strong></a><br>The Option 1 example uses string literals 
in the WHERE clause (e.g. '{{ from_dttm | default("2024-01-01", true) }}'), 
which may be rendered as SQL strings and cause type or formatting errors on 
some databases. Consider demonstrating or recommending a conversion/cast (e.g., 
using the `to_datetime` filter or a DB-specific cast) so the example works 
reliably across engines.<br>
   
   - [ ] <a 
href='https://github.com/apache/superset/pull/36544/files#diff-727f1b346532c6b2c8a347eb1c5f45168417eda2f65dfbe8e2bfb35874bf7414R77-R82'><strong>`default`
 behavior clarity</strong></a><br>The Option 1 example uses `| 
default("2024-01-01", true)`. The second boolean parameter controls whether 
falsy values are treated as missing — this is easy to misinterpret. Verify the 
docs clearly align with Jinja semantics and consider clarifying why `true` is 
passed and what cases it covers.<br>
   
   - [ ] <a 
href='https://github.com/apache/superset/pull/36544/files#diff-b58b27c8628fa734d26ecadeb23f8c78701dd56b66fc445a4a1c1b5e82ffe805R86-R101'><strong>Hard-coded,
 potentially stale examples</strong></a><br>The examples use fixed 2024 dates 
in both the SQL and JSON parameter examples. These will become outdated and 
could confuse readers. Use placeholders (e.g. "YYYY-MM-DD"), relative dates, or 
explain that these are illustrative values.<br>
   
   - [ ] <a 
href='https://github.com/apache/superset/pull/36544/files#diff-727f1b346532c6b2c8a347eb1c5f45168417eda2f65dfbe8e2bfb35874bf7414R80-R82'><strong>Example
 Staleness</strong></a><br>The SQL examples use hard-coded calendar years 
("2024-01-01" / "2024-12-31"). These will become outdated and can confuse 
readers testing queries in later years. Consider using placeholders, relative 
examples, or ISO timestamps with times to avoid format mismatches with real 
datasets.<br>
   
   </td></tr>
   </table>
   


-- 
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]

Reply via email to