mirror of
				https://github.com/cldellow/sqlite-parquet-vtable.git
				synced 2025-10-31 02:19:56 +00:00 
			
		
		
		
	More tests cases to deal with affinity
I'm not sure how these manifest - whether SQLite retypes them based on column affinity before we see them, or whether they're provided as is.
This commit is contained in:
		| @@ -1,2 +1,2 @@ | ||||
| select printf('%.2f', double_6) as double_6 from nulls where double_6 > 98 | ||||
| select printf('%.2f', double_6) as double_6 from nulls where double_6 > 98.0 | ||||
| 99.00 | ||||
|   | ||||
| @@ -1 +1 @@ | ||||
| select printf('%.2f', double_6) from nulls where rowid = 0 and double_6 <> 99 | ||||
| select printf('%.2f', double_6) from nulls where rowid = 0 and double_6 <> 99.0 | ||||
|   | ||||
| @@ -1,2 +1,2 @@ | ||||
| select printf('%.2f', double_6) from nulls where rowid = 0 and double_6 <> 100 | ||||
| select printf('%.2f', double_6) from nulls where rowid = 0 and double_6 <> 100.0 | ||||
| 99.00 | ||||
|   | ||||
							
								
								
									
										2
									
								
								tests/queries/059-rowid-eq-string.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/059-rowid-eq-string.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select count(*) from no_nulls1 where rowid = '1' | ||||
| 1 | ||||
							
								
								
									
										2
									
								
								tests/queries/060-rowid-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/060-rowid-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int8_1 from no_nulls1 where rowid = 50.0; | ||||
| 0 | ||||
							
								
								
									
										2
									
								
								tests/queries/061-string-eq-int.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/061-string-eq-int.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select string_7 from nulls where string_7 = 22; | ||||
| 22 | ||||
							
								
								
									
										1
									
								
								tests/queries/062-string-eq-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/queries/062-string-eq-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| select string_7 from nulls where string_7 = 22.0; | ||||
							
								
								
									
										2
									
								
								tests/queries/063-int8-eq-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/063-int8-eq-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int8_1 from nulls where int8_1 = 30.0; | ||||
| 30 | ||||
							
								
								
									
										2
									
								
								tests/queries/064-int8-eq-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/064-int8-eq-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int8_1 from nulls where int8_1 = '30.0'; | ||||
| 30 | ||||
							
								
								
									
										2
									
								
								tests/queries/065-int8-eq-str2.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/065-int8-eq-str2.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int8_1 from nulls where int8_1 = '30'; | ||||
| 30 | ||||
							
								
								
									
										1
									
								
								tests/queries/066-int8-eq-bogus-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/queries/066-int8-eq-bogus-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| select int8_1 from nulls where int8_1 = '30f'; | ||||
							
								
								
									
										2
									
								
								tests/queries/067-int8-lt-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/067-int8-lt-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int8_1 from nulls where int8_1 < '-46' | ||||
| -48 | ||||
							
								
								
									
										2
									
								
								tests/queries/068-int8-lt-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/068-int8-lt-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int8_1 from nulls where int8_1 < -46.0 | ||||
| -48 | ||||
							
								
								
									
										3
									
								
								tests/queries/069-int8-lte-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tests/queries/069-int8-lte-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| select int8_1 from nulls where int8_1 <= '-46' | ||||
| -46 | ||||
| -48 | ||||
							
								
								
									
										3
									
								
								tests/queries/070-int8-lte-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tests/queries/070-int8-lte-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| select int8_1 from nulls where int8_1 <= -46.0 | ||||
| -46 | ||||
| -48 | ||||
							
								
								
									
										2
									
								
								tests/queries/071-int8-gt-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/071-int8-gt-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int8_1 from nulls where int8_1 > '49' | ||||
| 50 | ||||
							
								
								
									
										2
									
								
								tests/queries/072-int8-gt-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/072-int8-gt-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int8_1 from nulls where int8_1 > 49.0 | ||||
| 50 | ||||
							
								
								
									
										3
									
								
								tests/queries/073-int8-gte-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tests/queries/073-int8-gte-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| select int8_1 from nulls where int8_1 >= '49' | ||||
| 50 | ||||
| 49 | ||||
							
								
								
									
										3
									
								
								tests/queries/074-int8-gte-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tests/queries/074-int8-gte-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| select int8_1 from nulls where int8_1 >= 49.0 | ||||
| 50 | ||||
| 49 | ||||
							
								
								
									
										1
									
								
								tests/queries/075-int8-ne-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/queries/075-int8-ne-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| select int8_1 from nulls where rowid = 66 and int8_1 <> '-16' | ||||
							
								
								
									
										1
									
								
								tests/queries/076-int8-ne-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/queries/076-int8-ne-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| select int8_1 from nulls where rowid = 66 and int8_1 <> -16.0 | ||||
							
								
								
									
										3
									
								
								tests/queries/077-int64-gte-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tests/queries/077-int64-gte-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| select int64_4 from nulls where int64_4 >= '49000000000' | ||||
| 50000000000 | ||||
| 49000000000 | ||||
							
								
								
									
										3
									
								
								tests/queries/078-int64-gte-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tests/queries/078-int64-gte-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| select int64_4 from nulls where int64_4 >= 49000000000.0 | ||||
| 50000000000 | ||||
| 49000000000 | ||||
							
								
								
									
										2
									
								
								tests/queries/079-int65-gt-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/079-int65-gt-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int64_4 from nulls where int64_4 > '49000000000' | ||||
| 50000000000 | ||||
							
								
								
									
										2
									
								
								tests/queries/080-int65-gt-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/080-int65-gt-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int64_4 from nulls where int64_4 > 49000000000.0 | ||||
| 50000000000 | ||||
							
								
								
									
										2
									
								
								tests/queries/081-int64-eq-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/081-int64-eq-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int64_4 from nulls where int64_4 = '49000000000' | ||||
| 49000000000 | ||||
							
								
								
									
										2
									
								
								tests/queries/082-int64-eq-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/082-int64-eq-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int64_4 from nulls where int64_4 = 49000000000.0 | ||||
| 49000000000 | ||||
							
								
								
									
										2
									
								
								tests/queries/083-int64-lt-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/083-int64-lt-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int64_4 from nulls where int64_4 < '-46000000000' | ||||
| -47000000000 | ||||
							
								
								
									
										2
									
								
								tests/queries/084-int64-lt-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/084-int64-lt-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int64_4 from nulls where int64_4 < -46000000000.0 | ||||
| -47000000000 | ||||
							
								
								
									
										3
									
								
								tests/queries/085-int64-lte-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tests/queries/085-int64-lte-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| select int64_4 from nulls where int64_4 <= '-45000000000' | ||||
| -45000000000 | ||||
| -47000000000 | ||||
							
								
								
									
										3
									
								
								tests/queries/086-int64-lte-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tests/queries/086-int64-lte-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| select int64_4 from nulls where int64_4 <= -45000000000.0 | ||||
| -45000000000 | ||||
| -47000000000 | ||||
							
								
								
									
										1
									
								
								tests/queries/087-int64-ne-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/queries/087-int64-ne-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| select int64_4 from nulls where rowid = 57 and int64_4 <> '-7000000000' | ||||
							
								
								
									
										1
									
								
								tests/queries/088-int64-ne-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/queries/088-int64-ne-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| select int64_4 from nulls where rowid = 57 and int64_4 <> -7000000000.0 | ||||
							
								
								
									
										2
									
								
								tests/queries/089-int64-ne-some-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/089-int64-ne-some-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int64_4 from nulls where rowid = 57 and int64_4 <> '-8000000000' | ||||
| -7000000000 | ||||
							
								
								
									
										2
									
								
								tests/queries/090-int64-ne-some-double.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/090-int64-ne-some-double.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select int64_4 from nulls where rowid = 57 and int64_4 <> -8000000000.0 | ||||
| -7000000000 | ||||
							
								
								
									
										2
									
								
								tests/queries/091-double-eq-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/091-double-eq-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select printf('%.2f', double_6) as double_6 from nulls where double_6 = '99.0' | ||||
| 99.00 | ||||
							
								
								
									
										2
									
								
								tests/queries/092-double-eq-int.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/092-double-eq-int.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select printf('%.2f', double_6) as double_6 from nulls where double_6 = 99 | ||||
| 99.00 | ||||
							
								
								
									
										2
									
								
								tests/queries/093-double-gt-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/093-double-gt-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select printf('%.2f', double_6) as double_6 from nulls where double_6 > '98' | ||||
| 99.00 | ||||
							
								
								
									
										2
									
								
								tests/queries/094-double-gt-int.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/094-double-gt-int.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select printf('%.2f', double_6) as double_6 from nulls where double_6 > 98 | ||||
| 99.00 | ||||
							
								
								
									
										3
									
								
								tests/queries/095-double-gte-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tests/queries/095-double-gte-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| select printf('%.2f', double_6) as double_6 from nulls where double_6 >= '49.5' | ||||
| 99.00 | ||||
| 49.50 | ||||
							
								
								
									
										2
									
								
								tests/queries/096-double-gte-int.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/096-double-gte-int.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select printf('%.2f', double_6) as double_6 from nulls where double_6 >= '99' | ||||
| 99.00 | ||||
							
								
								
									
										2
									
								
								tests/queries/097-double-lt-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/097-double-lt-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select printf('%.2f', double_6) from nulls where double_6 < '99.0' order by double_6 desc limit 1 | ||||
| 49.50 | ||||
							
								
								
									
										2
									
								
								tests/queries/098-double-lt-int.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/098-double-lt-int.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select printf('%.2f', double_6) from nulls where double_6 < 99 order by double_6 desc limit 1 | ||||
| 49.50 | ||||
							
								
								
									
										2
									
								
								tests/queries/099-double-lte-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/099-double-lte-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select printf('%.2f', double_6) from nulls where double_6 <= '99.0' order by double_6 desc limit 1 | ||||
| 99.00 | ||||
							
								
								
									
										2
									
								
								tests/queries/100-double-lte-int.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/queries/100-double-lte-int.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| select printf('%.2f', double_6) from nulls where double_6 <= 99 order by double_6 desc limit 1 | ||||
| 99.00 | ||||
							
								
								
									
										1
									
								
								tests/queries/101-double-rowid-and-field-ne-str.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/queries/101-double-rowid-and-field-ne-str.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| select printf('%.2f', double_6) from nulls where rowid = 0 and double_6 <> '99.0' | ||||
							
								
								
									
										1
									
								
								tests/queries/102-double-rowid-and-field-ne-int.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/queries/102-double-rowid-and-field-ne-int.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| select printf('%.2f', double_6) from nulls where rowid = 0 and double_6 <> 99 | ||||
| @@ -0,0 +1,2 @@ | ||||
| select printf('%.2f', double_6) from nulls where rowid = 0 and double_6 <> '100' | ||||
| 99.00 | ||||
| @@ -0,0 +1,2 @@ | ||||
| select printf('%.2f', double_6) from nulls where rowid = 0 and double_6 <> 100 | ||||
| 99.00 | ||||
		Reference in New Issue
	
	Block a user
	 Colin Dellow
					Colin Dellow