Skip to content

Commit 64bf1b5

Browse files
[7.x] SQL: Mute pivot testAverageWithOneValueAndOrder and testSumWithoutSubquery (#47030) (#47033)
Relates #47002
1 parent 00f2e7f commit 64bf1b5

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

x-pack/plugin/sql/qa/src/main/resources/pivot.csv-spec

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,18 @@ null |48396.28571428572|62140.666666666664
126126
1 |49767.22222222222|47073.25
127127
;
128128

129-
averageWithOneValueAndOrder
130-
schema::languages:bt|'F':d
131-
SELECT * FROM (SELECT languages, gender, salary FROM test_emp) PIVOT (AVG(salary) FOR gender IN ('F')) ORDER BY languages DESC LIMIT 4;
132-
133-
languages | 'F'
134-
---------------+------------------
135-
5 |46705.555555555555
136-
4 |49291.5
137-
3 |53660.0
138-
2 |50684.4
139-
;
129+
// AwaitsFix https://github.com/elastic/elasticsearch/issues/47002
130+
// averageWithOneValueAndOrder
131+
// schema::languages:bt|'F':d
132+
// SELECT * FROM (SELECT languages, gender, salary FROM test_emp) PIVOT (AVG(salary) FOR gender IN ('F')) ORDER BY languages DESC LIMIT 4;
133+
//
134+
// languages | 'F'
135+
// ---------------+------------------
136+
// 5 |46705.555555555555
137+
// 4 |49291.5
138+
// 3 |53660.0
139+
// 2 |50684.4
140+
// ;
140141

141142
averageWithTwoValuesAndOrderDesc
142143
schema::languages:bt|'M':d|'F':d
@@ -170,26 +171,26 @@ SELECT * FROM (SELECT languages, gender, salary FROM test_emp) PIVOT (AVG(salary
170171
---------------+-----------------+------------------
171172
null |48396.28571428572|62140.666666666664
172173
1 |49767.22222222222|47073.25
173-
2 |44103.90909090909|50684.4
174+
2 |44103.90909090909|50684.4
174175
3 |51741.90909090909|53660.0
175176
4 |47058.90909090909|49291.5
176177
5 |39052.875 |46705.555555555555
177178
;
178179

179-
180-
sumWithoutSubquery
181-
schema::birth_date:ts|emp_no:i|first_name:s|gender:s|hire_date:ts|last_name:s|1:i|2:i
182-
SELECT * FROM test_emp PIVOT (SUM(salary) FOR languages IN (1, 2)) LIMIT 5;
183-
184-
birth_date | emp_no | first_name | gender | hire_date | last_name | 1 | 2
185-
---------------------+---------------+---------------+---------------+---------------------+---------------+---------------+---------------
186-
null |10041 |Uri |F |1989-11-12 00:00:00.0|Lenart |56415 |null
187-
null |10043 |Yishay |M |1990-10-20 00:00:00.0|Tzvieli |34341 |null
188-
null |10044 |Mingsen |F |1994-05-21 00:00:00.0|Casley |39728 |null
189-
1952-04-19 00:00:00.0|10009 |Sumant |F |1985-02-18 00:00:00.0|Peac |66174 |null
190-
1953-01-07 00:00:00.0|10067 |Claudi |M |1987-03-04 00:00:00.0|Stavenow |null |52044
191-
1953-01-23 00:00:00.0|10019 |Lillian |null |1999-04-30 00:00:00.0|Haddadi |73717 |null
192-
;
180+
// AwaitsFix https://github.com/elastic/elasticsearch/issues/47002
181+
// sumWithoutSubquery
182+
// schema::birth_date:ts|emp_no:i|first_name:s|gender:s|hire_date:ts|last_name:s|1:i|2:i
183+
// SELECT * FROM test_emp PIVOT (SUM(salary) FOR languages IN (1, 2)) LIMIT 5;
184+
//
185+
// birth_date | emp_no | first_name | gender | hire_date | last_name | 1 | 2
186+
// ---------------------+---------------+---------------+---------------+---------------------+---------------+---------------+---------------
187+
// null |10041 |Uri |F |1989-11-12 00:00:00.0|Lenart |56415 |null
188+
// null |10043 |Yishay |M |1990-10-20 00:00:00.0|Tzvieli |34341 |null
189+
// null |10044 |Mingsen |F |1994-05-21 00:00:00.0|Casley |39728 |null
190+
// 1952-04-19 00:00:00.0|10009 |Sumant |F |1985-02-18 00:00:00.0|Peac |66174 |null
191+
// 1953-01-07 00:00:00.0|10067 |Claudi |M |1987-03-04 00:00:00.0|Stavenow |null |52044
192+
// 1953-01-23 00:00:00.0|10019 |Lillian |null |1999-04-30 00:00:00.0|Haddadi |73717 |null
193+
// ;
193194

194195
averageWithOneValueAndMath
195196
schema::languages:bt|'F':d

0 commit comments

Comments
 (0)