Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions x-pack/plugin/sql/qa/src/main/resources/debug/debug.csv-spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
//
Copy link
Member Author

Choose a reason for hiding this comment

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

This file shouldn't be here - I'll remove it on the next commit once the feedback lands to avoid an extra build.


debug
SELECT * FROM (SELECT languages, gender, salary FROM test_emp) PIVOT (AVG(salary) FOR gender IN ('M', 'F'));
//SELECT languages FROM (SELECT languages, gender, salary FROM test_emp) PIVOT (AVG(salary) FOR gender IN ('M', 'F'));
SELECT first_name f, last_name l, dep.from_date d FROM test_emp WHERE dep.dep_name = 'Production' ORDER BY f LIMIT 5;

f:s | l:s | d:ts

Expand Down
16 changes: 1 addition & 15 deletions x-pack/plugin/sql/qa/src/main/resources/pivot.csv-spec
Original file line number Diff line number Diff line change
Expand Up @@ -203,18 +203,4 @@ null |31070.0
3 |26830.0
4 |24646.0
5 |23353.0
;

innerAggPivot
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you remove this? Isn't this the case that is supported?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Thx, I got confused and thought that we'd support this more trivial case.

schema::languages:bt|'F':d
SELECT * FROM (SELECT gender, salary, languages FROM test_emp) PIVOT (SUM_OF_SQUARES(salary) FOR gender IN ('M', 'F'));

languages | 'F'
---------------+---------------
null |31070.0
1 |23537.0
2 |25342.0
3 |26830.0
4 |24646.0
5 |23353.0
;
;