implement `orderedmap` to all tools to preserve column order in SQL restults
Prerequisites
- [x] Search the current open issues
Question
I am using the ToolboxClient (with mysql), and notice that the sql statement's column order is not the same with the result of sql.
Such as: sql statement in the yaml "select start_time, end_time, course_date from course"
when check the input of llm (the result of sql) or run tool using toolbox ui: {"course_date":"2025-09-15", "end_time":"2025-09-15 10:10:00", "start_time":"2025-09-15 11:30:00"}
It seems very subtle, but sometime confuse the llm the understanding when the order is meaningful.
Code
No response
Additional Details
No response
@feng-1985 Thankyou for opening this issue! Golang sorts map by keys during json.Marshal(). But seems like this could potentially be resolved by creating a custom Marshal() function. I'll open this issue up for contributions
orderedmap is introduced and implemented within the execute_sql tools in #1852. We will still have to expand this feature to all other tools.