srv1n commented on issue #24727:
URL: https://github.com/apache/datafusion/issues/24727#issuecomment-6623271519

   A data point on sqlparser size. datafusion_expr::Expr embeds AST nodes 
(Expr::Wildcard → WildcardOptions → PlannedReplaceSelectItem → 
ReplaceSelectElement → sqlparser::ast::Expr), so its derives reach into the AST.
   
   To measure that, I built one small program (parse a statement, then clone, 
compare, hash and debug-print an Expr) with datafusion-expr 54.1 with and 
without its sql feature, keeping sqlparser 0.62 linked in both. Fat LTO, one 
codegen unit, macOS arm64.
   
   __text went from 3.50 MB to 4.74 MB, and symbols naming sqlparser from 1.7 
MB to 3.0 MB. sqlparser's Hash code went from none to 0.2 MB. So in this build 
the Expr link costs about 1.2 MB, which is real but modest, and removing 
Expr::Wildcard (per the TODO in expr.rs) should recover some of it. It doesn't 
explain a 20 MiB figure, though.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to