Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions backend/domain/memory/database/service/database_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -1224,6 +1224,11 @@ func (d databaseService) executeSelectSQL(ctx context.Context, req *ExecuteSQLRe
physicalField := order.Field
if mapped, exists := fieldNameToPhysical[order.Field]; exists {
physicalField = mapped
} else {
// AlterID
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment "AlterID" is vague and doesn't clearly explain the purpose of this else clause. Consider a more descriptive comment such as "Check if order.Field is a field ID (AlterID as string) instead of a field name" to clarify that this handles the case where the field is identified by its ID rather than its name.

Suggested change
// AlterID
// Check if order.Field is a field ID (AlterID as string) instead of a field name

Copilot uses AI. Check for mistakes.
if _, exists := fieldMap[order.Field]; exists {
physicalField = fieldMap[order.Field].PhysicalName
}
}

orderBy = append(orderBy, &rdb.OrderBy{
Expand Down
Loading