SQL: [Tests] Enable tests which have been fixed (#57526) (#57538)

Enable integration tests for issues that have been fixed
over time.

(cherry picked from commit 117759ee152bcfb0043e5af3a784302ca31f6b8c)
This commit is contained in:
Marios Trivyzas 2020-06-02 23:38:33 +02:00 committed by GitHub
parent d638ecda68
commit 634936e3be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 33 deletions

View File

@ -227,9 +227,9 @@ SELECT gender g, COUNT(gender) c FROM "test_emp" GROUP BY g HAVING c > 10 AND c
aggCountOnColumnAndMultipleHavingWithLimit
SELECT gender g, COUNT(gender) c FROM "test_emp" GROUP BY g HAVING c > 10 AND c < 70 ORDER BY gender LIMIT 1;
aggCountOnColumnAndHavingBetween-Ignore
aggCountOnColumnAndHavingBetween
SELECT gender g, COUNT(gender) c FROM "test_emp" GROUP BY g HAVING c BETWEEN 10 AND 70 ORDER BY gender ASC;
aggCountOnColumnAndHavingBetweenWithLimit-Ignore
aggCountOnColumnAndHavingBetweenWithLimit
SELECT gender g, COUNT(gender) c FROM "test_emp" GROUP BY g HAVING c BETWEEN 10 AND 70 ORDER BY gender LIMIT 1;
aggCountStarAndMultipleHavingWithLimit
SELECT gender g, COUNT(*) c FROM "test_emp" GROUP BY g HAVING c > 10 AND c < 70 ORDER BY gender LIMIT 1;

View File

@ -34,8 +34,7 @@ SELECT COUNT(*) count FROM test_emp_copy WHERE extra_gender IS NOT NULL;
100
;
// Awaits for https://github.com/elastic/elasticsearch/issues/53545
aggWithNullFilter-Ignore
aggWithNullFilter
SELECT COUNT(*) count FROM test_emp_copy WHERE null_constant IS NULL;
count:l
@ -160,4 +159,4 @@ SELECT COUNT(*) FROM test_emp_copy WHERE extra_gender NOT LIKE '%m%';
COUNT(*):l
---------------
0
;
;

View File

@ -90,11 +90,11 @@ SELECT MONTHNAME("hire_date") AS month, COUNT(*) AS count FROM "test_emp" GROUP
monthNameWithDoubleGroupByAndOrderBy
SELECT MONTHNAME("hire_date") AS month, COUNT(*) AS count FROM "test_emp" GROUP BY MONTHNAME("hire_date"), MONTH("hire_date") ORDER BY MONTHNAME("hire_date") DESC;
monthNameWithGroupByOrderByAndHaving
SELECT CAST(MAX("salary") AS DOUBLE) max_salary, MONTHNAME("hire_date") month_name FROM "test_emp" GROUP BY MONTHNAME("hire_date") HAVING MAX("salary") > 50000 ORDER BY MONTHNAME(hire_date);
// AwaitsFix https://github.com/elastic/elasticsearch/issues/33519
// monthNameWithGroupByOrderByAndHaving
// SELECT CAST(MAX("salary") AS DOUBLE) max_salary, MONTHNAME("hire_date") month_name FROM "test_emp" GROUP BY MONTHNAME("hire_date") HAVING MAX("salary") > 50000 ORDER BY MONTHNAME(hire_date);
// dayNameWithHaving
// SELECT DAYNAME("hire_date") FROM "test_emp" GROUP BY DAYNAME("hire_date") HAVING MAX("emp_no") > ASCII(DAYNAME("hire_date"));
dayNameWithHaving-Ignore
SELECT DAYNAME("hire_date") FROM "test_emp" GROUP BY DAYNAME("hire_date") HAVING MAX("emp_no") > ASCII(DAYNAME("hire_date"));
dayNameGroupBy
SELECT DAYNAME(birth_date) AS dn FROM test_emp GROUP BY DAYNAME(birth_date) ORDER BY DAYNAME(birth_date) ASC NULLS FIRST LIMIT 10;

View File

@ -1868,7 +1868,8 @@ SELECT CAST('123' AS INT) AS int;
// end::conversionStringToIntCast
;
conversionIntToStringCast-Ignore
conversionIntToStringCast
schema::string:s
// tag::conversionIntToStringCast
SELECT CAST(123 AS VARCHAR) AS string;
@ -2586,7 +2587,6 @@ Monday
// end::dayName
;
// Ignored because of https://github.com/elastic/elasticsearch/issues/33796
constantMonthName-Ignore
// tag::monthName

View File

@ -173,23 +173,22 @@ modified:s | count:l
Al | 1
;
//this one doesn't return anything. The problem is "IS NOT NULL". GH issue created to generally investigate the NULLs usage: https://github.com/elastic/elasticsearch/issues/32079
//selectSubstringWithWhereNotNullAndCountGroupBy
//SELECT SUBSTRING("first_name",5,20) modified, COUNT(*) count FROM "test_emp" WHERE SUBSTRING("first_name",5,20) IS NOT NULL GROUP BY SUBSTRING("first_name",5,20) ORDER BY SUBSTRING("first_name",5,20) LIMIT 10;
selectSubstringWithWhereNotNullAndCountGroupBy
SELECT SUBSTRING("first_name",5,20) modified, COUNT(*) count FROM "test_emp" WHERE SUBSTRING("first_name",5,20) IS NOT NULL GROUP BY SUBSTRING("first_name",5,20) ORDER BY SUBSTRING("first_name",5,20) LIMIT 10;
// modified:s | count:l
//---------------+---------------
// |15
//adram |1
//af |1
//aja |1
//al |1
//andro |2
//antios |1
//ard |1
//areta |1
//arsan |1
//;
modified:s | count:l
---------------+---------------
|13
adram |1
af |1
aja |1
al |1
andro |1
ard |1
areta |1
arsan |1
ath |1
;
selectSubstringWithWhereAndGroupBy
SELECT SUBSTRING("first_name",5,20) modified, COUNT(*) count FROM "test_emp" GROUP BY SUBSTRING("first_name",5,20) ORDER BY SUBSTRING("first_name",5,20) LIMIT 10;

View File

@ -16,8 +16,8 @@ stringAsciiInline
SELECT ASCII('E') e;
//https://github.com/elastic/elasticsearch/issues/31863
//stringSelectConstantAsciiEqualsConstant
//SELECT ASCII('A') = 65 a FROM "test_emp" WHERE ASCII('A') = 65 ORDER BY emp_no;
stringSelectConstantAsciiEqualsConstant-Ignore
SELECT ASCII('A') = 65 a FROM "test_emp" WHERE ASCII('A') = 65 ORDER BY emp_no;
stringCharFilter
SELECT emp_no, CHAR(emp_no % 10000) m FROM "test_emp" WHERE CHAR(emp_no % 10000) = 'A';
@ -121,10 +121,8 @@ SELECT RIGHT(CONCAT('Elastic','search'), LENGTH('Search')) rightchars;
rightInline3
SELECT RIGHT('Elasticsearch', 0) rightchars;
// Unsupported yet
// Functions combined with 'LIKE' should perform the match inside a Painless script, whereas at the moment it's handled as a regular `match` query in ES.
//ltrimFilterWithLike
//SELECT LTRIM("first_name") lt FROM "test_emp" WHERE LTRIM("first_name") LIKE '%a%';
ltrimFilterWithLike
SELECT LTRIM("first_name") lt FROM "test_emp" WHERE LTRIM("first_name") LIKE '%a%';
rtrimFilter
SELECT RTRIM(first_name) rt FROM "test_emp" WHERE RTRIM(first_name) = 'Johnny';