Closed gaoqiangz closed 1 week ago
I redesigned CompositeFunction
, please take a look.
I added supports_methods
to the Dialect
trait and try_parse_method
to the Parser
, this might be better suited for different scenarios and doesn't break existing behavior.
The code has been rewritten for the new Method
definition, seems more reasonable:
pub struct Method {
pub expr: Box<Expr>,
// always non-empty
pub method_chain: Vec<Function>,
}
Any other comments?
@gaoqiangz could you take a look at the doc building failure when you get the chance?
@iffyio CI was fixed.
🚀
Thanks again @gaoqiangz and @lovasoa and @iffyio
@gaoqiangz I've been working on a similar addition, it's great to see you beat me to it :-) One thing I added in my (unpublished) work is data-type specific methods. For example:
SELECT geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326).STAsText() FROM customers
How would you support the geography
data type here? In my code I added it as a namespace
field. I'm trying to avoid expanding ObjectName. Do you think that can work in your code too?
Supports
XQuery
methods:See https://learn.microsoft.com/en-us/sql/t-sql/xml/xml-data-type-methods?view=sql-server-ver16.