v.23.2Improvement

Improve JSONColumns Format for Empty Results

Improve JSONColumns format when the result is empty. Closes #46024. #46053 (flynn).
Improved JSONColumns format behavior when the query result is empty.

Why it matters

This feature addresses the issue of how the JSONColumns output format handles cases where the query result contains no rows. Previously, the output might have been incomplete or improper for empty results. The improvement ensures consistent and correct JSON output even when the result set is empty, enhancing usability and integration with systems expecting a valid JSON structure.

How to use it

No special action is required to enable this improvement. When using FORMAT JSONColumns in queries that might return empty result sets, the output will now produce a correctly structured JSON by default.