Add tests for null keyword behavior

pull/10616/head
adamperlin 2018-07-03 17:21:51 -07:00
parent e20dada94a
commit 4ee241c949
7 changed files with 29 additions and 0 deletions

View File

@ -21,6 +21,7 @@ var skipTests = map[string]string{
"window": "ordering of results differs between queries (https://github.com/influxdata/platform/issues/96)",
"window_group_mean_ungroup": "error in influxql: failed to run query: timeValue column \"_start\" does not exist (https://github.com/influxdata/platform/issues/97)",
"string_max": "panic because no max() implementation for string (https://github.com/influxdata/platform/issues/352)",
"null_as_value": "null not supported as value in influxql",
}
func Test_QueryEndToEnd(t *testing.T) {

View File

@ -0,0 +1,3 @@
null = "test"
from(db: null)
|> range(start:-5m)

View File

@ -0,0 +1,10 @@
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,long,string,string,string,string,string,string
#partition,false,false,false,false,false,false,true,true,true,true,true,true
#default,_result,,,,,,,,,,,
,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path
,,97,2018-05-22T19:53:24.421470485Z,2018-05-22T19:54:24.421470485Z,2018-05-22T19:53:26Z,318324641792,free,disk,disk1s4,apfs,host.local,/private/var/vm
,,97,2018-05-22T19:53:24.421470485Z,2018-05-22T19:54:24.421470485Z,2018-05-22T19:53:36Z,318324609024,free,disk,disk1s4,apfs,host.local,/private/var/vm
,,97,2018-05-22T19:53:24.421470485Z,2018-05-22T19:54:24.421470485Z,2018-05-22T19:53:46Z,318324129792,free,disk,disk1s4,apfs,host.local,/private/var/vm
,,97,2018-05-22T19:53:24.421470485Z,2018-05-22T19:54:24.421470485Z,2018-05-22T19:53:56Z,318324129792,free,disk,disk1s4,apfs,host.local,/private/var/vm
,,97,2018-05-22T19:53:24.421470485Z,2018-05-22T19:54:24.421470485Z,2018-05-22T19:54:06Z,318326116352,free,disk,disk1s4,apfs,host.local,/private/var/vm
,,97,2018-05-22T19:53:24.421470485Z,2018-05-22T19:54:24.421470485Z,2018-05-22T19:54:16Z,318325084160,free,disk,disk1s4,apfs,host.local,/private/var/vm
1 #datatype string long dateTime:RFC3339 dateTime:RFC3339 dateTime:RFC3339 long string string string string string string
2 #partition false false false false false false true true true true true true
3 #default _result
4 result table _start _stop _time _value _field _measurement device fstype host path
5 97 2018-05-22T19:53:24.421470485Z 2018-05-22T19:54:24.421470485Z 2018-05-22T19:53:26Z 318324641792 free disk disk1s4 apfs host.local /private/var/vm
6 97 2018-05-22T19:53:24.421470485Z 2018-05-22T19:54:24.421470485Z 2018-05-22T19:53:36Z 318324609024 free disk disk1s4 apfs host.local /private/var/vm
7 97 2018-05-22T19:53:24.421470485Z 2018-05-22T19:54:24.421470485Z 2018-05-22T19:53:46Z 318324129792 free disk disk1s4 apfs host.local /private/var/vm
8 97 2018-05-22T19:53:24.421470485Z 2018-05-22T19:54:24.421470485Z 2018-05-22T19:53:56Z 318324129792 free disk disk1s4 apfs host.local /private/var/vm
9 97 2018-05-22T19:53:24.421470485Z 2018-05-22T19:54:24.421470485Z 2018-05-22T19:54:06Z 318326116352 free disk disk1s4 apfs host.local /private/var/vm
10 97 2018-05-22T19:53:24.421470485Z 2018-05-22T19:54:24.421470485Z 2018-05-22T19:54:16Z 318325084160 free disk disk1s4 apfs host.local /private/var/vm

View File

@ -0,0 +1,11 @@
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,long,string,string,string,string,string,string
#partition,false,false,false,false,false,false,true,true,true,true,true,true
#default,_result,,,,,,,,,,,
,result,table,_start,_stop,_time,_value,_field,_measurement,device,fstype,host,path
,,0,2018-05-22T19:53:24.421470485Z,2018-05-22T19:54:24.421470485Z,2018-05-22T19:53:26Z,318324641792,free,disk,disk1s4,apfs,host.local,/private/var/vm
,,0,2018-05-22T19:53:24.421470485Z,2018-05-22T19:54:24.421470485Z,2018-05-22T19:53:36Z,318324609024,free,disk,disk1s4,apfs,host.local,/private/var/vm
,,0,2018-05-22T19:53:24.421470485Z,2018-05-22T19:54:24.421470485Z,2018-05-22T19:53:46Z,318324129792,free,disk,disk1s4,apfs,host.local,/private/var/vm
,,0,2018-05-22T19:53:24.421470485Z,2018-05-22T19:54:24.421470485Z,2018-05-22T19:53:56Z,318324129792,free,disk,disk1s4,apfs,host.local,/private/var/vm
,,0,2018-05-22T19:53:24.421470485Z,2018-05-22T19:54:24.421470485Z,2018-05-22T19:54:06Z,318326116352,free,disk,disk1s4,apfs,host.local,/private/var/vm
,,0,2018-05-22T19:53:24.421470485Z,2018-05-22T19:54:24.421470485Z,2018-05-22T19:54:16Z,318325084160,free,disk,disk1s4,apfs,host.local,/private/var/vm
1 #datatype string long dateTime:RFC3339 dateTime:RFC3339 dateTime:RFC3339 long string string string string string string
2 #partition false false false false false false true true true true true true
3 #default _result
4 result table _start _stop _time _value _field _measurement device fstype host path
5 0 2018-05-22T19:53:24.421470485Z 2018-05-22T19:54:24.421470485Z 2018-05-22T19:53:26Z 318324641792 free disk disk1s4 apfs host.local /private/var/vm
6 0 2018-05-22T19:53:24.421470485Z 2018-05-22T19:54:24.421470485Z 2018-05-22T19:53:36Z 318324609024 free disk disk1s4 apfs host.local /private/var/vm
7 0 2018-05-22T19:53:24.421470485Z 2018-05-22T19:54:24.421470485Z 2018-05-22T19:53:46Z 318324129792 free disk disk1s4 apfs host.local /private/var/vm
8 0 2018-05-22T19:53:24.421470485Z 2018-05-22T19:54:24.421470485Z 2018-05-22T19:53:56Z 318324129792 free disk disk1s4 apfs host.local /private/var/vm
9 0 2018-05-22T19:53:24.421470485Z 2018-05-22T19:54:24.421470485Z 2018-05-22T19:54:06Z 318326116352 free disk disk1s4 apfs host.local /private/var/vm
10 0 2018-05-22T19:53:24.421470485Z 2018-05-22T19:54:24.421470485Z 2018-05-22T19:54:16Z 318325084160 free disk disk1s4 apfs host.local /private/var/vm

View File

@ -0,0 +1,3 @@
db = null
from(db: db)
|> range(start:-5m)

View File

@ -0,0 +1 @@
Null as value unimplemented
1 Null as value unimplemented