bito-code-review[bot] commented on PR #43607:
URL: https://github.com/apache/superset/pull/43607#issuecomment-5450679205

   <!-- Bito Reply -->
   The concern regarding identifiers containing `"` in `SHOW CREATE VIEW` is 
valid. Relying on raw interpolation for such identifiers can lead to 
regressions if future validation or quoting logic is introduced, as it 
conflates malformed input with expected behavior. 
   
   To address this, it is recommended to:
   1. Use parameterized queries for all identifier handling to ensure proper 
escaping and prevent SQL injection or syntax errors.
   2. Separate the testing of valid qualified identifiers from the testing of 
malformed identifiers, ensuring the latter is explicitly validated against a 
defined contract rather than implicitly handled by the engine.
   
   **tests/unit_tests/db_engine_specs/test_presto.py**
   ```
   cursor.execute.assert_called_once_with(
           dedent(
               """
               SELECT table_name FROM information_schema.tables
               WHERE table_schema = %(schema)s
               AND table_type = 'VIEW'
               """
           ).strip(),
           {"schema": "my_schema"},
       )
   ```


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