test_complex_expressions seems incorrect
- Dominant language
- Python
- Stars
- 372
- Forks
- 328
- PR merge metrics
- No merged PRs in 30d
Description
There are 3 different query inside `test_complex_expressions` and it said that these 3 query will have the same result.
https://github.com/ceph/s3-tests/blob/8893cc49c5a977b44b8566d43dd1c214ad0411fa/s3tests_boto3/functional/test_s3select.py#L421-L426
But, after inspecting it, I found that it will not have the same result. This test will create CSV object with 10,000 rows and 10 columns and random value between 0-1000. Which mean:
- for the first query:
```sql
select min(int(_2)),max(int(_2)) from stdin where substring(_2,1,1) == "1"'
```
`where` clause is true for every number with "1" as their first digit such as: 1, 10-19, 100-199, and 1000. Thus, the min. value is 1 and max value is "1000".
- for the second query:
```sql
select min(int(_2)),max(int(_2)) from stdin where int(_2)>=100 and int(_2)<200
```
`where` clause is true for numbers 100 - 200. So, the min value is 100 and max value is 199.
- and for the last one:
```sql
select min(int(_2)),max(int(_2)) from stdin where int(_2)/100 == 1 or int(_2)/10 == 1 or int(_2) == 1'
```
`where` clause is true for every number that returns 1 when divided (integer division) with 100 or 10, or IS 1 (i.e. 1, 10-19, and 100-199). So, min value is 1 and max value is 199.
Is it a mistakes or maybe I'm missing something here?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.