You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# purpose of test that all where conditions create the same group of values, thus same result
res_s3select_substring=remove_xml_tags_from_result( run_s3select(bucket_name,csv_obj_name,'select min(int(_2)),max(int(_2)) from stdin where substring(_2,1,1) == "1"')).replace("\n","")
res_s3select_between_numbers=remove_xml_tags_from_result( run_s3select(bucket_name,csv_obj_name,'select min(int(_2)),max(int(_2)) from stdin where int(_2)>=100 and int(_2)<200')).replace("\n","")
res_s3select_eq_modolu=remove_xml_tags_from_result( run_s3select(bucket_name,csv_obj_name,'select min(int(_2)),max(int(_2)) from stdin where int(_2)/100 == 1 or int(_2)/10 == 1 or int(_2) == 1')).replace("\n","")
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:
selectmin(int(_2)),max(int(_2)) from stdin wheresubstring(_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:
selectmin(int(_2)),max(int(_2)) from stdin whereint(_2)>=100andint(_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:
selectmin(int(_2)),max(int(_2)) from stdin whereint(_2)/100==1orint(_2)/10==1orint(_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?
The text was updated successfully, but these errors were encountered:
There are 3 different query inside
test_complex_expressions
and it said that these 3 query will have the same result.s3-tests/s3tests_boto3/functional/test_s3select.py
Lines 421 to 426 in 8893cc4
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:
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".where
clause is true for numbers 100 - 200. So, the min value is 100 and max value is 199.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?
The text was updated successfully, but these errors were encountered: