iffyio commented on code in PR #1953:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1953#discussion_r2229194794


##########
tests/sqlparser_common.rs:
##########
@@ -16289,6 +16314,23 @@ fn parse_notnull() {
     notnull_unsupported_dialects.expr_parses_to("NOT NULL NOTNULL", "NOT 
NULL");
 }
 
+#[test]
+fn test_odbc_time_date_timestamp_support() {
+    let sql_d = "SELECT {d '2025-07-17'}, category_name FROM categories";
+    let _ = all_dialects().verified_stmt(sql_d);
+    let sql_t = "SELECT {t '14:12:01'}, category_name FROM categories";
+    let _ = all_dialects().verified_stmt(sql_t);
+    let sql_ts = "SELECT {ts '2025-07-17 14:12:01'}, category_name FROM 
categories";
+    let _ = all_dialects().verified_stmt(sql_ts);
+}
+
+#[test]
+#[should_panic]
+fn test_invalid_odbc_literal_fails() {
+    let sql = "SELECT {tt '14:12:01'} FROM foo";
+    let _ = all_dialects().verified_stmt(sql);
+}

Review Comment:
   here's [one 
example](https://github.com/apache/datafusion-sqlparser-rs/blob/3b08353f56830c9fee914a55d222d231f7be67ae/tests/sqlparser_common.rs#L420-L423)
 of how we do negative tests, can we rewrite to use that pattern instead of the 
should_panic macro? Also we can inline the scenario into the 
`test_odbc_time_date_timestamp_support` function since they belong to the same 
feature



##########
tests/sqlparser_common.rs:
##########
@@ -16289,6 +16314,23 @@ fn parse_notnull() {
     notnull_unsupported_dialects.expr_parses_to("NOT NULL NOTNULL", "NOT 
NULL");
 }
 
+#[test]
+fn test_odbc_time_date_timestamp_support() {

Review Comment:
   ```suggestion
   fn parse_odbc_time_date_timestamp() {
   ```



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to