Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SortExpression should be a struct, not a class #331

Closed
Grauenwolf opened this issue Jan 14, 2020 · 3 comments
Closed

SortExpression should be a struct, not a class #331

Grauenwolf opened this issue Jan 14, 2020 · 3 comments
Assignees

Comments

@Grauenwolf
Copy link
Collaborator

There is no reason to allocate a whole object for this simple container.

@Grauenwolf Grauenwolf added this to the Tortuga Chain 3.2 milestone Jan 14, 2020
@Grauenwolf
Copy link
Collaborator Author

Grauenwolf commented Jan 21, 2020

There is a race condition in SortExpression. It assumes that SortExpression will never be reused so it makes hidden changes.

Obviously this is bad, but we don't want to make BuildOrderByClause allocate more memory if we can avoid it.

@Grauenwolf Grauenwolf self-assigned this Jan 21, 2020
@Grauenwolf Grauenwolf modified the milestone: Tortuga Chain 3.2 Jan 28, 2020
@Grauenwolf
Copy link
Collaborator Author

That was stupid. It never actually used the hidden field.

@Grauenwolf
Copy link
Collaborator Author

Adding support for "columnName DESC" while we're here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant