* Add additional coverage to history websocket api related issue #93258 * Add additional coverage to history websocket api related issue #93258 * Fix results when union query ends up at the end instead of front * Apply suggestions from code review * resort * zero instead * fix exception * fix tests