HuashiSCNU0303 commented on issue #781:
URL: 
https://github.com/apache/datafusion-python/issues/781#issuecomment-2264634094

   > Just for my own education, what are the use cases for invoking 
`.to_variant()`? I came across these when I was working on python wrapper 
functions and I don't know how people are using these objects. Can you help me 
understand why we would want to do this traversal? I'm going to tackle exposing 
all of those variants in #767 and the better I can understand the user needs, 
the better I can make sure I'm getting them covered. Thank you!
   
   Thanks for your support. I would like to implement a custom query optimizer 
based on the LogicalPlan generated by Datafusion. It needs to obtain 
expressions within the LogicalPlan (such as filter and join conditions), and 
then process them differently according to the type of expression (such as In, 
Like, Cast, etc.). However, implementing it with string matching is very 
difficult because many edge cases need to be considered. Therefore, I hope to 
use ```to_variant()``` to conveniently perform type checks and extract specific 
fields of different types of expressions.


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