-
Notifications
You must be signed in to change notification settings - Fork 25k
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: wrong number of values for columns #42122
SQL: wrong number of values for columns #42122
Conversation
Closes #41811 |
Hi I've done three bugfixes, done some test locally and added two unit tests. Cheers |
Pinging @elastic/es-search |
@elasticmachine test this please |
@elasticmachine test this please |
f3117c0
to
46d7793
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general it looks good. I left some comments mostly cosmetic.
Also, I would like to see some integration tests, as well. For example, x-pack\plugin\sql\qa\src\main\resources\select.sql-spec
with actual queries involving duplicated columns being returned. An example query: SELECT salary, first_name, salary AS x FROM test_emp ORDER BY x LIMIT 3
.
Also, in elasticsearch\x-pack\plugin\sql\qa\src\main\resources\agg.sql-spec
I would add more queries. One example: SELECT gender AS g, gender, SUM(salary) AS s3, SUM(salary), SUM(salary) AS s5 FROM test_emp GROUP BY 2
.../plugin/sql/src/main/java/org/elasticsearch/xpack/sql/querydsl/container/QueryContainer.java
Outdated
Show resolved
Hide resolved
...in/sql/src/test/java/org/elasticsearch/xpack/sql/querydsl/container/QueryContainerTests.java
Outdated
Show resolved
Hide resolved
...in/sql/src/test/java/org/elasticsearch/xpack/sql/querydsl/container/QueryContainerTests.java
Outdated
Show resolved
Hide resolved
@emasab It would be great to also add tests to check if something breaks for the ordering on aggregates: https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/sql/qa/src/main/resources/agg-ordering.sql-spec when there is a duplicate column. |
@emasab did you get the chance to review our feedback? |
@astefan yes, it's almost ready. I was working on the other PR before |
made the changes and added some integration tests but these three are failing, although they produce correct results when called manually through the rest api.
|
@elasticmachine test this please |
@emasab I see why those are failing and it's ok. Please, move those three to |
@emasab also, don't forget to add some tests following @matriv 's comment, as well. Thanks. |
6a6e587
to
9b1dfea
Compare
9b1dfea
to
f650599
Compare
rebased to current master |
added aggregation ordering csv specifications
f650599
to
a305938
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thank you for the contribution!
Thanks a lot for your patience and for addressing our comments.
@matriv I was happy to contribute! There is always to learn from such important projects. |
@elasticmachine test this please |
@elasticmachin run elasticsearch-ci/bwc |
@elasticmachine update branch |
@elasticmachine test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.