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

Proposal: support syntax "SET DEFAULT [GLOBAL] $SortMode" #24

Closed
MrCroxx opened this issue Feb 17, 2022 · 6 comments
Closed

Proposal: support syntax "SET DEFAULT [GLOBAL] $SortMode" #24

MrCroxx opened this issue Feb 17, 2022 · 6 comments
Assignees

Comments

@MrCroxx
Copy link
Contributor

MrCroxx commented Feb 17, 2022

In distributed environment, the order of query result set is uncertain, which is also not required in SQL without "ORDER BY".

To simplify the test script, we can support syntax like SET DEFAULT [GLOBAL] $SortMode to set the default sort mode required by query statement in the current file or all files, instead of specify sort mode after each. query statement.

@fuyufjh
Copy link
Contributor

fuyufjh commented Feb 17, 2022

Can we add an option to compare the result set without ordering?

@fuyufjh
Copy link
Contributor

fuyufjh commented Feb 17, 2022

BTW, it's bad to use a SET DEFAULT... syntax because SET command is usually a command for database.

@MrCroxx
Copy link
Contributor Author

MrCroxx commented Feb 17, 2022

Can we add an option to compare the result set without ordering?

We already have. But it's not the default config.

https://github.com/singularity-data/sqllogictest-rs/blob/77f0ae315a4d5056ab3a6d817683bbc3ef1cf835/src/parser.rs#L98-L109

@MrCroxx
Copy link
Contributor Author

MrCroxx commented Feb 17, 2022

@fuyufjh Do you prefer set RowSort as default or keep the current config and introduce a syntax to set the sort mode, 0.0 .

@fuyufjh
Copy link
Contributor

fuyufjh commented Feb 17, 2022

@fuyufjh Do you prefer set RowSort as default or keep the current config and introduce a syntax to set the sort mode, 0.0 .

Both are okay for me. But if we want others to use our sqllogictest-rs, Prefer the later one ("introduce a syntax to set the sort mode")

@skyzh
Copy link
Member

skyzh commented Feb 17, 2022

Yes, I would prefer to use some control statement. Currently, we have:

statement ok
xxxx

... and we can have

+control default rowsort

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

3 participants