You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/01/20 21:30:50 UTC

[GitHub] [arrow-datafusion] alamb commented on a change in pull request #1621: feat: Support Substring(str [from int] [for int])

alamb commented on a change in pull request #1621:
URL: https://github.com/apache/arrow-datafusion/pull/1621#discussion_r789164614



##########
File path: datafusion/tests/sql/expr.rs
##########
@@ -499,6 +499,16 @@ async fn test_interval_expressions() -> Result<()> {
     Ok(())
 }
 
+#[cfg(feature = "unicode_expressions")]

Review comment:
       I did not find one either. 
   
   You could potentially use the `#[should_panic` annotation. For example, something like (untested):
   
   ```rust
   #[tokio::test]
   #[should_panic(expected = "negative substring length not allowed")]
   async fn test_substring_expr_bad() -> Result<()> {
       test_expression!("substring('alphabet' from -1 for 1)", "l");
   }
   ```
   
   
   
   
   A helper would be great




-- 
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-unsubscribe@arrow.apache.org

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