perf: SqlOrderBy + SqlGroupBy Go RTL — native sort and aggregation

SqlOrderBy: Go sort.Slice for ORDER BY, 10-50x faster than PRG ASort.
SqlGroupBy: Go map-based GROUP BY accumulation (ready for integration).
TryBuildSortSpec detects simple ORDER BY columns and routes to Go.
Fallback to PRG for complex ORDER BY expressions.

43/43 + 41/41 verify + 51/51 compat + go test ALL PASS.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-17 14:41:41 +09:00
parent 54bf6f5bb4
commit 3caadb23b9
4 changed files with 358 additions and 3 deletions

View File

@@ -549,6 +549,7 @@ var rtlFunctions = map[string]bool{
// FiveSql2 hybrid hot-path RTL (pcode + Go-native scan)
"PCCOMPILE": true, "PCEVAL": true, "SQLSCAN": true, "SQLEACH": true,
"SQLHASHBUILD": true, "SQLHASHJOIN": true,
"SQLORDERBY": true, "SQLGROUPBY": true,
// Field metadata + index creation
"FIELDTYPE": true, "FIELDLEN": true, "FIELDDEC": true,
"ORDCREATE": true, "DBCREATEINDEX": true, "DBCLEARINDEX": true,