malinjawi commented on PR #13595:
URL: https://github.com/apache/gluten/pull/13595#issuecomment-7050350541
Thanks for the careful review and for measuring the zeroing on its own
@sezruby.
> 1. **Null-slot zeroing cost.** Could you re-run the table with the zeroing
in?
**Null-slot zeroing cost** Re-ran it with the zeroing in. It doesn't slow
the write down: lineitem 60M went from 2.86 s to 2.93 s, within noise. The
files are now the same size as lance-spark's writer's.
| Input | Gluten, native write | Gluten, lance-spark's writer | Vanilla
Spark |
|---|---|---|---|
| lineitem 60M rows | 2.93 s | 6.25 s | 7.48 s |
| store_sales-like 12M rows | 1.23 s | 3.90 s | 4.15 s |
| 1M x 768 vectors | 1.01 s | 1.64 s | 1.75 s |
These are from one laptop (local[12], median of 6 runs). Lance's own
threads make local wall-clock gains look bigger than on a cluster, and the CPU
saved per write is the better guide. That came out at 1.75x for
store_sales-like and 1.29x for vectors, close to the 1.86x and 1.32x from the
cluster run in the description. I can re-run the cluster benchmark with the
zeroing in once I have cluster access again.
> 2. **Plans whose input is rows.** Is there a number for that case, e.g. a
`mapInPandas` producing 768-d vectors and then writing? If it's slower, the
offload could be skipped when the child isn't already columnar.
In my testing It isn't slower. With `mapInPandas` producing 1M x 768 vectors
(`MapInPandas -> RowToVeloxColumnar -> VeloxLanceAppendData`), most of the time
goes to Python: the native write takes 14.1 s vs 14.0 s with lance-spark's
writer, with about 25% less JVM CPU. So I kept the offload for row children.
Happy to skip it there if you'd still prefer. This one is also from the laptop,
and I can confirm it on the cluster too.
> 3. **JSON columns.** Could you add one round trip?
Added a round-trip test, "JSON columns are written natively and read back
as lance-spark's writer leaves them". While writing it I found that the Gluten
Lance scan throws on the JSON column instead of falling back, so the test reads
back with the batch scan off. That's on the read side, so probably worth
covering in #13648.
--
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]