matthias-Q commented on code in PR #5017:
URL: https://github.com/apache/arrow-datafusion/pull/5017#discussion_r1083445890


##########
datafusion/sql/src/expr/value.rs:
##########
@@ -96,13 +96,20 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
         param_data_types: &[DataType],
     ) -> Result<Expr> {
         // Parse the placeholder as a number because it is the only support 
from sqlparser and postgres
+        // __timeTo is not supported and should return a Plan Error #5005
         let index = param[1..].parse::<usize>();
         let idx = match index {
             Ok(index) => index - 1,
             Err(_) => {
-                return Err(DataFusionError::Internal(format!(
-                    "Invalid placeholder, not a number: {param}"
-                )));
+                if &param[1..] == "__timeTo" {
+                    return Err(DataFusionError::Plan(format!(
+                        "Placeholder not supported: {param}"
+                    )));
+                } else {
+                    return Err(DataFusionError::Internal(format!(
+                        "Invalid placeholder, not a number: {param}"
+                    )));
+                }

Review Comment:
   Ah, this was actually my first attempt, but it sounded too easy.
   
   I will implement it this way. Thanks for clarification



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

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

Reply via email to