risinglightdb / pretty-xmlish

Pretty printing library for SQL
MIT License
24 stars 0 forks source link

subtract overflow in ascii mode #4

Open skyzh opened 1 year ago

skyzh commented 1 year ago
thread 'tokio-runtime-worker' panicked at 'attempt to subtract with overflow', /Users/skyzh/.cargo/registry/src/github.com-1ecc6299db9ec823/pretty-xmlish-0.1.7/src/lib.rs:253

if this line is changed to .ascii

https://github.com/risinglightdb/risinglight/blob/2143a7c93d262eb7334298e357a358b0f675bff6/src/executor_v2/explain.rs#L28

and run make apply_planner_test on macOS

ice1000 commented 1 year ago

The ascii mode is not well implemented as the Unicode version is the intended mode of this thing. Plus I still don't understand how are things different across platforms.. I don't think I assumed anything platform dependent