felipepessoto commented on PR #13790: URL: https://github.com/apache/gluten/pull/13790#issuecomment-7171825535
Thanks @malinjawi, the breakdown helps. I’d start with the two changes you proposed: create the `UnsafeProjection` only when an input row needs conversion, and create the spill directory only when it’s needed. Both reduce the cost of using Velox for small tasks beyond Delta. I’d discuss reducing the number of native runtimes per task separately. My concern with making the fallback the default is that we’re measuring **partial offload**. The `_delta_log` file scan already stays on Spark, and a query over a cached snapshot starts from Spark rows. If we send a handful of wide rows to Velox for a filter and then convert them back, it makes sense that Spark wins. What I don’t think we know yet is whether it still wins when there’s substantially more work per partition. Your prototype brought `count(*)` planning from 147 ms to 112 ms, close to vanilla’s 104 ms. The fallback still wins on the filtered scan (126 ms vs. 157 ms), so I wouldn’t discard it. Could you share the executed plan for the **internal metadata job** behind that scan, with rows per task and, if available, time spent in setup versus conversion? I’d rerun the comparison on a larger snapshot, looking at warm cached-state reads separately from cold log replay, before making this the default. If we need a workaround in the meantime, I’d keep it opt-in. -- 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]
