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

SQL: Add filtering to SYS TYPES #35852

Merged
merged 4 commits into from
Nov 26, 2018
Merged

SQL: Add filtering to SYS TYPES #35852

merged 4 commits into from
Nov 26, 2018

Conversation

costin
Copy link
Member

@costin costin commented Nov 23, 2018

Fix #35342

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

Copy link
Contributor

@matriv matriv left a comment

Choose a reason for hiding this comment

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

LGTM, left a comment

Copy link
Contributor

@bpintea bpintea left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

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

Left two questions. LGTM otherwise.

public void testSysTypes() throws Exception {
Command cmd = sql("SYS TYPES").v1();

List<String> names = asList("BYTE", "LONG", "BINARY", "NULL", "INTEGER", "SHORT", "HALF_FLOAT", "SCALED_FLOAT", "FLOAT", "DOUBLE",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why defining these manually? Probably, small chances there will be new data types added in the future, but it's still a safer way to have DataType populate the List?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because the order is different than that of the enum declaration. We could add sorting to it but then it would be the same logic as the one in the code and I wanted to check that manually.

@costin
Copy link
Member Author

costin commented Nov 23, 2018

run the gradle build tests 1

@matriv
Copy link
Contributor

matriv commented Nov 25, 2018

@costin just noticed that the issue you're referencing is not correct?

@costin costin merged commit 971299b into elastic:master Nov 26, 2018
@costin
Copy link
Member Author

costin commented Nov 26, 2018

@matriv the PR comment was picked from the commit comment which was indeed incorrect. I've updated both of them.

@costin costin deleted the fix-35342 branch November 26, 2018 10:10
costin added a commit that referenced this pull request Nov 26, 2018
costin added a commit that referenced this pull request Nov 26, 2018
costin added a commit that referenced this pull request Nov 26, 2018
Fix #35342

(cherry picked from commit cd822b7)
(cherry picked from commit 633a562)
(cherry picked from commit 971299b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants