xitep commented on code in PR #1979:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1979#discussion_r2244403127


##########
src/dialect/mod.rs:
##########
@@ -841,6 +841,12 @@ pub trait Dialect: Debug + Any {
         false
     }
 
+    /// Returns true if this dialect allow colon placeholders
+    /// e.g. `SELECT :var` (JPA named parameters)
+    fn supports_colon_placeholder(&self) -> bool {
+        false
+    }

Review Comment:
   alright, after a lot of struggle i came to the conclusion that the approach 
with first-class placeholder is not feasible in `sqlparser`. After having the 
tokenizer and the model change ready, [this 
test](https://github.com/apache/datafusion-sqlparser-rs/blob/main/tests/sqlparser_postgres.rs#L2150)
 (now failing) convinced me, that my concern cannot be resolved at the level of 
the tokenizer since `sqlparser` needs to be very flexible and determine the 
meaning only on the level of the parser. you can [have a look 
here](https://github.com/xitep/datafusion-sqlparser-rs/commit/c97440558c16dedb024ff6a332fc8259b10cec55)
 ([here's the consequential change to the parser 
then](https://github.com/xitep/datafusion-sqlparser-rs/commit/6426bef3bdba7a1257550c85188349e32610eda8),
 at how the change we discussed would have looked like.
   
   fortunately, i have found a far smaller change, that satisfies my needs and 
will update this PR.



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