Documentation ¶
Index ¶
- Constants
- Variables
- type DatabasesOpSpec
- type DatabasesProcedureSpec
- func (s *DatabasesProcedureSpec) Copy() plan.ProcedureSpec
- func (s *DatabasesProcedureSpec) GetHost() *string
- func (s *DatabasesProcedureSpec) GetOrg() *influxdb.NameOrID
- func (s *DatabasesProcedureSpec) GetToken() *string
- func (s *DatabasesProcedureSpec) Kind() plan.ProcedureKind
- func (s *DatabasesProcedureSpec) PostPhysicalValidate(id plan.NodeID) error
- func (s *DatabasesProcedureSpec) SetHost(host *string)
- func (s *DatabasesProcedureSpec) SetOrg(org *influxdb.NameOrID)
- func (s *DatabasesProcedureSpec) SetToken(token *string)
- type DatabasesRemoteProcedureSpec
- type DatabasesRemoteRule
- type FromInfluxJSONOpSpec
- type FromInfluxJSONProcedureSpec
- type JSONSource
Constants ¶
View Source
const ( DatabasesKind = "databases" DatabasesRemoteKind = "influxdata/influxdb/v1.databasesRemote" )
View Source
const FromInfluxJSONKind = "fromInfluxJSON"
Variables ¶
View Source
var FluxTestPackages = []*ast.Package{&ast.Package{ BaseNode: ast.BaseNode{ Errors: nil, Loc: nil, }, Files: []*ast.File{&ast.File{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "package v1_test\n \nimport \"testing\"\nimport \"influxdata/influxdb/v1\"\n\noption now = () => (2030-01-01T00:00:00Z)\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string\n#group,false,false,false,false,true,true,true\n#default,_result,,,,,,\n,result,table,_time,_value,_field,_measurement,host\n,,0,2018-05-22T19:53:26Z,1.83,load1,system,host.local\n,,0,2018-05-22T19:53:36Z,1.7,load1,system,host.local\n,,0,2018-05-22T19:53:46Z,1.74,load1,system,host.local\n,,0,2018-05-22T19:53:56Z,1.63,load1,system,host.local\n,,0,2018-05-22T19:54:06Z,1.91,load1,system,host.local\n,,0,2018-05-22T19:54:16Z,1.84,load1,system,host.local\n,,1,2018-05-22T19:53:26Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:53:36Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:46Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:56Z,1.96,load15,system,host.local\n,,1,2018-05-22T19:54:06Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:54:16Z,1.97,load15,system,host.local\n,,2,2018-05-22T19:53:26Z,1.95,load5,system,host.local\n,,2,2018-05-22T19:53:36Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:46Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:56Z,1.89,load5,system,host.local\n,,2,2018-05-22T19:54:06Z,1.94,load5,system,host.local\n,,2,2018-05-22T19:54:16Z,1.93,load5,system,host.local\n,,3,2018-05-22T19:53:26Z,82.9833984375,used_percent,swap,host.local\n,,3,2018-05-22T19:53:36Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:53:46Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:53:56Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:54:06Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:54:16Z,82.6416015625,used_percent,swap,host.local\n\"\n\noutData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,double\n#group,false,false,true,true,false,true,true,false\n#default,0,,,,,,,\n,result,table,_start,_stop,_time,_measurement,host,used_percent\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:26Z,swap,host.local,82.9833984375\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:36Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:46Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:56Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:06Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:16Z,swap,host.local,82.6416015625\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,double,double,double\n#group,false,false,true,true,false,true,true,false,false,false\n#default,0,,,,,,,,,\n,result,table,_start,_stop,_time,_measurement,host,load1,load15,load5\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:26Z,system,host.local,1.83,1.98,1.95\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:36Z,system,host.local,1.7,1.97,1.92\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:46Z,system,host.local,1.74,1.97,1.92\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:56Z,system,host.local,1.63,1.96,1.89\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:06Z,system,host.local,1.91,1.98,1.94\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:16Z,system,host.local,1.84,1.97,1.93\n\"\n\nt_influxFieldsAsCols = (table=<-) =>\n\t(table\n\t\t|> range(start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)\n\t\t|> v1.fieldsAsCols()\n\t\t|> yield(name: \"0\"))\n\ntest _influxFieldsAsCols = () =>\n\t({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_influxFieldsAsCols})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.OptionStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 6, }, File: "influxFieldsAsCols_test.flux", Source: "now = () => (2030-01-01T00:00:00Z)", Start: ast.Position{ Column: 8, Line: 6, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 6, }, File: "influxFieldsAsCols_test.flux", Source: "now", Start: ast.Position{ Column: 8, Line: 6, }, }, }, Name: "now", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 6, }, File: "influxFieldsAsCols_test.flux", Source: "() => (2030-01-01T00:00:00Z)", Start: ast.Position{ Column: 14, Line: 6, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 6, }, File: "influxFieldsAsCols_test.flux", Source: "(2030-01-01T00:00:00Z)", Start: ast.Position{ Column: 20, Line: 6, }, }, }, Expression: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 6, }, File: "influxFieldsAsCols_test.flux", Source: "2030-01-01T00:00:00Z", Start: ast.Position{ Column: 21, Line: 6, }, }, }, Value: parser.MustParseTime("2030-01-01T00:00:00Z"), }, }, Params: nil, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 6, }, File: "influxFieldsAsCols_test.flux", Source: "option now = () => (2030-01-01T00:00:00Z)", Start: ast.Position{ Column: 1, Line: 6, }, }, }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 37, }, File: "influxFieldsAsCols_test.flux", Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string\n#group,false,false,false,false,true,true,true\n#default,_result,,,,,,\n,result,table,_time,_value,_field,_measurement,host\n,,0,2018-05-22T19:53:26Z,1.83,load1,system,host.local\n,,0,2018-05-22T19:53:36Z,1.7,load1,system,host.local\n,,0,2018-05-22T19:53:46Z,1.74,load1,system,host.local\n,,0,2018-05-22T19:53:56Z,1.63,load1,system,host.local\n,,0,2018-05-22T19:54:06Z,1.91,load1,system,host.local\n,,0,2018-05-22T19:54:16Z,1.84,load1,system,host.local\n,,1,2018-05-22T19:53:26Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:53:36Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:46Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:56Z,1.96,load15,system,host.local\n,,1,2018-05-22T19:54:06Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:54:16Z,1.97,load15,system,host.local\n,,2,2018-05-22T19:53:26Z,1.95,load5,system,host.local\n,,2,2018-05-22T19:53:36Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:46Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:56Z,1.89,load5,system,host.local\n,,2,2018-05-22T19:54:06Z,1.94,load5,system,host.local\n,,2,2018-05-22T19:54:16Z,1.93,load5,system,host.local\n,,3,2018-05-22T19:53:26Z,82.9833984375,used_percent,swap,host.local\n,,3,2018-05-22T19:53:36Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:53:46Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:53:56Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:54:06Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:54:16Z,82.6416015625,used_percent,swap,host.local\n\"", Start: ast.Position{ Column: 1, Line: 8, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 8, }, File: "influxFieldsAsCols_test.flux", Source: "inData", Start: ast.Position{ Column: 1, Line: 8, }, }, }, Name: "inData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 37, }, File: "influxFieldsAsCols_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string\n#group,false,false,false,false,true,true,true\n#default,_result,,,,,,\n,result,table,_time,_value,_field,_measurement,host\n,,0,2018-05-22T19:53:26Z,1.83,load1,system,host.local\n,,0,2018-05-22T19:53:36Z,1.7,load1,system,host.local\n,,0,2018-05-22T19:53:46Z,1.74,load1,system,host.local\n,,0,2018-05-22T19:53:56Z,1.63,load1,system,host.local\n,,0,2018-05-22T19:54:06Z,1.91,load1,system,host.local\n,,0,2018-05-22T19:54:16Z,1.84,load1,system,host.local\n,,1,2018-05-22T19:53:26Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:53:36Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:46Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:56Z,1.96,load15,system,host.local\n,,1,2018-05-22T19:54:06Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:54:16Z,1.97,load15,system,host.local\n,,2,2018-05-22T19:53:26Z,1.95,load5,system,host.local\n,,2,2018-05-22T19:53:36Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:46Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:56Z,1.89,load5,system,host.local\n,,2,2018-05-22T19:54:06Z,1.94,load5,system,host.local\n,,2,2018-05-22T19:54:16Z,1.93,load5,system,host.local\n,,3,2018-05-22T19:53:26Z,82.9833984375,used_percent,swap,host.local\n,,3,2018-05-22T19:53:36Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:53:46Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:53:56Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:54:06Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:54:16Z,82.6416015625,used_percent,swap,host.local\n\"", Start: ast.Position{ Column: 10, Line: 8, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,double,string,string,string\n#group,false,false,false,false,true,true,true\n#default,_result,,,,,,\n,result,table,_time,_value,_field,_measurement,host\n,,0,2018-05-22T19:53:26Z,1.83,load1,system,host.local\n,,0,2018-05-22T19:53:36Z,1.7,load1,system,host.local\n,,0,2018-05-22T19:53:46Z,1.74,load1,system,host.local\n,,0,2018-05-22T19:53:56Z,1.63,load1,system,host.local\n,,0,2018-05-22T19:54:06Z,1.91,load1,system,host.local\n,,0,2018-05-22T19:54:16Z,1.84,load1,system,host.local\n,,1,2018-05-22T19:53:26Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:53:36Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:46Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:56Z,1.96,load15,system,host.local\n,,1,2018-05-22T19:54:06Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:54:16Z,1.97,load15,system,host.local\n,,2,2018-05-22T19:53:26Z,1.95,load5,system,host.local\n,,2,2018-05-22T19:53:36Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:46Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:56Z,1.89,load5,system,host.local\n,,2,2018-05-22T19:54:06Z,1.94,load5,system,host.local\n,,2,2018-05-22T19:54:16Z,1.93,load5,system,host.local\n,,3,2018-05-22T19:53:26Z,82.9833984375,used_percent,swap,host.local\n,,3,2018-05-22T19:53:36Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:53:46Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:53:56Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:54:06Z,82.598876953125,used_percent,swap,host.local\n,,3,2018-05-22T19:54:16Z,82.6416015625,used_percent,swap,host.local\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 60, }, File: "influxFieldsAsCols_test.flux", Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,double\n#group,false,false,true,true,false,true,true,false\n#default,0,,,,,,,\n,result,table,_start,_stop,_time,_measurement,host,used_percent\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:26Z,swap,host.local,82.9833984375\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:36Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:46Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:56Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:06Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:16Z,swap,host.local,82.6416015625\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,double,double,double\n#group,false,false,true,true,false,true,true,false,false,false\n#default,0,,,,,,,,,\n,result,table,_start,_stop,_time,_measurement,host,load1,load15,load5\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:26Z,system,host.local,1.83,1.98,1.95\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:36Z,system,host.local,1.7,1.97,1.92\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:46Z,system,host.local,1.74,1.97,1.92\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:56Z,system,host.local,1.63,1.96,1.89\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:06Z,system,host.local,1.91,1.98,1.94\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:16Z,system,host.local,1.84,1.97,1.93\n\"", Start: ast.Position{ Column: 1, Line: 39, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 39, }, File: "influxFieldsAsCols_test.flux", Source: "outData", Start: ast.Position{ Column: 1, Line: 39, }, }, }, Name: "outData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 60, }, File: "influxFieldsAsCols_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,double\n#group,false,false,true,true,false,true,true,false\n#default,0,,,,,,,\n,result,table,_start,_stop,_time,_measurement,host,used_percent\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:26Z,swap,host.local,82.9833984375\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:36Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:46Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:56Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:06Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:16Z,swap,host.local,82.6416015625\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,double,double,double\n#group,false,false,true,true,false,true,true,false,false,false\n#default,0,,,,,,,,,\n,result,table,_start,_stop,_time,_measurement,host,load1,load15,load5\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:26Z,system,host.local,1.83,1.98,1.95\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:36Z,system,host.local,1.7,1.97,1.92\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:46Z,system,host.local,1.74,1.97,1.92\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:56Z,system,host.local,1.63,1.96,1.89\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:06Z,system,host.local,1.91,1.98,1.94\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:16Z,system,host.local,1.84,1.97,1.93\n\"", Start: ast.Position{ Column: 11, Line: 39, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,double\n#group,false,false,true,true,false,true,true,false\n#default,0,,,,,,,\n,result,table,_start,_stop,_time,_measurement,host,used_percent\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:26Z,swap,host.local,82.9833984375\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:36Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:46Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:56Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:06Z,swap,host.local,82.598876953125\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:16Z,swap,host.local,82.6416015625\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,double,double,double\n#group,false,false,true,true,false,true,true,false,false,false\n#default,0,,,,,,,,,\n,result,table,_start,_stop,_time,_measurement,host,load1,load15,load5\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:26Z,system,host.local,1.83,1.98,1.95\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:36Z,system,host.local,1.7,1.97,1.92\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:46Z,system,host.local,1.74,1.97,1.92\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:56Z,system,host.local,1.63,1.96,1.89\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:06Z,system,host.local,1.91,1.98,1.94\n,,1,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:16Z,system,host.local,1.84,1.97,1.93\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 66, }, File: "influxFieldsAsCols_test.flux", Source: "t_influxFieldsAsCols = (table=<-) =>\n\t(table\n\t\t|> range(start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)\n\t\t|> v1.fieldsAsCols()\n\t\t|> yield(name: \"0\"))", Start: ast.Position{ Column: 1, Line: 62, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 62, }, File: "influxFieldsAsCols_test.flux", Source: "t_influxFieldsAsCols", Start: ast.Position{ Column: 1, Line: 62, }, }, }, Name: "t_influxFieldsAsCols", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 66, }, File: "influxFieldsAsCols_test.flux", Source: "(table=<-) =>\n\t(table\n\t\t|> range(start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)\n\t\t|> v1.fieldsAsCols()\n\t\t|> yield(name: \"0\"))", Start: ast.Position{ Column: 24, Line: 62, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 66, }, File: "influxFieldsAsCols_test.flux", Source: "(table\n\t\t|> range(start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)\n\t\t|> v1.fieldsAsCols()\n\t\t|> yield(name: \"0\"))", Start: ast.Position{ Column: 2, Line: 63, }, }, }, Expression: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 63, }, File: "influxFieldsAsCols_test.flux", Source: "table", Start: ast.Position{ Column: 3, Line: 63, }, }, }, Name: "table", }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 64, }, File: "influxFieldsAsCols_test.flux", Source: "table\n\t\t|> range(start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)", Start: ast.Position{ Column: 3, Line: 63, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 64, }, File: "influxFieldsAsCols_test.flux", Source: "start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z", Start: ast.Position{ Column: 12, Line: 64, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 64, }, File: "influxFieldsAsCols_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 12, Line: 64, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 64, }, File: "influxFieldsAsCols_test.flux", Source: "start", Start: ast.Position{ Column: 12, Line: 64, }, }, }, Name: "start", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 64, }, File: "influxFieldsAsCols_test.flux", Source: "2018-05-22T19:53:26Z", Start: ast.Position{ Column: 19, Line: 64, }, }, }, Value: parser.MustParseTime("2018-05-22T19:53:26Z"), }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 64, }, File: "influxFieldsAsCols_test.flux", Source: "stop: 2018-05-22T19:54:17Z", Start: ast.Position{ Column: 41, Line: 64, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 64, }, File: "influxFieldsAsCols_test.flux", Source: "stop", Start: ast.Position{ Column: 41, Line: 64, }, }, }, Name: "stop", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 67, Line: 64, }, File: "influxFieldsAsCols_test.flux", Source: "2018-05-22T19:54:17Z", Start: ast.Position{ Column: 47, Line: 64, }, }, }, Value: parser.MustParseTime("2018-05-22T19:54:17Z"), }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 64, }, File: "influxFieldsAsCols_test.flux", Source: "range(start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)", Start: ast.Position{ Column: 6, Line: 64, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 64, }, File: "influxFieldsAsCols_test.flux", Source: "range", Start: ast.Position{ Column: 6, Line: 64, }, }, }, Name: "range", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 65, }, File: "influxFieldsAsCols_test.flux", Source: "table\n\t\t|> range(start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)\n\t\t|> v1.fieldsAsCols()", Start: ast.Position{ Column: 3, Line: 63, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 65, }, File: "influxFieldsAsCols_test.flux", Source: "v1.fieldsAsCols()", Start: ast.Position{ Column: 6, Line: 65, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 65, }, File: "influxFieldsAsCols_test.flux", Source: "v1.fieldsAsCols", Start: ast.Position{ Column: 6, Line: 65, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 65, }, File: "influxFieldsAsCols_test.flux", Source: "v1", Start: ast.Position{ Column: 6, Line: 65, }, }, }, Name: "v1", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 65, }, File: "influxFieldsAsCols_test.flux", Source: "fieldsAsCols", Start: ast.Position{ Column: 9, Line: 65, }, }, }, Name: "fieldsAsCols", }, }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 22, Line: 66, }, File: "influxFieldsAsCols_test.flux", Source: "table\n\t\t|> range(start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)\n\t\t|> v1.fieldsAsCols()\n\t\t|> yield(name: \"0\")", Start: ast.Position{ Column: 3, Line: 63, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 66, }, File: "influxFieldsAsCols_test.flux", Source: "name: \"0\"", Start: ast.Position{ Column: 12, Line: 66, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 66, }, File: "influxFieldsAsCols_test.flux", Source: "name: \"0\"", Start: ast.Position{ Column: 12, Line: 66, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 66, }, File: "influxFieldsAsCols_test.flux", Source: "name", Start: ast.Position{ Column: 12, Line: 66, }, }, }, Name: "name", }, Value: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 66, }, File: "influxFieldsAsCols_test.flux", Source: "\"0\"", Start: ast.Position{ Column: 18, Line: 66, }, }, }, Value: "0", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 22, Line: 66, }, File: "influxFieldsAsCols_test.flux", Source: "yield(name: \"0\")", Start: ast.Position{ Column: 6, Line: 66, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 66, }, File: "influxFieldsAsCols_test.flux", Source: "yield", Start: ast.Position{ Column: 6, Line: 66, }, }, }, Name: "yield", }, }, }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 62, }, File: "influxFieldsAsCols_test.flux", Source: "table=<-", Start: ast.Position{ Column: 25, Line: 62, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 62, }, File: "influxFieldsAsCols_test.flux", Source: "table", Start: ast.Position{ Column: 25, Line: 62, }, }, }, Name: "table", }, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 62, }, File: "influxFieldsAsCols_test.flux", Source: "<-", Start: ast.Position{ Column: 31, Line: 62, }, }, }}, }}, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "_influxFieldsAsCols = () =>\n\t({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_influxFieldsAsCols})", Start: ast.Position{ Column: 6, Line: 68, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 25, Line: 68, }, File: "influxFieldsAsCols_test.flux", Source: "_influxFieldsAsCols", Start: ast.Position{ Column: 6, Line: 68, }, }, }, Name: "_influxFieldsAsCols", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "() =>\n\t({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_influxFieldsAsCols})", Start: ast.Position{ Column: 28, Line: 68, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_influxFieldsAsCols})", Start: ast.Position{ Column: 2, Line: 69, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "{input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_influxFieldsAsCols}", Start: ast.Position{ Column: 3, Line: 69, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 43, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "input: testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 4, Line: 69, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 9, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "input", Start: ast.Position{ Column: 4, Line: 69, }, }, }, Name: "input", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 31, Line: 69, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 31, Line: 69, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 34, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "csv", Start: ast.Position{ Column: 31, Line: 69, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "inData", Start: ast.Position{ Column: 36, Line: 69, }, }, }, Name: "inData", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 43, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 11, Line: 69, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 11, Line: 69, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 18, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "testing", Start: ast.Position{ Column: 11, Line: 69, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 19, Line: 69, }, }, }, Name: "loadStorage", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "want: testing.loadMem(csv: outData)", Start: ast.Position{ Column: 45, Line: 69, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "want", Start: ast.Position{ Column: 45, Line: 69, }, }, }, Name: "want", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 79, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 67, Line: 69, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 79, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 67, Line: 69, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "csv", Start: ast.Position{ Column: 67, Line: 69, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 79, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "outData", Start: ast.Position{ Column: 72, Line: 69, }, }, }, Name: "outData", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "testing.loadMem(csv: outData)", Start: ast.Position{ Column: 51, Line: 69, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 51, Line: 69, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 58, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "testing", Start: ast.Position{ Column: 51, Line: 69, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 66, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "loadMem", Start: ast.Position{ Column: 59, Line: 69, }, }, }, Name: "loadMem", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 106, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "fn: t_influxFieldsAsCols", Start: ast.Position{ Column: 82, Line: 69, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 84, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "fn", Start: ast.Position{ Column: 82, Line: 69, }, }, }, Name: "fn", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 106, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "t_influxFieldsAsCols", Start: ast.Position{ Column: 86, Line: 69, }, }, }, Name: "t_influxFieldsAsCols", }, }}, With: nil, }, }, Params: nil, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 69, }, File: "influxFieldsAsCols_test.flux", Source: "test _influxFieldsAsCols = () =>\n\t({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_influxFieldsAsCols})", Start: ast.Position{ Column: 1, Line: 68, }, }, }, }}, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "influxFieldsAsCols_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 3, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "influxFieldsAsCols_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 3, }, }, }, Value: "testing", }, }, &ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 4, }, File: "influxFieldsAsCols_test.flux", Source: "import \"influxdata/influxdb/v1\"", Start: ast.Position{ Column: 1, Line: 4, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 4, }, File: "influxFieldsAsCols_test.flux", Source: "\"influxdata/influxdb/v1\"", Start: ast.Position{ Column: 8, Line: 4, }, }, }, Value: "influxdata/influxdb/v1", }, }}, Metadata: "parser-type=rust", Name: "influxFieldsAsCols_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "influxFieldsAsCols_test.flux", Source: "package v1_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "influxFieldsAsCols_test.flux", Source: "v1_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "v1_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 3, Line: 58, }, File: "influxRawQuery_test.flux", Source: "package v1_test\n\nimport \"testing\"\nimport \"influxdata/influxdb/v1\"\n\noption now = () => 2030-01-01T00:00:00Z\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string\n#group,false,false,false,false,true,true,true\n#default,_result,,,,,,\n,result,table,_time,_value,_field,_measurement,host\n,,0,2018-05-22T19:53:26Z,1.83,load1,system,host.local\n,,0,2018-05-22T19:53:36Z,1.7,load1,system,host.local\n,,0,2018-05-22T19:53:46Z,1.74,load1,system,host.local\n,,0,2018-05-22T19:53:56Z,1.63,load1,system,host.local\n,,0,2018-05-22T19:54:06Z,1.91,load1,system,host.local\n,,0,2018-05-22T19:54:16Z,1.84,load1,system,host.local\n,,1,2018-05-22T19:53:26Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:53:36Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:46Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:56Z,1.96,load15,system,host.local\n,,1,2018-05-22T19:54:06Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:54:16Z,1.97,load15,system,host.local\n,,2,2018-05-22T19:53:26Z,1.95,load5,system,host.local\n,,2,2018-05-22T19:53:36Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:46Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:56Z,1.89,load5,system,host.local\n,,2,2018-05-22T19:54:06Z,1.94,load5,system,host.local\n,,2,2018-05-22T19:54:16Z,1.93,load5,system,host.local\n\"\noutData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,double,double,double\n#group,false,false,true,true,false,true,true,false,false,false\n#default,0,,,,,,,,,\n,result,table,_start,_stop,_time,_measurement,host,load1,load15,load5\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:26Z,system,host.local,1.83,1.98,1.95\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:36Z,system,host.local,1.7,1.97,1.92\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:46Z,system,host.local,1.74,1.97,1.92\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:56Z,system,host.local,1.63,1.96,1.89\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:06Z,system,host.local,1.91,1.98,1.94\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:16Z,system,host.local,1.84,1.97,1.93\n\"\n\n// select load1, load15\nrawQuery = (stream=<-, start, stop, measurement, fields=[], groupBy=[\"_time\", \"_value\"], groupMode=\"except\", every=inf, period=0s) =>\n stream\n |> range(start:start, stop: stop)\n |> filter(fn: (r) => r._measurement == measurement and contains(value: r._field, set: fields))\n |> group(columns: groupBy, mode:groupMode)\n |> v1.fieldsAsCols()\n |> window(every: every, period: period)\n\ntest influx_raw_query = () => ({\n input: testing.loadStorage(csv: inData),\n want: testing.loadMem(csv: outData),\n fn: (table=<-) => table |> rawQuery(measurement: \"system\",fields: [\"load1\", \"load15\", \"load5\"], start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)\n})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.OptionStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 6, }, File: "influxRawQuery_test.flux", Source: "now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 8, Line: 6, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 11, Line: 6, }, File: "influxRawQuery_test.flux", Source: "now", Start: ast.Position{ Column: 8, Line: 6, }, }, }, Name: "now", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 6, }, File: "influxRawQuery_test.flux", Source: "() => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 6, }, }, }, Body: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 6, }, File: "influxRawQuery_test.flux", Source: "2030-01-01T00:00:00Z", Start: ast.Position{ Column: 20, Line: 6, }, }, }, Value: parser.MustParseTime("2030-01-01T00:00:00Z"), }, Params: nil, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 6, }, File: "influxRawQuery_test.flux", Source: "option now = () => 2030-01-01T00:00:00Z", Start: ast.Position{ Column: 1, Line: 6, }, }, }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 31, }, File: "influxRawQuery_test.flux", Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string\n#group,false,false,false,false,true,true,true\n#default,_result,,,,,,\n,result,table,_time,_value,_field,_measurement,host\n,,0,2018-05-22T19:53:26Z,1.83,load1,system,host.local\n,,0,2018-05-22T19:53:36Z,1.7,load1,system,host.local\n,,0,2018-05-22T19:53:46Z,1.74,load1,system,host.local\n,,0,2018-05-22T19:53:56Z,1.63,load1,system,host.local\n,,0,2018-05-22T19:54:06Z,1.91,load1,system,host.local\n,,0,2018-05-22T19:54:16Z,1.84,load1,system,host.local\n,,1,2018-05-22T19:53:26Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:53:36Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:46Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:56Z,1.96,load15,system,host.local\n,,1,2018-05-22T19:54:06Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:54:16Z,1.97,load15,system,host.local\n,,2,2018-05-22T19:53:26Z,1.95,load5,system,host.local\n,,2,2018-05-22T19:53:36Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:46Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:56Z,1.89,load5,system,host.local\n,,2,2018-05-22T19:54:06Z,1.94,load5,system,host.local\n,,2,2018-05-22T19:54:16Z,1.93,load5,system,host.local\n\"", Start: ast.Position{ Column: 1, Line: 8, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 8, }, File: "influxRawQuery_test.flux", Source: "inData", Start: ast.Position{ Column: 1, Line: 8, }, }, }, Name: "inData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 31, }, File: "influxRawQuery_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string\n#group,false,false,false,false,true,true,true\n#default,_result,,,,,,\n,result,table,_time,_value,_field,_measurement,host\n,,0,2018-05-22T19:53:26Z,1.83,load1,system,host.local\n,,0,2018-05-22T19:53:36Z,1.7,load1,system,host.local\n,,0,2018-05-22T19:53:46Z,1.74,load1,system,host.local\n,,0,2018-05-22T19:53:56Z,1.63,load1,system,host.local\n,,0,2018-05-22T19:54:06Z,1.91,load1,system,host.local\n,,0,2018-05-22T19:54:16Z,1.84,load1,system,host.local\n,,1,2018-05-22T19:53:26Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:53:36Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:46Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:56Z,1.96,load15,system,host.local\n,,1,2018-05-22T19:54:06Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:54:16Z,1.97,load15,system,host.local\n,,2,2018-05-22T19:53:26Z,1.95,load5,system,host.local\n,,2,2018-05-22T19:53:36Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:46Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:56Z,1.89,load5,system,host.local\n,,2,2018-05-22T19:54:06Z,1.94,load5,system,host.local\n,,2,2018-05-22T19:54:16Z,1.93,load5,system,host.local\n\"", Start: ast.Position{ Column: 10, Line: 8, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,double,string,string,string\n#group,false,false,false,false,true,true,true\n#default,_result,,,,,,\n,result,table,_time,_value,_field,_measurement,host\n,,0,2018-05-22T19:53:26Z,1.83,load1,system,host.local\n,,0,2018-05-22T19:53:36Z,1.7,load1,system,host.local\n,,0,2018-05-22T19:53:46Z,1.74,load1,system,host.local\n,,0,2018-05-22T19:53:56Z,1.63,load1,system,host.local\n,,0,2018-05-22T19:54:06Z,1.91,load1,system,host.local\n,,0,2018-05-22T19:54:16Z,1.84,load1,system,host.local\n,,1,2018-05-22T19:53:26Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:53:36Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:46Z,1.97,load15,system,host.local\n,,1,2018-05-22T19:53:56Z,1.96,load15,system,host.local\n,,1,2018-05-22T19:54:06Z,1.98,load15,system,host.local\n,,1,2018-05-22T19:54:16Z,1.97,load15,system,host.local\n,,2,2018-05-22T19:53:26Z,1.95,load5,system,host.local\n,,2,2018-05-22T19:53:36Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:46Z,1.92,load5,system,host.local\n,,2,2018-05-22T19:53:56Z,1.89,load5,system,host.local\n,,2,2018-05-22T19:54:06Z,1.94,load5,system,host.local\n,,2,2018-05-22T19:54:16Z,1.93,load5,system,host.local\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 43, }, File: "influxRawQuery_test.flux", Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,double,double,double\n#group,false,false,true,true,false,true,true,false,false,false\n#default,0,,,,,,,,,\n,result,table,_start,_stop,_time,_measurement,host,load1,load15,load5\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:26Z,system,host.local,1.83,1.98,1.95\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:36Z,system,host.local,1.7,1.97,1.92\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:46Z,system,host.local,1.74,1.97,1.92\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:56Z,system,host.local,1.63,1.96,1.89\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:06Z,system,host.local,1.91,1.98,1.94\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:16Z,system,host.local,1.84,1.97,1.93\n\"", Start: ast.Position{ Column: 1, Line: 32, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 32, }, File: "influxRawQuery_test.flux", Source: "outData", Start: ast.Position{ Column: 1, Line: 32, }, }, }, Name: "outData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 43, }, File: "influxRawQuery_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,double,double,double\n#group,false,false,true,true,false,true,true,false,false,false\n#default,0,,,,,,,,,\n,result,table,_start,_stop,_time,_measurement,host,load1,load15,load5\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:26Z,system,host.local,1.83,1.98,1.95\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:36Z,system,host.local,1.7,1.97,1.92\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:46Z,system,host.local,1.74,1.97,1.92\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:56Z,system,host.local,1.63,1.96,1.89\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:06Z,system,host.local,1.91,1.98,1.94\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:16Z,system,host.local,1.84,1.97,1.93\n\"", Start: ast.Position{ Column: 11, Line: 32, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,double,double,double\n#group,false,false,true,true,false,true,true,false,false,false\n#default,0,,,,,,,,,\n,result,table,_start,_stop,_time,_measurement,host,load1,load15,load5\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:26Z,system,host.local,1.83,1.98,1.95\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:36Z,system,host.local,1.7,1.97,1.92\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:46Z,system,host.local,1.74,1.97,1.92\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:53:56Z,system,host.local,1.63,1.96,1.89\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:06Z,system,host.local,1.91,1.98,1.94\n,,0,2018-05-22T19:53:26Z,2018-05-22T19:54:17Z,2018-05-22T19:54:16Z,system,host.local,1.84,1.97,1.93\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 52, }, File: "influxRawQuery_test.flux", Source: "rawQuery = (stream=<-, start, stop, measurement, fields=[], groupBy=[\"_time\", \"_value\"], groupMode=\"except\", every=inf, period=0s) =>\n stream\n |> range(start:start, stop: stop)\n |> filter(fn: (r) => r._measurement == measurement and contains(value: r._field, set: fields))\n |> group(columns: groupBy, mode:groupMode)\n |> v1.fieldsAsCols()\n |> window(every: every, period: period)", Start: ast.Position{ Column: 1, Line: 46, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 9, Line: 46, }, File: "influxRawQuery_test.flux", Source: "rawQuery", Start: ast.Position{ Column: 1, Line: 46, }, }, }, Name: "rawQuery", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 52, }, File: "influxRawQuery_test.flux", Source: "(stream=<-, start, stop, measurement, fields=[], groupBy=[\"_time\", \"_value\"], groupMode=\"except\", every=inf, period=0s) =>\n stream\n |> range(start:start, stop: stop)\n |> filter(fn: (r) => r._measurement == measurement and contains(value: r._field, set: fields))\n |> group(columns: groupBy, mode:groupMode)\n |> v1.fieldsAsCols()\n |> window(every: every, period: period)", Start: ast.Position{ Column: 12, Line: 46, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 9, Line: 47, }, File: "influxRawQuery_test.flux", Source: "stream", Start: ast.Position{ Column: 3, Line: 47, }, }, }, Name: "stream", }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 38, Line: 48, }, File: "influxRawQuery_test.flux", Source: "stream\n |> range(start:start, stop: stop)", Start: ast.Position{ Column: 3, Line: 47, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 48, }, File: "influxRawQuery_test.flux", Source: "start:start, stop: stop", Start: ast.Position{ Column: 14, Line: 48, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 25, Line: 48, }, File: "influxRawQuery_test.flux", Source: "start:start", Start: ast.Position{ Column: 14, Line: 48, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 48, }, File: "influxRawQuery_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 48, }, }, }, Name: "start", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 25, Line: 48, }, File: "influxRawQuery_test.flux", Source: "start", Start: ast.Position{ Column: 20, Line: 48, }, }, }, Name: "start", }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 48, }, File: "influxRawQuery_test.flux", Source: "stop: stop", Start: ast.Position{ Column: 27, Line: 48, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 48, }, File: "influxRawQuery_test.flux", Source: "stop", Start: ast.Position{ Column: 27, Line: 48, }, }, }, Name: "stop", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 48, }, File: "influxRawQuery_test.flux", Source: "stop", Start: ast.Position{ Column: 33, Line: 48, }, }, }, Name: "stop", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 38, Line: 48, }, File: "influxRawQuery_test.flux", Source: "range(start:start, stop: stop)", Start: ast.Position{ Column: 8, Line: 48, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 48, }, File: "influxRawQuery_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 48, }, }, }, Name: "range", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 99, Line: 49, }, File: "influxRawQuery_test.flux", Source: "stream\n |> range(start:start, stop: stop)\n |> filter(fn: (r) => r._measurement == measurement and contains(value: r._field, set: fields))", Start: ast.Position{ Column: 3, Line: 47, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 98, Line: 49, }, File: "influxRawQuery_test.flux", Source: "fn: (r) => r._measurement == measurement and contains(value: r._field, set: fields)", Start: ast.Position{ Column: 15, Line: 49, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 98, Line: 49, }, File: "influxRawQuery_test.flux", Source: "fn: (r) => r._measurement == measurement and contains(value: r._field, set: fields)", Start: ast.Position{ Column: 15, Line: 49, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 49, }, File: "influxRawQuery_test.flux", Source: "fn", Start: ast.Position{ Column: 15, Line: 49, }, }, }, Name: "fn", }, Value: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 98, Line: 49, }, File: "influxRawQuery_test.flux", Source: "(r) => r._measurement == measurement and contains(value: r._field, set: fields)", Start: ast.Position{ Column: 19, Line: 49, }, }, }, Body: &ast.LogicalExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 98, Line: 49, }, File: "influxRawQuery_test.flux", Source: "r._measurement == measurement and contains(value: r._field, set: fields)", Start: ast.Position{ Column: 26, Line: 49, }, }, }, Left: &ast.BinaryExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 55, Line: 49, }, File: "influxRawQuery_test.flux", Source: "r._measurement == measurement", Start: ast.Position{ Column: 26, Line: 49, }, }, }, Left: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 49, }, File: "influxRawQuery_test.flux", Source: "r._measurement", Start: ast.Position{ Column: 26, Line: 49, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 27, Line: 49, }, File: "influxRawQuery_test.flux", Source: "r", Start: ast.Position{ Column: 26, Line: 49, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 49, }, File: "influxRawQuery_test.flux", Source: "_measurement", Start: ast.Position{ Column: 28, Line: 49, }, }, }, Name: "_measurement", }, }, Operator: 17, Right: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 55, Line: 49, }, File: "influxRawQuery_test.flux", Source: "measurement", Start: ast.Position{ Column: 44, Line: 49, }, }, }, Name: "measurement", }, }, Operator: 1, Right: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 97, Line: 49, }, File: "influxRawQuery_test.flux", Source: "value: r._field, set: fields", Start: ast.Position{ Column: 69, Line: 49, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 84, Line: 49, }, File: "influxRawQuery_test.flux", Source: "value: r._field", Start: ast.Position{ Column: 69, Line: 49, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 74, Line: 49, }, File: "influxRawQuery_test.flux", Source: "value", Start: ast.Position{ Column: 69, Line: 49, }, }, }, Name: "value", }, Value: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 84, Line: 49, }, File: "influxRawQuery_test.flux", Source: "r._field", Start: ast.Position{ Column: 76, Line: 49, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 77, Line: 49, }, File: "influxRawQuery_test.flux", Source: "r", Start: ast.Position{ Column: 76, Line: 49, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 84, Line: 49, }, File: "influxRawQuery_test.flux", Source: "_field", Start: ast.Position{ Column: 78, Line: 49, }, }, }, Name: "_field", }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 97, Line: 49, }, File: "influxRawQuery_test.flux", Source: "set: fields", Start: ast.Position{ Column: 86, Line: 49, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 89, Line: 49, }, File: "influxRawQuery_test.flux", Source: "set", Start: ast.Position{ Column: 86, Line: 49, }, }, }, Name: "set", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 97, Line: 49, }, File: "influxRawQuery_test.flux", Source: "fields", Start: ast.Position{ Column: 91, Line: 49, }, }, }, Name: "fields", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 98, Line: 49, }, File: "influxRawQuery_test.flux", Source: "contains(value: r._field, set: fields)", Start: ast.Position{ Column: 60, Line: 49, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 49, }, File: "influxRawQuery_test.flux", Source: "contains", Start: ast.Position{ Column: 60, Line: 49, }, }, }, Name: "contains", }, }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 49, }, File: "influxRawQuery_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 49, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 49, }, File: "influxRawQuery_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 49, }, }, }, Name: "r", }, Value: nil, }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 99, Line: 49, }, File: "influxRawQuery_test.flux", Source: "filter(fn: (r) => r._measurement == measurement and contains(value: r._field, set: fields))", Start: ast.Position{ Column: 8, Line: 49, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 49, }, File: "influxRawQuery_test.flux", Source: "filter", Start: ast.Position{ Column: 8, Line: 49, }, }, }, Name: "filter", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 47, Line: 50, }, File: "influxRawQuery_test.flux", Source: "stream\n |> range(start:start, stop: stop)\n |> filter(fn: (r) => r._measurement == measurement and contains(value: r._field, set: fields))\n |> group(columns: groupBy, mode:groupMode)", Start: ast.Position{ Column: 3, Line: 47, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 46, Line: 50, }, File: "influxRawQuery_test.flux", Source: "columns: groupBy, mode:groupMode", Start: ast.Position{ Column: 14, Line: 50, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 50, }, File: "influxRawQuery_test.flux", Source: "columns: groupBy", Start: ast.Position{ Column: 14, Line: 50, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 50, }, File: "influxRawQuery_test.flux", Source: "columns", Start: ast.Position{ Column: 14, Line: 50, }, }, }, Name: "columns", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 50, }, File: "influxRawQuery_test.flux", Source: "groupBy", Start: ast.Position{ Column: 23, Line: 50, }, }, }, Name: "groupBy", }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 46, Line: 50, }, File: "influxRawQuery_test.flux", Source: "mode:groupMode", Start: ast.Position{ Column: 32, Line: 50, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 36, Line: 50, }, File: "influxRawQuery_test.flux", Source: "mode", Start: ast.Position{ Column: 32, Line: 50, }, }, }, Name: "mode", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 46, Line: 50, }, File: "influxRawQuery_test.flux", Source: "groupMode", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Name: "groupMode", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 47, Line: 50, }, File: "influxRawQuery_test.flux", Source: "group(columns: groupBy, mode:groupMode)", Start: ast.Position{ Column: 8, Line: 50, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 50, }, File: "influxRawQuery_test.flux", Source: "group", Start: ast.Position{ Column: 8, Line: 50, }, }, }, Name: "group", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 25, Line: 51, }, File: "influxRawQuery_test.flux", Source: "stream\n |> range(start:start, stop: stop)\n |> filter(fn: (r) => r._measurement == measurement and contains(value: r._field, set: fields))\n |> group(columns: groupBy, mode:groupMode)\n |> v1.fieldsAsCols()", Start: ast.Position{ Column: 3, Line: 47, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 25, Line: 51, }, File: "influxRawQuery_test.flux", Source: "v1.fieldsAsCols()", Start: ast.Position{ Column: 8, Line: 51, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 51, }, File: "influxRawQuery_test.flux", Source: "v1.fieldsAsCols", Start: ast.Position{ Column: 8, Line: 51, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 10, Line: 51, }, File: "influxRawQuery_test.flux", Source: "v1", Start: ast.Position{ Column: 8, Line: 51, }, }, }, Name: "v1", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 51, }, File: "influxRawQuery_test.flux", Source: "fieldsAsCols", Start: ast.Position{ Column: 11, Line: 51, }, }, }, Name: "fieldsAsCols", }, }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 52, }, File: "influxRawQuery_test.flux", Source: "stream\n |> range(start:start, stop: stop)\n |> filter(fn: (r) => r._measurement == measurement and contains(value: r._field, set: fields))\n |> group(columns: groupBy, mode:groupMode)\n |> v1.fieldsAsCols()\n |> window(every: every, period: period)", Start: ast.Position{ Column: 3, Line: 47, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 43, Line: 52, }, File: "influxRawQuery_test.flux", Source: "every: every, period: period", Start: ast.Position{ Column: 15, Line: 52, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 27, Line: 52, }, File: "influxRawQuery_test.flux", Source: "every: every", Start: ast.Position{ Column: 15, Line: 52, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 20, Line: 52, }, File: "influxRawQuery_test.flux", Source: "every", Start: ast.Position{ Column: 15, Line: 52, }, }, }, Name: "every", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 27, Line: 52, }, File: "influxRawQuery_test.flux", Source: "every", Start: ast.Position{ Column: 22, Line: 52, }, }, }, Name: "every", }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 43, Line: 52, }, File: "influxRawQuery_test.flux", Source: "period: period", Start: ast.Position{ Column: 29, Line: 52, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 35, Line: 52, }, File: "influxRawQuery_test.flux", Source: "period", Start: ast.Position{ Column: 29, Line: 52, }, }, }, Name: "period", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 43, Line: 52, }, File: "influxRawQuery_test.flux", Source: "period", Start: ast.Position{ Column: 37, Line: 52, }, }, }, Name: "period", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 52, }, File: "influxRawQuery_test.flux", Source: "window(every: every, period: period)", Start: ast.Position{ Column: 8, Line: 52, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 52, }, File: "influxRawQuery_test.flux", Source: "window", Start: ast.Position{ Column: 8, Line: 52, }, }, }, Name: "window", }, }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 22, Line: 46, }, File: "influxRawQuery_test.flux", Source: "stream=<-", Start: ast.Position{ Column: 13, Line: 46, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 46, }, File: "influxRawQuery_test.flux", Source: "stream", Start: ast.Position{ Column: 13, Line: 46, }, }, }, Name: "stream", }, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 22, Line: 46, }, File: "influxRawQuery_test.flux", Source: "<-", Start: ast.Position{ Column: 20, Line: 46, }, }, }}, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 29, Line: 46, }, File: "influxRawQuery_test.flux", Source: "start", Start: ast.Position{ Column: 24, Line: 46, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 29, Line: 46, }, File: "influxRawQuery_test.flux", Source: "start", Start: ast.Position{ Column: 24, Line: 46, }, }, }, Name: "start", }, Value: nil, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 35, Line: 46, }, File: "influxRawQuery_test.flux", Source: "stop", Start: ast.Position{ Column: 31, Line: 46, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 35, Line: 46, }, File: "influxRawQuery_test.flux", Source: "stop", Start: ast.Position{ Column: 31, Line: 46, }, }, }, Name: "stop", }, Value: nil, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 46, }, File: "influxRawQuery_test.flux", Source: "measurement", Start: ast.Position{ Column: 37, Line: 46, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 46, }, File: "influxRawQuery_test.flux", Source: "measurement", Start: ast.Position{ Column: 37, Line: 46, }, }, }, Name: "measurement", }, Value: nil, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 59, Line: 46, }, File: "influxRawQuery_test.flux", Source: "fields=[]", Start: ast.Position{ Column: 50, Line: 46, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 56, Line: 46, }, File: "influxRawQuery_test.flux", Source: "fields", Start: ast.Position{ Column: 50, Line: 46, }, }, }, Name: "fields", }, Value: &ast.ArrayExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 59, Line: 46, }, File: "influxRawQuery_test.flux", Source: "[]", Start: ast.Position{ Column: 57, Line: 46, }, }, }, Elements: []ast.Expression{}, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 88, Line: 46, }, File: "influxRawQuery_test.flux", Source: "groupBy=[\"_time\", \"_value\"]", Start: ast.Position{ Column: 61, Line: 46, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 46, }, File: "influxRawQuery_test.flux", Source: "groupBy", Start: ast.Position{ Column: 61, Line: 46, }, }, }, Name: "groupBy", }, Value: &ast.ArrayExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 88, Line: 46, }, File: "influxRawQuery_test.flux", Source: "[\"_time\", \"_value\"]", Start: ast.Position{ Column: 69, Line: 46, }, }, }, Elements: []ast.Expression{&ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 77, Line: 46, }, File: "influxRawQuery_test.flux", Source: "\"_time\"", Start: ast.Position{ Column: 70, Line: 46, }, }, }, Value: "_time", }, &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 87, Line: 46, }, File: "influxRawQuery_test.flux", Source: "\"_value\"", Start: ast.Position{ Column: 79, Line: 46, }, }, }, Value: "_value", }}, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 46, }, File: "influxRawQuery_test.flux", Source: "groupMode=\"except\"", Start: ast.Position{ Column: 90, Line: 46, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 99, Line: 46, }, File: "influxRawQuery_test.flux", Source: "groupMode", Start: ast.Position{ Column: 90, Line: 46, }, }, }, Name: "groupMode", }, Value: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 46, }, File: "influxRawQuery_test.flux", Source: "\"except\"", Start: ast.Position{ Column: 100, Line: 46, }, }, }, Value: "except", }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 119, Line: 46, }, File: "influxRawQuery_test.flux", Source: "every=inf", Start: ast.Position{ Column: 110, Line: 46, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 115, Line: 46, }, File: "influxRawQuery_test.flux", Source: "every", Start: ast.Position{ Column: 110, Line: 46, }, }, }, Name: "every", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 119, Line: 46, }, File: "influxRawQuery_test.flux", Source: "inf", Start: ast.Position{ Column: 116, Line: 46, }, }, }, Name: "inf", }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 130, Line: 46, }, File: "influxRawQuery_test.flux", Source: "period=0s", Start: ast.Position{ Column: 121, Line: 46, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 127, Line: 46, }, File: "influxRawQuery_test.flux", Source: "period", Start: ast.Position{ Column: 121, Line: 46, }, }, }, Name: "period", }, Value: &ast.DurationLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 130, Line: 46, }, File: "influxRawQuery_test.flux", Source: "0s", Start: ast.Position{ Column: 128, Line: 46, }, }, }, Values: []ast.Duration{ast.Duration{ Magnitude: int64(0), Unit: "s", }}, }, }}, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 3, Line: 58, }, File: "influxRawQuery_test.flux", Source: "influx_raw_query = () => ({\n input: testing.loadStorage(csv: inData),\n want: testing.loadMem(csv: outData),\n fn: (table=<-) => table |> rawQuery(measurement: \"system\",fields: [\"load1\", \"load15\", \"load5\"], start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)\n})", Start: ast.Position{ Column: 6, Line: 54, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 22, Line: 54, }, File: "influxRawQuery_test.flux", Source: "influx_raw_query", Start: ast.Position{ Column: 6, Line: 54, }, }, }, Name: "influx_raw_query", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 3, Line: 58, }, File: "influxRawQuery_test.flux", Source: "() => ({\n input: testing.loadStorage(csv: inData),\n want: testing.loadMem(csv: outData),\n fn: (table=<-) => table |> rawQuery(measurement: \"system\",fields: [\"load1\", \"load15\", \"load5\"], start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)\n})", Start: ast.Position{ Column: 25, Line: 54, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 3, Line: 58, }, File: "influxRawQuery_test.flux", Source: "({\n input: testing.loadStorage(csv: inData),\n want: testing.loadMem(csv: outData),\n fn: (table=<-) => table |> rawQuery(measurement: \"system\",fields: [\"load1\", \"load15\", \"load5\"], start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)\n})", Start: ast.Position{ Column: 31, Line: 54, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 58, }, File: "influxRawQuery_test.flux", Source: "{\n input: testing.loadStorage(csv: inData),\n want: testing.loadMem(csv: outData),\n fn: (table=<-) => table |> rawQuery(measurement: \"system\",fields: [\"load1\", \"load15\", \"load5\"], start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)\n}", Start: ast.Position{ Column: 32, Line: 54, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 55, }, File: "influxRawQuery_test.flux", Source: "input: testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 5, Line: 55, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 10, Line: 55, }, File: "influxRawQuery_test.flux", Source: "input", Start: ast.Position{ Column: 5, Line: 55, }, }, }, Name: "input", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 43, Line: 55, }, File: "influxRawQuery_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 32, Line: 55, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 43, Line: 55, }, File: "influxRawQuery_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 32, Line: 55, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 35, Line: 55, }, File: "influxRawQuery_test.flux", Source: "csv", Start: ast.Position{ Column: 32, Line: 55, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 43, Line: 55, }, File: "influxRawQuery_test.flux", Source: "inData", Start: ast.Position{ Column: 37, Line: 55, }, }, }, Name: "inData", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 55, }, File: "influxRawQuery_test.flux", Source: "testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 12, Line: 55, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 55, }, File: "influxRawQuery_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 12, Line: 55, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 55, }, File: "influxRawQuery_test.flux", Source: "testing", Start: ast.Position{ Column: 12, Line: 55, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 55, }, File: "influxRawQuery_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 20, Line: 55, }, }, }, Name: "loadStorage", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 56, }, File: "influxRawQuery_test.flux", Source: "want: testing.loadMem(csv: outData)", Start: ast.Position{ Column: 5, Line: 56, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 9, Line: 56, }, File: "influxRawQuery_test.flux", Source: "want", Start: ast.Position{ Column: 5, Line: 56, }, }, }, Name: "want", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 56, }, File: "influxRawQuery_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 27, Line: 56, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 56, }, File: "influxRawQuery_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 27, Line: 56, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 56, }, File: "influxRawQuery_test.flux", Source: "csv", Start: ast.Position{ Column: 27, Line: 56, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 56, }, File: "influxRawQuery_test.flux", Source: "outData", Start: ast.Position{ Column: 32, Line: 56, }, }, }, Name: "outData", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 56, }, File: "influxRawQuery_test.flux", Source: "testing.loadMem(csv: outData)", Start: ast.Position{ Column: 11, Line: 56, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 56, }, File: "influxRawQuery_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 11, Line: 56, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 18, Line: 56, }, File: "influxRawQuery_test.flux", Source: "testing", Start: ast.Position{ Column: 11, Line: 56, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 56, }, File: "influxRawQuery_test.flux", Source: "loadMem", Start: ast.Position{ Column: 19, Line: 56, }, }, }, Name: "loadMem", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 157, Line: 57, }, File: "influxRawQuery_test.flux", Source: "fn: (table=<-) => table |> rawQuery(measurement: \"system\",fields: [\"load1\", \"load15\", \"load5\"], start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)", Start: ast.Position{ Column: 5, Line: 57, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 57, }, File: "influxRawQuery_test.flux", Source: "fn", Start: ast.Position{ Column: 5, Line: 57, }, }, }, Name: "fn", }, Value: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 157, Line: 57, }, File: "influxRawQuery_test.flux", Source: "(table=<-) => table |> rawQuery(measurement: \"system\",fields: [\"load1\", \"load15\", \"load5\"], start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)", Start: ast.Position{ Column: 9, Line: 57, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 28, Line: 57, }, File: "influxRawQuery_test.flux", Source: "table", Start: ast.Position{ Column: 23, Line: 57, }, }, }, Name: "table", }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 157, Line: 57, }, File: "influxRawQuery_test.flux", Source: "table |> rawQuery(measurement: \"system\",fields: [\"load1\", \"load15\", \"load5\"], start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)", Start: ast.Position{ Column: 23, Line: 57, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 156, Line: 57, }, File: "influxRawQuery_test.flux", Source: "measurement: \"system\",fields: [\"load1\", \"load15\", \"load5\"], start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z", Start: ast.Position{ Column: 41, Line: 57, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 62, Line: 57, }, File: "influxRawQuery_test.flux", Source: "measurement: \"system\"", Start: ast.Position{ Column: 41, Line: 57, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 52, Line: 57, }, File: "influxRawQuery_test.flux", Source: "measurement", Start: ast.Position{ Column: 41, Line: 57, }, }, }, Name: "measurement", }, Value: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 62, Line: 57, }, File: "influxRawQuery_test.flux", Source: "\"system\"", Start: ast.Position{ Column: 54, Line: 57, }, }, }, Value: "system", }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 99, Line: 57, }, File: "influxRawQuery_test.flux", Source: "fields: [\"load1\", \"load15\", \"load5\"]", Start: ast.Position{ Column: 63, Line: 57, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 57, }, File: "influxRawQuery_test.flux", Source: "fields", Start: ast.Position{ Column: 63, Line: 57, }, }, }, Name: "fields", }, Value: &ast.ArrayExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 99, Line: 57, }, File: "influxRawQuery_test.flux", Source: "[\"load1\", \"load15\", \"load5\"]", Start: ast.Position{ Column: 71, Line: 57, }, }, }, Elements: []ast.Expression{&ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 79, Line: 57, }, File: "influxRawQuery_test.flux", Source: "\"load1\"", Start: ast.Position{ Column: 72, Line: 57, }, }, }, Value: "load1", }, &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 89, Line: 57, }, File: "influxRawQuery_test.flux", Source: "\"load15\"", Start: ast.Position{ Column: 81, Line: 57, }, }, }, Value: "load15", }, &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 98, Line: 57, }, File: "influxRawQuery_test.flux", Source: "\"load5\"", Start: ast.Position{ Column: 91, Line: 57, }, }, }, Value: "load5", }}, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 128, Line: 57, }, File: "influxRawQuery_test.flux", Source: "start: 2018-05-22T19:53:26Z", Start: ast.Position{ Column: 101, Line: 57, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 106, Line: 57, }, File: "influxRawQuery_test.flux", Source: "start", Start: ast.Position{ Column: 101, Line: 57, }, }, }, Name: "start", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 128, Line: 57, }, File: "influxRawQuery_test.flux", Source: "2018-05-22T19:53:26Z", Start: ast.Position{ Column: 108, Line: 57, }, }, }, Value: parser.MustParseTime("2018-05-22T19:53:26Z"), }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 156, Line: 57, }, File: "influxRawQuery_test.flux", Source: "stop: 2018-05-22T19:54:17Z", Start: ast.Position{ Column: 130, Line: 57, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 134, Line: 57, }, File: "influxRawQuery_test.flux", Source: "stop", Start: ast.Position{ Column: 130, Line: 57, }, }, }, Name: "stop", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 156, Line: 57, }, File: "influxRawQuery_test.flux", Source: "2018-05-22T19:54:17Z", Start: ast.Position{ Column: 136, Line: 57, }, }, }, Value: parser.MustParseTime("2018-05-22T19:54:17Z"), }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 157, Line: 57, }, File: "influxRawQuery_test.flux", Source: "rawQuery(measurement: \"system\",fields: [\"load1\", \"load15\", \"load5\"], start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)", Start: ast.Position{ Column: 32, Line: 57, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 57, }, File: "influxRawQuery_test.flux", Source: "rawQuery", Start: ast.Position{ Column: 32, Line: 57, }, }, }, Name: "rawQuery", }, }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 18, Line: 57, }, File: "influxRawQuery_test.flux", Source: "table=<-", Start: ast.Position{ Column: 10, Line: 57, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 57, }, File: "influxRawQuery_test.flux", Source: "table", Start: ast.Position{ Column: 10, Line: 57, }, }, }, Name: "table", }, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 18, Line: 57, }, File: "influxRawQuery_test.flux", Source: "<-", Start: ast.Position{ Column: 16, Line: 57, }, }, }}, }}, }, }}, With: nil, }, }, Params: nil, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 3, Line: 58, }, File: "influxRawQuery_test.flux", Source: "test influx_raw_query = () => ({\n input: testing.loadStorage(csv: inData),\n want: testing.loadMem(csv: outData),\n fn: (table=<-) => table |> rawQuery(measurement: \"system\",fields: [\"load1\", \"load15\", \"load5\"], start: 2018-05-22T19:53:26Z, stop: 2018-05-22T19:54:17Z)\n})", Start: ast.Position{ Column: 1, Line: 54, }, }, }, }}, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "influxRawQuery_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 3, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "influxRawQuery_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 3, }, }, }, Value: "testing", }, }, &ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 4, }, File: "influxRawQuery_test.flux", Source: "import \"influxdata/influxdb/v1\"", Start: ast.Position{ Column: 1, Line: 4, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 4, }, File: "influxRawQuery_test.flux", Source: "\"influxdata/influxdb/v1\"", Start: ast.Position{ Column: 8, Line: 4, }, }, }, Value: "influxdata/influxdb/v1", }, }}, Metadata: "parser-type=rust", Name: "influxRawQuery_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "influxRawQuery_test.flux", Source: "package v1_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "influxRawQuery_test.flux", Source: "v1_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "v1_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 114, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "package v1_test\n\nimport \"testing\"\n\ninput = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,sys,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,sys,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.global,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.global,used_percent,82.64\n\n#datatype,string,long,dateTime:RFC3339,string,string,string,long\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,sys,host.global,load7,183\n,,0,2018-05-22T19:53:36Z,sys,host.global,load7,172\n,,0,2018-05-22T19:53:46Z,sys,host.global,load7,174\n,,0,2018-05-22T19:53:56Z,sys,host.global,load7,163\n,,0,2018-05-22T19:54:06Z,sys,host.global,load7,191\n,,0,2018-05-22T19:54:16Z,sys,host.global,load7,184\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load8,198\n,,1,2018-05-22T19:53:36Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:46Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:56Z,sys,host.local,load8,196\n,,1,2018-05-22T19:54:06Z,sys,host.local,load8,198\n,,1,2018-05-22T19:54:16Z,sys,host.local,load8,197\n\n,,2,2018-05-22T19:53:26Z,sys,host.global,load9,195\n,,2,2018-05-22T19:53:36Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:46Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:56Z,sys,host.global,load9,189\n,,2,2018-05-22T19:54:06Z,sys,host.global,load9,194\n,,2,2018-05-22T19:54:16Z,sys,host.global,load9,193\n\n,,3,2018-05-22T19:53:26Z,swp,host.global,used_percent,8298\n,,3,2018-05-22T19:53:36Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:46Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:56Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:06Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:16Z,swp,host.global,used_percent,8264\n\"\n\noutput = \"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load3\n,,0,load8\n\"\n\nmeasurement_field_keys_fn = (tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()\n\ntest measurement_field_keys = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: measurement_field_keys_fn})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 69, }, File: "measurement_field_keys_test.flux", Source: "input = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,sys,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,sys,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.global,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.global,used_percent,82.64\n\n#datatype,string,long,dateTime:RFC3339,string,string,string,long\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,sys,host.global,load7,183\n,,0,2018-05-22T19:53:36Z,sys,host.global,load7,172\n,,0,2018-05-22T19:53:46Z,sys,host.global,load7,174\n,,0,2018-05-22T19:53:56Z,sys,host.global,load7,163\n,,0,2018-05-22T19:54:06Z,sys,host.global,load7,191\n,,0,2018-05-22T19:54:16Z,sys,host.global,load7,184\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load8,198\n,,1,2018-05-22T19:53:36Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:46Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:56Z,sys,host.local,load8,196\n,,1,2018-05-22T19:54:06Z,sys,host.local,load8,198\n,,1,2018-05-22T19:54:16Z,sys,host.local,load8,197\n\n,,2,2018-05-22T19:53:26Z,sys,host.global,load9,195\n,,2,2018-05-22T19:53:36Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:46Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:56Z,sys,host.global,load9,189\n,,2,2018-05-22T19:54:06Z,sys,host.global,load9,194\n,,2,2018-05-22T19:54:16Z,sys,host.global,load9,193\n\n,,3,2018-05-22T19:53:26Z,swp,host.global,used_percent,8298\n,,3,2018-05-22T19:53:36Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:46Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:56Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:06Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:16Z,swp,host.global,used_percent,8264\n\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 5, }, File: "measurement_field_keys_test.flux", Source: "input", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Name: "input", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 69, }, File: "measurement_field_keys_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,sys,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,sys,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.global,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.global,used_percent,82.64\n\n#datatype,string,long,dateTime:RFC3339,string,string,string,long\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,sys,host.global,load7,183\n,,0,2018-05-22T19:53:36Z,sys,host.global,load7,172\n,,0,2018-05-22T19:53:46Z,sys,host.global,load7,174\n,,0,2018-05-22T19:53:56Z,sys,host.global,load7,163\n,,0,2018-05-22T19:54:06Z,sys,host.global,load7,191\n,,0,2018-05-22T19:54:16Z,sys,host.global,load7,184\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load8,198\n,,1,2018-05-22T19:53:36Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:46Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:56Z,sys,host.local,load8,196\n,,1,2018-05-22T19:54:06Z,sys,host.local,load8,198\n,,1,2018-05-22T19:54:16Z,sys,host.local,load8,197\n\n,,2,2018-05-22T19:53:26Z,sys,host.global,load9,195\n,,2,2018-05-22T19:53:36Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:46Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:56Z,sys,host.global,load9,189\n,,2,2018-05-22T19:54:06Z,sys,host.global,load9,194\n,,2,2018-05-22T19:54:16Z,sys,host.global,load9,193\n\n,,3,2018-05-22T19:53:26Z,swp,host.global,used_percent,8298\n,,3,2018-05-22T19:53:36Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:46Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:56Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:06Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:16Z,swp,host.global,used_percent,8264\n\"", Start: ast.Position{ Column: 9, Line: 5, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,sys,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,sys,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.global,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.global,used_percent,82.64\n\n#datatype,string,long,dateTime:RFC3339,string,string,string,long\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,sys,host.global,load7,183\n,,0,2018-05-22T19:53:36Z,sys,host.global,load7,172\n,,0,2018-05-22T19:53:46Z,sys,host.global,load7,174\n,,0,2018-05-22T19:53:56Z,sys,host.global,load7,163\n,,0,2018-05-22T19:54:06Z,sys,host.global,load7,191\n,,0,2018-05-22T19:54:16Z,sys,host.global,load7,184\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load8,198\n,,1,2018-05-22T19:53:36Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:46Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:56Z,sys,host.local,load8,196\n,,1,2018-05-22T19:54:06Z,sys,host.local,load8,198\n,,1,2018-05-22T19:54:16Z,sys,host.local,load8,197\n\n,,2,2018-05-22T19:53:26Z,sys,host.global,load9,195\n,,2,2018-05-22T19:53:36Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:46Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:56Z,sys,host.global,load9,189\n,,2,2018-05-22T19:54:06Z,sys,host.global,load9,194\n,,2,2018-05-22T19:54:16Z,sys,host.global,load9,193\n\n,,3,2018-05-22T19:53:26Z,swp,host.global,used_percent,8298\n,,3,2018-05-22T19:53:36Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:46Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:56Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:06Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:16Z,swp,host.global,used_percent,8264\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 78, }, File: "measurement_field_keys_test.flux", Source: "output = \"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load3\n,,0,load8\n\"", Start: ast.Position{ Column: 1, Line: 71, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 71, }, File: "measurement_field_keys_test.flux", Source: "output", Start: ast.Position{ Column: 1, Line: 71, }, }, }, Name: "output", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 78, }, File: "measurement_field_keys_test.flux", Source: "\"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load3\n,,0,load8\n\"", Start: ast.Position{ Column: 10, Line: 71, }, }, }, Value: "\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load3\n,,0,load8\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 87, }, File: "measurement_field_keys_test.flux", Source: "measurement_field_keys_fn = (tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()", Start: ast.Position{ Column: 1, Line: 80, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 80, }, File: "measurement_field_keys_test.flux", Source: "measurement_field_keys_fn", Start: ast.Position{ Column: 1, Line: 80, }, }, }, Name: "measurement_field_keys_fn", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 87, }, File: "measurement_field_keys_test.flux", Source: "(tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()", Start: ast.Position{ Column: 29, Line: 80, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 50, Line: 80, }, File: "measurement_field_keys_test.flux", Source: "tables", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Name: "tables", }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 81, }, File: "measurement_field_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 81, }, File: "measurement_field_keys_test.flux", Source: "start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 81, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 81, }, File: "measurement_field_keys_test.flux", Source: "start: 2018-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 81, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 81, }, File: "measurement_field_keys_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 81, }, }, }, Name: "start", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 81, }, File: "measurement_field_keys_test.flux", Source: "2018-01-01T00:00:00Z", Start: ast.Position{ Column: 21, Line: 81, }, }, }, Value: parser.MustParseTime("2018-01-01T00:00:00Z"), }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 81, }, File: "measurement_field_keys_test.flux", Source: "stop: 2019-01-01T00:00:00Z", Start: ast.Position{ Column: 43, Line: 81, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 47, Line: 81, }, File: "measurement_field_keys_test.flux", Source: "stop", Start: ast.Position{ Column: 43, Line: 81, }, }, }, Name: "stop", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 81, }, File: "measurement_field_keys_test.flux", Source: "2019-01-01T00:00:00Z", Start: ast.Position{ Column: 49, Line: 81, }, }, }, Value: parser.MustParseTime("2019-01-01T00:00:00Z"), }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 81, }, File: "measurement_field_keys_test.flux", Source: "range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)", Start: ast.Position{ Column: 8, Line: 81, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 81, }, File: "measurement_field_keys_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 81, }, }, }, Name: "range", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 50, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "fn: (r) => r._measurement == \"sys\"", Start: ast.Position{ Column: 15, Line: 82, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "fn: (r) => r._measurement == \"sys\"", Start: ast.Position{ Column: 15, Line: 82, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "fn", Start: ast.Position{ Column: 15, Line: 82, }, }, }, Name: "fn", }, Value: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "(r) => r._measurement == \"sys\"", Start: ast.Position{ Column: 19, Line: 82, }, }, }, Body: &ast.BinaryExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "r._measurement == \"sys\"", Start: ast.Position{ Column: 26, Line: 82, }, }, }, Left: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "r._measurement", Start: ast.Position{ Column: 26, Line: 82, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 27, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "r", Start: ast.Position{ Column: 26, Line: 82, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "_measurement", Start: ast.Position{ Column: 28, Line: 82, }, }, }, Name: "_measurement", }, }, Operator: 17, Right: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "\"sys\"", Start: ast.Position{ Column: 44, Line: 82, }, }, }, Value: "sys", }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 82, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 82, }, }, }, Name: "r", }, Value: nil, }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 50, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "filter(fn: (r) => r._measurement == \"sys\")", Start: ast.Position{ Column: 8, Line: 82, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 82, }, File: "measurement_field_keys_test.flux", Source: "filter", Start: ast.Position{ Column: 8, Line: 82, }, }, }, Name: "filter", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "fn: (r) => r.host == \"host.local\"", Start: ast.Position{ Column: 15, Line: 83, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "fn: (r) => r.host == \"host.local\"", Start: ast.Position{ Column: 15, Line: 83, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "fn", Start: ast.Position{ Column: 15, Line: 83, }, }, }, Name: "fn", }, Value: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "(r) => r.host == \"host.local\"", Start: ast.Position{ Column: 19, Line: 83, }, }, }, Body: &ast.BinaryExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "r.host == \"host.local\"", Start: ast.Position{ Column: 26, Line: 83, }, }, }, Left: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "r.host", Start: ast.Position{ Column: 26, Line: 83, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 27, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "r", Start: ast.Position{ Column: 26, Line: 83, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "host", Start: ast.Position{ Column: 28, Line: 83, }, }, }, Name: "host", }, }, Operator: 17, Right: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "\"host.local\"", Start: ast.Position{ Column: 36, Line: 83, }, }, }, Value: "host.local", }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 83, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 83, }, }, }, Name: "r", }, Value: nil, }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "filter(fn: (r) => r.host == \"host.local\")", Start: ast.Position{ Column: 8, Line: 83, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 83, }, File: "measurement_field_keys_test.flux", Source: "filter", Start: ast.Position{ Column: 8, Line: 83, }, }, }, Name: "filter", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 84, }, File: "measurement_field_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 84, }, File: "measurement_field_keys_test.flux", Source: "columns: [\"_field\"]", Start: ast.Position{ Column: 13, Line: 84, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 84, }, File: "measurement_field_keys_test.flux", Source: "columns: [\"_field\"]", Start: ast.Position{ Column: 13, Line: 84, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 20, Line: 84, }, File: "measurement_field_keys_test.flux", Source: "columns", Start: ast.Position{ Column: 13, Line: 84, }, }, }, Name: "columns", }, Value: &ast.ArrayExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 84, }, File: "measurement_field_keys_test.flux", Source: "[\"_field\"]", Start: ast.Position{ Column: 22, Line: 84, }, }, }, Elements: []ast.Expression{&ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 84, }, File: "measurement_field_keys_test.flux", Source: "\"_field\"", Start: ast.Position{ Column: 23, Line: 84, }, }, }, Value: "_field", }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 84, }, File: "measurement_field_keys_test.flux", Source: "keep(columns: [\"_field\"])", Start: ast.Position{ Column: 8, Line: 84, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 84, }, File: "measurement_field_keys_test.flux", Source: "keep", Start: ast.Position{ Column: 8, Line: 84, }, }, }, Name: "keep", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 85, }, File: "measurement_field_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])\n |> group()", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 85, }, File: "measurement_field_keys_test.flux", Source: "group()", Start: ast.Position{ Column: 8, Line: 85, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 85, }, File: "measurement_field_keys_test.flux", Source: "group", Start: ast.Position{ Column: 8, Line: 85, }, }, }, Name: "group", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 34, Line: 86, }, File: "measurement_field_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 86, }, File: "measurement_field_keys_test.flux", Source: "column: \"_field\"", Start: ast.Position{ Column: 17, Line: 86, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 86, }, File: "measurement_field_keys_test.flux", Source: "column: \"_field\"", Start: ast.Position{ Column: 17, Line: 86, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 86, }, File: "measurement_field_keys_test.flux", Source: "column", Start: ast.Position{ Column: 17, Line: 86, }, }, }, Name: "column", }, Value: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 86, }, File: "measurement_field_keys_test.flux", Source: "\"_field\"", Start: ast.Position{ Column: 25, Line: 86, }, }, }, Value: "_field", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 34, Line: 86, }, File: "measurement_field_keys_test.flux", Source: "distinct(column: \"_field\")", Start: ast.Position{ Column: 8, Line: 86, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 86, }, File: "measurement_field_keys_test.flux", Source: "distinct", Start: ast.Position{ Column: 8, Line: 86, }, }, }, Name: "distinct", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 87, }, File: "measurement_field_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 87, }, File: "measurement_field_keys_test.flux", Source: "sort()", Start: ast.Position{ Column: 8, Line: 87, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 87, }, File: "measurement_field_keys_test.flux", Source: "sort", Start: ast.Position{ Column: 8, Line: 87, }, }, }, Name: "sort", }, }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 80, }, File: "measurement_field_keys_test.flux", Source: "tables=<-", Start: ast.Position{ Column: 30, Line: 80, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 36, Line: 80, }, File: "measurement_field_keys_test.flux", Source: "tables", Start: ast.Position{ Column: 30, Line: 80, }, }, }, Name: "tables", }, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 80, }, File: "measurement_field_keys_test.flux", Source: "<-", Start: ast.Position{ Column: 37, Line: 80, }, }, }}, }}, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 114, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "measurement_field_keys = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: measurement_field_keys_fn})", Start: ast.Position{ Column: 6, Line: 89, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 28, Line: 89, }, File: "measurement_field_keys_test.flux", Source: "measurement_field_keys", Start: ast.Position{ Column: 6, Line: 89, }, }, }, Name: "measurement_field_keys", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 114, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "() =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: measurement_field_keys_fn})", Start: ast.Position{ Column: 31, Line: 89, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 114, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: measurement_field_keys_fn})", Start: ast.Position{ Column: 5, Line: 90, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 113, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "{input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: measurement_field_keys_fn}", Start: ast.Position{ Column: 6, Line: 90, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "input: testing.loadStorage(csv: input)", Start: ast.Position{ Column: 7, Line: 90, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "input", Start: ast.Position{ Column: 7, Line: 90, }, }, }, Name: "input", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "csv: input", Start: ast.Position{ Column: 34, Line: 90, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "csv: input", Start: ast.Position{ Column: 34, Line: 90, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "csv", Start: ast.Position{ Column: 34, Line: 90, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "input", Start: ast.Position{ Column: 39, Line: 90, }, }, }, Name: "input", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "testing.loadStorage(csv: input)", Start: ast.Position{ Column: 14, Line: 90, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 14, Line: 90, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "testing", Start: ast.Position{ Column: 14, Line: 90, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 22, Line: 90, }, }, }, Name: "loadStorage", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "want: testing.loadMem(csv: output)", Start: ast.Position{ Column: 47, Line: 90, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 51, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "want", Start: ast.Position{ Column: 47, Line: 90, }, }, }, Name: "want", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "csv: output", Start: ast.Position{ Column: 69, Line: 90, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "csv: output", Start: ast.Position{ Column: 69, Line: 90, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 72, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "csv", Start: ast.Position{ Column: 69, Line: 90, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "output", Start: ast.Position{ Column: 74, Line: 90, }, }, }, Name: "output", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "testing.loadMem(csv: output)", Start: ast.Position{ Column: 53, Line: 90, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 53, Line: 90, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 60, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "testing", Start: ast.Position{ Column: 53, Line: 90, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "loadMem", Start: ast.Position{ Column: 61, Line: 90, }, }, }, Name: "loadMem", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 112, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "fn: measurement_field_keys_fn", Start: ast.Position{ Column: 83, Line: 90, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 85, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "fn", Start: ast.Position{ Column: 83, Line: 90, }, }, }, Name: "fn", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 112, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "measurement_field_keys_fn", Start: ast.Position{ Column: 87, Line: 90, }, }, }, Name: "measurement_field_keys_fn", }, }}, With: nil, }, }, Params: nil, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 114, Line: 90, }, File: "measurement_field_keys_test.flux", Source: "test measurement_field_keys = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: measurement_field_keys_fn})", Start: ast.Position{ Column: 1, Line: 89, }, }, }, }}, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "measurement_field_keys_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 3, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "measurement_field_keys_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 3, }, }, }, Value: "testing", }, }}, Metadata: "parser-type=rust", Name: "measurement_field_keys_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "measurement_field_keys_test.flux", Source: "package v1_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "measurement_field_keys_test.flux", Source: "v1_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "v1_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 114, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "package v1_test\n\nimport \"testing\"\n\ninput = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,sys,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,sys,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.global,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.global,used_percent,82.64\n\n#datatype,string,long,dateTime:RFC3339,string,string,string,long\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,sys,host.global,load7,183\n,,0,2018-05-22T19:53:36Z,sys,host.global,load7,172\n,,0,2018-05-22T19:53:46Z,sys,host.global,load7,174\n,,0,2018-05-22T19:53:56Z,sys,host.global,load7,163\n,,0,2018-05-22T19:54:06Z,sys,host.global,load7,191\n,,0,2018-05-22T19:54:16Z,sys,host.global,load7,184\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load8,198\n,,1,2018-05-22T19:53:36Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:46Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:56Z,sys,host.local,load8,196\n,,1,2018-05-22T19:54:06Z,sys,host.local,load8,198\n,,1,2018-05-22T19:54:16Z,sys,host.local,load8,197\n\n,,2,2018-05-22T19:53:26Z,sys,host.global,load9,195\n,,2,2018-05-22T19:53:36Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:46Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:56Z,sys,host.global,load9,189\n,,2,2018-05-22T19:54:06Z,sys,host.global,load9,194\n,,2,2018-05-22T19:54:16Z,sys,host.global,load9,193\n\n,,3,2018-05-22T19:53:26Z,swp,host.global,used_percent,8298\n,,3,2018-05-22T19:53:36Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:46Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:56Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:06Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:16Z,swp,host.global,used_percent,8264\n\"\n\noutput = \"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load3\n,,0,load8\n\"\n\nmeasurement_tag_values_fn = (tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()\n\ntest measurement_tag_values = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: measurement_tag_values_fn})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 69, }, File: "measurement_tag_values_test.flux", Source: "input = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,sys,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,sys,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.global,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.global,used_percent,82.64\n\n#datatype,string,long,dateTime:RFC3339,string,string,string,long\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,sys,host.global,load7,183\n,,0,2018-05-22T19:53:36Z,sys,host.global,load7,172\n,,0,2018-05-22T19:53:46Z,sys,host.global,load7,174\n,,0,2018-05-22T19:53:56Z,sys,host.global,load7,163\n,,0,2018-05-22T19:54:06Z,sys,host.global,load7,191\n,,0,2018-05-22T19:54:16Z,sys,host.global,load7,184\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load8,198\n,,1,2018-05-22T19:53:36Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:46Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:56Z,sys,host.local,load8,196\n,,1,2018-05-22T19:54:06Z,sys,host.local,load8,198\n,,1,2018-05-22T19:54:16Z,sys,host.local,load8,197\n\n,,2,2018-05-22T19:53:26Z,sys,host.global,load9,195\n,,2,2018-05-22T19:53:36Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:46Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:56Z,sys,host.global,load9,189\n,,2,2018-05-22T19:54:06Z,sys,host.global,load9,194\n,,2,2018-05-22T19:54:16Z,sys,host.global,load9,193\n\n,,3,2018-05-22T19:53:26Z,swp,host.global,used_percent,8298\n,,3,2018-05-22T19:53:36Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:46Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:56Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:06Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:16Z,swp,host.global,used_percent,8264\n\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 5, }, File: "measurement_tag_values_test.flux", Source: "input", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Name: "input", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 69, }, File: "measurement_tag_values_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,sys,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,sys,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.global,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.global,used_percent,82.64\n\n#datatype,string,long,dateTime:RFC3339,string,string,string,long\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,sys,host.global,load7,183\n,,0,2018-05-22T19:53:36Z,sys,host.global,load7,172\n,,0,2018-05-22T19:53:46Z,sys,host.global,load7,174\n,,0,2018-05-22T19:53:56Z,sys,host.global,load7,163\n,,0,2018-05-22T19:54:06Z,sys,host.global,load7,191\n,,0,2018-05-22T19:54:16Z,sys,host.global,load7,184\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load8,198\n,,1,2018-05-22T19:53:36Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:46Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:56Z,sys,host.local,load8,196\n,,1,2018-05-22T19:54:06Z,sys,host.local,load8,198\n,,1,2018-05-22T19:54:16Z,sys,host.local,load8,197\n\n,,2,2018-05-22T19:53:26Z,sys,host.global,load9,195\n,,2,2018-05-22T19:53:36Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:46Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:56Z,sys,host.global,load9,189\n,,2,2018-05-22T19:54:06Z,sys,host.global,load9,194\n,,2,2018-05-22T19:54:16Z,sys,host.global,load9,193\n\n,,3,2018-05-22T19:53:26Z,swp,host.global,used_percent,8298\n,,3,2018-05-22T19:53:36Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:46Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:56Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:06Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:16Z,swp,host.global,used_percent,8264\n\"", Start: ast.Position{ Column: 9, Line: 5, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,sys,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,sys,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,sys,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,sys,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.global,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.global,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.global,used_percent,82.64\n\n#datatype,string,long,dateTime:RFC3339,string,string,string,long\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,sys,host.global,load7,183\n,,0,2018-05-22T19:53:36Z,sys,host.global,load7,172\n,,0,2018-05-22T19:53:46Z,sys,host.global,load7,174\n,,0,2018-05-22T19:53:56Z,sys,host.global,load7,163\n,,0,2018-05-22T19:54:06Z,sys,host.global,load7,191\n,,0,2018-05-22T19:54:16Z,sys,host.global,load7,184\n\n,,1,2018-05-22T19:53:26Z,sys,host.local,load8,198\n,,1,2018-05-22T19:53:36Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:46Z,sys,host.local,load8,197\n,,1,2018-05-22T19:53:56Z,sys,host.local,load8,196\n,,1,2018-05-22T19:54:06Z,sys,host.local,load8,198\n,,1,2018-05-22T19:54:16Z,sys,host.local,load8,197\n\n,,2,2018-05-22T19:53:26Z,sys,host.global,load9,195\n,,2,2018-05-22T19:53:36Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:46Z,sys,host.global,load9,192\n,,2,2018-05-22T19:53:56Z,sys,host.global,load9,189\n,,2,2018-05-22T19:54:06Z,sys,host.global,load9,194\n,,2,2018-05-22T19:54:16Z,sys,host.global,load9,193\n\n,,3,2018-05-22T19:53:26Z,swp,host.global,used_percent,8298\n,,3,2018-05-22T19:53:36Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:46Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:53:56Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:06Z,swp,host.global,used_percent,8259\n,,3,2018-05-22T19:54:16Z,swp,host.global,used_percent,8264\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 78, }, File: "measurement_tag_values_test.flux", Source: "output = \"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load3\n,,0,load8\n\"", Start: ast.Position{ Column: 1, Line: 71, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 71, }, File: "measurement_tag_values_test.flux", Source: "output", Start: ast.Position{ Column: 1, Line: 71, }, }, }, Name: "output", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 78, }, File: "measurement_tag_values_test.flux", Source: "\"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load3\n,,0,load8\n\"", Start: ast.Position{ Column: 10, Line: 71, }, }, }, Value: "\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load3\n,,0,load8\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 87, }, File: "measurement_tag_values_test.flux", Source: "measurement_tag_values_fn = (tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()", Start: ast.Position{ Column: 1, Line: 80, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 80, }, File: "measurement_tag_values_test.flux", Source: "measurement_tag_values_fn", Start: ast.Position{ Column: 1, Line: 80, }, }, }, Name: "measurement_tag_values_fn", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 87, }, File: "measurement_tag_values_test.flux", Source: "(tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()", Start: ast.Position{ Column: 29, Line: 80, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 50, Line: 80, }, File: "measurement_tag_values_test.flux", Source: "tables", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Name: "tables", }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 81, }, File: "measurement_tag_values_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 81, }, File: "measurement_tag_values_test.flux", Source: "start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 81, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 81, }, File: "measurement_tag_values_test.flux", Source: "start: 2018-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 81, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 81, }, File: "measurement_tag_values_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 81, }, }, }, Name: "start", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 81, }, File: "measurement_tag_values_test.flux", Source: "2018-01-01T00:00:00Z", Start: ast.Position{ Column: 21, Line: 81, }, }, }, Value: parser.MustParseTime("2018-01-01T00:00:00Z"), }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 81, }, File: "measurement_tag_values_test.flux", Source: "stop: 2019-01-01T00:00:00Z", Start: ast.Position{ Column: 43, Line: 81, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 47, Line: 81, }, File: "measurement_tag_values_test.flux", Source: "stop", Start: ast.Position{ Column: 43, Line: 81, }, }, }, Name: "stop", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 81, }, File: "measurement_tag_values_test.flux", Source: "2019-01-01T00:00:00Z", Start: ast.Position{ Column: 49, Line: 81, }, }, }, Value: parser.MustParseTime("2019-01-01T00:00:00Z"), }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 81, }, File: "measurement_tag_values_test.flux", Source: "range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)", Start: ast.Position{ Column: 8, Line: 81, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 81, }, File: "measurement_tag_values_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 81, }, }, }, Name: "range", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 50, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "fn: (r) => r._measurement == \"sys\"", Start: ast.Position{ Column: 15, Line: 82, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "fn: (r) => r._measurement == \"sys\"", Start: ast.Position{ Column: 15, Line: 82, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "fn", Start: ast.Position{ Column: 15, Line: 82, }, }, }, Name: "fn", }, Value: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "(r) => r._measurement == \"sys\"", Start: ast.Position{ Column: 19, Line: 82, }, }, }, Body: &ast.BinaryExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "r._measurement == \"sys\"", Start: ast.Position{ Column: 26, Line: 82, }, }, }, Left: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "r._measurement", Start: ast.Position{ Column: 26, Line: 82, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 27, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "r", Start: ast.Position{ Column: 26, Line: 82, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "_measurement", Start: ast.Position{ Column: 28, Line: 82, }, }, }, Name: "_measurement", }, }, Operator: 17, Right: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "\"sys\"", Start: ast.Position{ Column: 44, Line: 82, }, }, }, Value: "sys", }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 82, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 82, }, }, }, Name: "r", }, Value: nil, }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 50, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "filter(fn: (r) => r._measurement == \"sys\")", Start: ast.Position{ Column: 8, Line: 82, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 82, }, File: "measurement_tag_values_test.flux", Source: "filter", Start: ast.Position{ Column: 8, Line: 82, }, }, }, Name: "filter", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "fn: (r) => r.host == \"host.local\"", Start: ast.Position{ Column: 15, Line: 83, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "fn: (r) => r.host == \"host.local\"", Start: ast.Position{ Column: 15, Line: 83, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "fn", Start: ast.Position{ Column: 15, Line: 83, }, }, }, Name: "fn", }, Value: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "(r) => r.host == \"host.local\"", Start: ast.Position{ Column: 19, Line: 83, }, }, }, Body: &ast.BinaryExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "r.host == \"host.local\"", Start: ast.Position{ Column: 26, Line: 83, }, }, }, Left: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "r.host", Start: ast.Position{ Column: 26, Line: 83, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 27, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "r", Start: ast.Position{ Column: 26, Line: 83, }, }, }, Name: "r", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "host", Start: ast.Position{ Column: 28, Line: 83, }, }, }, Name: "host", }, }, Operator: 17, Right: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 48, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "\"host.local\"", Start: ast.Position{ Column: 36, Line: 83, }, }, }, Value: "host.local", }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 83, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 83, }, }, }, Name: "r", }, Value: nil, }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 49, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "filter(fn: (r) => r.host == \"host.local\")", Start: ast.Position{ Column: 8, Line: 83, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 83, }, File: "measurement_tag_values_test.flux", Source: "filter", Start: ast.Position{ Column: 8, Line: 83, }, }, }, Name: "filter", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 84, }, File: "measurement_tag_values_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 84, }, File: "measurement_tag_values_test.flux", Source: "columns: [\"_field\"]", Start: ast.Position{ Column: 13, Line: 84, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 84, }, File: "measurement_tag_values_test.flux", Source: "columns: [\"_field\"]", Start: ast.Position{ Column: 13, Line: 84, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 20, Line: 84, }, File: "measurement_tag_values_test.flux", Source: "columns", Start: ast.Position{ Column: 13, Line: 84, }, }, }, Name: "columns", }, Value: &ast.ArrayExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 84, }, File: "measurement_tag_values_test.flux", Source: "[\"_field\"]", Start: ast.Position{ Column: 22, Line: 84, }, }, }, Elements: []ast.Expression{&ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 84, }, File: "measurement_tag_values_test.flux", Source: "\"_field\"", Start: ast.Position{ Column: 23, Line: 84, }, }, }, Value: "_field", }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 84, }, File: "measurement_tag_values_test.flux", Source: "keep(columns: [\"_field\"])", Start: ast.Position{ Column: 8, Line: 84, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 84, }, File: "measurement_tag_values_test.flux", Source: "keep", Start: ast.Position{ Column: 8, Line: 84, }, }, }, Name: "keep", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 85, }, File: "measurement_tag_values_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])\n |> group()", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 85, }, File: "measurement_tag_values_test.flux", Source: "group()", Start: ast.Position{ Column: 8, Line: 85, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 85, }, File: "measurement_tag_values_test.flux", Source: "group", Start: ast.Position{ Column: 8, Line: 85, }, }, }, Name: "group", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 34, Line: 86, }, File: "measurement_tag_values_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 86, }, File: "measurement_tag_values_test.flux", Source: "column: \"_field\"", Start: ast.Position{ Column: 17, Line: 86, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 86, }, File: "measurement_tag_values_test.flux", Source: "column: \"_field\"", Start: ast.Position{ Column: 17, Line: 86, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 86, }, File: "measurement_tag_values_test.flux", Source: "column", Start: ast.Position{ Column: 17, Line: 86, }, }, }, Name: "column", }, Value: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 86, }, File: "measurement_tag_values_test.flux", Source: "\"_field\"", Start: ast.Position{ Column: 25, Line: 86, }, }, }, Value: "_field", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 34, Line: 86, }, File: "measurement_tag_values_test.flux", Source: "distinct(column: \"_field\")", Start: ast.Position{ Column: 8, Line: 86, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 86, }, File: "measurement_tag_values_test.flux", Source: "distinct", Start: ast.Position{ Column: 8, Line: 86, }, }, }, Name: "distinct", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 87, }, File: "measurement_tag_values_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"sys\")\n |> filter(fn: (r) => r.host == \"host.local\")\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()", Start: ast.Position{ Column: 44, Line: 80, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 87, }, File: "measurement_tag_values_test.flux", Source: "sort()", Start: ast.Position{ Column: 8, Line: 87, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 87, }, File: "measurement_tag_values_test.flux", Source: "sort", Start: ast.Position{ Column: 8, Line: 87, }, }, }, Name: "sort", }, }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 80, }, File: "measurement_tag_values_test.flux", Source: "tables=<-", Start: ast.Position{ Column: 30, Line: 80, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 36, Line: 80, }, File: "measurement_tag_values_test.flux", Source: "tables", Start: ast.Position{ Column: 30, Line: 80, }, }, }, Name: "tables", }, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 80, }, File: "measurement_tag_values_test.flux", Source: "<-", Start: ast.Position{ Column: 37, Line: 80, }, }, }}, }}, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 114, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "measurement_tag_values = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: measurement_tag_values_fn})", Start: ast.Position{ Column: 6, Line: 89, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 28, Line: 89, }, File: "measurement_tag_values_test.flux", Source: "measurement_tag_values", Start: ast.Position{ Column: 6, Line: 89, }, }, }, Name: "measurement_tag_values", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 114, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "() =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: measurement_tag_values_fn})", Start: ast.Position{ Column: 31, Line: 89, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 114, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: measurement_tag_values_fn})", Start: ast.Position{ Column: 5, Line: 90, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 113, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "{input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: measurement_tag_values_fn}", Start: ast.Position{ Column: 6, Line: 90, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "input: testing.loadStorage(csv: input)", Start: ast.Position{ Column: 7, Line: 90, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "input", Start: ast.Position{ Column: 7, Line: 90, }, }, }, Name: "input", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "csv: input", Start: ast.Position{ Column: 34, Line: 90, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "csv: input", Start: ast.Position{ Column: 34, Line: 90, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "csv", Start: ast.Position{ Column: 34, Line: 90, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "input", Start: ast.Position{ Column: 39, Line: 90, }, }, }, Name: "input", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "testing.loadStorage(csv: input)", Start: ast.Position{ Column: 14, Line: 90, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 14, Line: 90, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "testing", Start: ast.Position{ Column: 14, Line: 90, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 22, Line: 90, }, }, }, Name: "loadStorage", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "want: testing.loadMem(csv: output)", Start: ast.Position{ Column: 47, Line: 90, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 51, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "want", Start: ast.Position{ Column: 47, Line: 90, }, }, }, Name: "want", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "csv: output", Start: ast.Position{ Column: 69, Line: 90, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "csv: output", Start: ast.Position{ Column: 69, Line: 90, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 72, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "csv", Start: ast.Position{ Column: 69, Line: 90, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "output", Start: ast.Position{ Column: 74, Line: 90, }, }, }, Name: "output", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "testing.loadMem(csv: output)", Start: ast.Position{ Column: 53, Line: 90, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 53, Line: 90, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 60, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "testing", Start: ast.Position{ Column: 53, Line: 90, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "loadMem", Start: ast.Position{ Column: 61, Line: 90, }, }, }, Name: "loadMem", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 112, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "fn: measurement_tag_values_fn", Start: ast.Position{ Column: 83, Line: 90, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 85, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "fn", Start: ast.Position{ Column: 83, Line: 90, }, }, }, Name: "fn", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 112, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "measurement_tag_values_fn", Start: ast.Position{ Column: 87, Line: 90, }, }, }, Name: "measurement_tag_values_fn", }, }}, With: nil, }, }, Params: nil, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 114, Line: 90, }, File: "measurement_tag_values_test.flux", Source: "test measurement_tag_values = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: measurement_tag_values_fn})", Start: ast.Position{ Column: 1, Line: 89, }, }, }, }}, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "measurement_tag_values_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 3, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "measurement_tag_values_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 3, }, }, }, Value: "testing", }, }}, Metadata: "parser-type=rust", Name: "measurement_tag_values_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "measurement_tag_values_test.flux", Source: "package v1_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "measurement_tag_values_test.flux", Source: "v1_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "v1_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 59, }, File: "show_field_keys_test.flux", Source: "package v1_test\n\nimport \"testing\"\n\ninput = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.local,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.local,used_percent,82.64\n\"\n\noutput = \"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load1\n,,0,load3\n,,0,load5\n,,0,used_percent\n\"\n\nshow_field_keys_fn = (tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()\n\ntest show_field_keys = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_field_keys_fn})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 37, }, File: "show_field_keys_test.flux", Source: "input = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.local,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.local,used_percent,82.64\n\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 5, }, File: "show_field_keys_test.flux", Source: "input", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Name: "input", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 37, }, File: "show_field_keys_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.local,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.local,used_percent,82.64\n\"", Start: ast.Position{ Column: 9, Line: 5, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.local,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.local,used_percent,82.64\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 48, }, File: "show_field_keys_test.flux", Source: "output = \"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load1\n,,0,load3\n,,0,load5\n,,0,used_percent\n\"", Start: ast.Position{ Column: 1, Line: 39, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 39, }, File: "show_field_keys_test.flux", Source: "output", Start: ast.Position{ Column: 1, Line: 39, }, }, }, Name: "output", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 48, }, File: "show_field_keys_test.flux", Source: "\"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load1\n,,0,load3\n,,0,load5\n,,0,used_percent\n\"", Start: ast.Position{ Column: 10, Line: 39, }, }, }, Value: "\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load1\n,,0,load3\n,,0,load5\n,,0,used_percent\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 56, }, File: "show_field_keys_test.flux", Source: "show_field_keys_fn = (tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()", Start: ast.Position{ Column: 1, Line: 50, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 50, }, File: "show_field_keys_test.flux", Source: "show_field_keys_fn", Start: ast.Position{ Column: 1, Line: 50, }, }, }, Name: "show_field_keys_fn", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 56, }, File: "show_field_keys_test.flux", Source: "(tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()", Start: ast.Position{ Column: 22, Line: 50, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 43, Line: 50, }, File: "show_field_keys_test.flux", Source: "tables", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Name: "tables", }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 51, }, File: "show_field_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 51, }, File: "show_field_keys_test.flux", Source: "start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 51, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 51, }, File: "show_field_keys_test.flux", Source: "start: 2018-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 51, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 51, }, File: "show_field_keys_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 51, }, }, }, Name: "start", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 51, }, File: "show_field_keys_test.flux", Source: "2018-01-01T00:00:00Z", Start: ast.Position{ Column: 21, Line: 51, }, }, }, Value: parser.MustParseTime("2018-01-01T00:00:00Z"), }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 51, }, File: "show_field_keys_test.flux", Source: "stop: 2019-01-01T00:00:00Z", Start: ast.Position{ Column: 43, Line: 51, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 47, Line: 51, }, File: "show_field_keys_test.flux", Source: "stop", Start: ast.Position{ Column: 43, Line: 51, }, }, }, Name: "stop", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 51, }, File: "show_field_keys_test.flux", Source: "2019-01-01T00:00:00Z", Start: ast.Position{ Column: 49, Line: 51, }, }, }, Value: parser.MustParseTime("2019-01-01T00:00:00Z"), }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 51, }, File: "show_field_keys_test.flux", Source: "range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)", Start: ast.Position{ Column: 8, Line: 51, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 51, }, File: "show_field_keys_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 51, }, }, }, Name: "range", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 52, }, File: "show_field_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 52, }, File: "show_field_keys_test.flux", Source: "fn: (r) => true", Start: ast.Position{ Column: 15, Line: 52, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 52, }, File: "show_field_keys_test.flux", Source: "fn: (r) => true", Start: ast.Position{ Column: 15, Line: 52, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 52, }, File: "show_field_keys_test.flux", Source: "fn", Start: ast.Position{ Column: 15, Line: 52, }, }, }, Name: "fn", }, Value: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 52, }, File: "show_field_keys_test.flux", Source: "(r) => true", Start: ast.Position{ Column: 19, Line: 52, }, }, }, Body: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 52, }, File: "show_field_keys_test.flux", Source: "true", Start: ast.Position{ Column: 26, Line: 52, }, }, }, Name: "true", }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 52, }, File: "show_field_keys_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 52, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 52, }, File: "show_field_keys_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 52, }, }, }, Name: "r", }, Value: nil, }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 52, }, File: "show_field_keys_test.flux", Source: "filter(fn: (r) => true)", Start: ast.Position{ Column: 8, Line: 52, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 52, }, File: "show_field_keys_test.flux", Source: "filter", Start: ast.Position{ Column: 8, Line: 52, }, }, }, Name: "filter", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 53, }, File: "show_field_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 53, }, File: "show_field_keys_test.flux", Source: "columns: [\"_field\"]", Start: ast.Position{ Column: 13, Line: 53, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 53, }, File: "show_field_keys_test.flux", Source: "columns: [\"_field\"]", Start: ast.Position{ Column: 13, Line: 53, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 20, Line: 53, }, File: "show_field_keys_test.flux", Source: "columns", Start: ast.Position{ Column: 13, Line: 53, }, }, }, Name: "columns", }, Value: &ast.ArrayExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 53, }, File: "show_field_keys_test.flux", Source: "[\"_field\"]", Start: ast.Position{ Column: 22, Line: 53, }, }, }, Elements: []ast.Expression{&ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 53, }, File: "show_field_keys_test.flux", Source: "\"_field\"", Start: ast.Position{ Column: 23, Line: 53, }, }, }, Value: "_field", }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 53, }, File: "show_field_keys_test.flux", Source: "keep(columns: [\"_field\"])", Start: ast.Position{ Column: 8, Line: 53, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 53, }, File: "show_field_keys_test.flux", Source: "keep", Start: ast.Position{ Column: 8, Line: 53, }, }, }, Name: "keep", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 54, }, File: "show_field_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])\n |> group()", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 54, }, File: "show_field_keys_test.flux", Source: "group()", Start: ast.Position{ Column: 8, Line: 54, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 54, }, File: "show_field_keys_test.flux", Source: "group", Start: ast.Position{ Column: 8, Line: 54, }, }, }, Name: "group", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 34, Line: 55, }, File: "show_field_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 55, }, File: "show_field_keys_test.flux", Source: "column: \"_field\"", Start: ast.Position{ Column: 17, Line: 55, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 55, }, File: "show_field_keys_test.flux", Source: "column: \"_field\"", Start: ast.Position{ Column: 17, Line: 55, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 55, }, File: "show_field_keys_test.flux", Source: "column", Start: ast.Position{ Column: 17, Line: 55, }, }, }, Name: "column", }, Value: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 55, }, File: "show_field_keys_test.flux", Source: "\"_field\"", Start: ast.Position{ Column: 25, Line: 55, }, }, }, Value: "_field", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 34, Line: 55, }, File: "show_field_keys_test.flux", Source: "distinct(column: \"_field\")", Start: ast.Position{ Column: 8, Line: 55, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 55, }, File: "show_field_keys_test.flux", Source: "distinct", Start: ast.Position{ Column: 8, Line: 55, }, }, }, Name: "distinct", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 56, }, File: "show_field_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 56, }, File: "show_field_keys_test.flux", Source: "sort()", Start: ast.Position{ Column: 8, Line: 56, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 56, }, File: "show_field_keys_test.flux", Source: "sort", Start: ast.Position{ Column: 8, Line: 56, }, }, }, Name: "sort", }, }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 50, }, File: "show_field_keys_test.flux", Source: "tables=<-", Start: ast.Position{ Column: 23, Line: 50, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 29, Line: 50, }, File: "show_field_keys_test.flux", Source: "tables", Start: ast.Position{ Column: 23, Line: 50, }, }, }, Name: "tables", }, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 50, }, File: "show_field_keys_test.flux", Source: "<-", Start: ast.Position{ Column: 30, Line: 50, }, }, }}, }}, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 59, }, File: "show_field_keys_test.flux", Source: "show_field_keys = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_field_keys_fn})", Start: ast.Position{ Column: 6, Line: 58, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 58, }, File: "show_field_keys_test.flux", Source: "show_field_keys", Start: ast.Position{ Column: 6, Line: 58, }, }, }, Name: "show_field_keys", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 59, }, File: "show_field_keys_test.flux", Source: "() =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_field_keys_fn})", Start: ast.Position{ Column: 24, Line: 58, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 59, }, File: "show_field_keys_test.flux", Source: "({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_field_keys_fn})", Start: ast.Position{ Column: 5, Line: 59, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 106, Line: 59, }, File: "show_field_keys_test.flux", Source: "{input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_field_keys_fn}", Start: ast.Position{ Column: 6, Line: 59, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 59, }, File: "show_field_keys_test.flux", Source: "input: testing.loadStorage(csv: input)", Start: ast.Position{ Column: 7, Line: 59, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 59, }, File: "show_field_keys_test.flux", Source: "input", Start: ast.Position{ Column: 7, Line: 59, }, }, }, Name: "input", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 59, }, File: "show_field_keys_test.flux", Source: "csv: input", Start: ast.Position{ Column: 34, Line: 59, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 59, }, File: "show_field_keys_test.flux", Source: "csv: input", Start: ast.Position{ Column: 34, Line: 59, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 59, }, File: "show_field_keys_test.flux", Source: "csv", Start: ast.Position{ Column: 34, Line: 59, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 59, }, File: "show_field_keys_test.flux", Source: "input", Start: ast.Position{ Column: 39, Line: 59, }, }, }, Name: "input", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 59, }, File: "show_field_keys_test.flux", Source: "testing.loadStorage(csv: input)", Start: ast.Position{ Column: 14, Line: 59, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 59, }, File: "show_field_keys_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 14, Line: 59, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 59, }, File: "show_field_keys_test.flux", Source: "testing", Start: ast.Position{ Column: 14, Line: 59, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 59, }, File: "show_field_keys_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 22, Line: 59, }, }, }, Name: "loadStorage", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 59, }, File: "show_field_keys_test.flux", Source: "want: testing.loadMem(csv: output)", Start: ast.Position{ Column: 47, Line: 59, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 51, Line: 59, }, File: "show_field_keys_test.flux", Source: "want", Start: ast.Position{ Column: 47, Line: 59, }, }, }, Name: "want", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 59, }, File: "show_field_keys_test.flux", Source: "csv: output", Start: ast.Position{ Column: 69, Line: 59, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 59, }, File: "show_field_keys_test.flux", Source: "csv: output", Start: ast.Position{ Column: 69, Line: 59, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 72, Line: 59, }, File: "show_field_keys_test.flux", Source: "csv", Start: ast.Position{ Column: 69, Line: 59, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 59, }, File: "show_field_keys_test.flux", Source: "output", Start: ast.Position{ Column: 74, Line: 59, }, }, }, Name: "output", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 59, }, File: "show_field_keys_test.flux", Source: "testing.loadMem(csv: output)", Start: ast.Position{ Column: 53, Line: 59, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 59, }, File: "show_field_keys_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 53, Line: 59, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 60, Line: 59, }, File: "show_field_keys_test.flux", Source: "testing", Start: ast.Position{ Column: 53, Line: 59, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 59, }, File: "show_field_keys_test.flux", Source: "loadMem", Start: ast.Position{ Column: 61, Line: 59, }, }, }, Name: "loadMem", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 59, }, File: "show_field_keys_test.flux", Source: "fn: show_field_keys_fn", Start: ast.Position{ Column: 83, Line: 59, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 85, Line: 59, }, File: "show_field_keys_test.flux", Source: "fn", Start: ast.Position{ Column: 83, Line: 59, }, }, }, Name: "fn", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 59, }, File: "show_field_keys_test.flux", Source: "show_field_keys_fn", Start: ast.Position{ Column: 87, Line: 59, }, }, }, Name: "show_field_keys_fn", }, }}, With: nil, }, }, Params: nil, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 59, }, File: "show_field_keys_test.flux", Source: "test show_field_keys = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_field_keys_fn})", Start: ast.Position{ Column: 1, Line: 58, }, }, }, }}, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "show_field_keys_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 3, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "show_field_keys_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 3, }, }, }, Value: "testing", }, }}, Metadata: "parser-type=rust", Name: "show_field_keys_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "show_field_keys_test.flux", Source: "package v1_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "show_field_keys_test.flux", Source: "v1_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "v1_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 109, Line: 57, }, File: "show_measurements_test.flux", Source: "package v1_test\n\nimport \"testing\"\n\ninput = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.local,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.local,used_percent,82.64\n\"\n\noutput = \"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,swap\n,,0,system\n\"\n\nshow_measurements_fn = (tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_measurement\"])\n |> group()\n |> distinct(column: \"_measurement\")\n |> sort()\n\ntest show_measurements = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_measurements_fn})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 37, }, File: "show_measurements_test.flux", Source: "input = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.local,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.local,used_percent,82.64\n\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 5, }, File: "show_measurements_test.flux", Source: "input", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Name: "input", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 37, }, File: "show_measurements_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.local,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.local,used_percent,82.64\n\"", Start: ast.Position{ Column: 9, Line: 5, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.local,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.local,used_percent,82.64\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 46, }, File: "show_measurements_test.flux", Source: "output = \"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,swap\n,,0,system\n\"", Start: ast.Position{ Column: 1, Line: 39, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 39, }, File: "show_measurements_test.flux", Source: "output", Start: ast.Position{ Column: 1, Line: 39, }, }, }, Name: "output", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 46, }, File: "show_measurements_test.flux", Source: "\"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,swap\n,,0,system\n\"", Start: ast.Position{ Column: 10, Line: 39, }, }, }, Value: "\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,swap\n,,0,system\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 54, }, File: "show_measurements_test.flux", Source: "show_measurements_fn = (tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_measurement\"])\n |> group()\n |> distinct(column: \"_measurement\")\n |> sort()", Start: ast.Position{ Column: 1, Line: 48, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 48, }, File: "show_measurements_test.flux", Source: "show_measurements_fn", Start: ast.Position{ Column: 1, Line: 48, }, }, }, Name: "show_measurements_fn", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 54, }, File: "show_measurements_test.flux", Source: "(tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_measurement\"])\n |> group()\n |> distinct(column: \"_measurement\")\n |> sort()", Start: ast.Position{ Column: 24, Line: 48, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 48, }, File: "show_measurements_test.flux", Source: "tables", Start: ast.Position{ Column: 39, Line: 48, }, }, }, Name: "tables", }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 49, }, File: "show_measurements_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)", Start: ast.Position{ Column: 39, Line: 48, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 49, }, File: "show_measurements_test.flux", Source: "start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 49, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 49, }, File: "show_measurements_test.flux", Source: "start: 2018-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 49, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 49, }, File: "show_measurements_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 49, }, }, }, Name: "start", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 49, }, File: "show_measurements_test.flux", Source: "2018-01-01T00:00:00Z", Start: ast.Position{ Column: 21, Line: 49, }, }, }, Value: parser.MustParseTime("2018-01-01T00:00:00Z"), }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 49, }, File: "show_measurements_test.flux", Source: "stop: 2019-01-01T00:00:00Z", Start: ast.Position{ Column: 43, Line: 49, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 47, Line: 49, }, File: "show_measurements_test.flux", Source: "stop", Start: ast.Position{ Column: 43, Line: 49, }, }, }, Name: "stop", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 49, }, File: "show_measurements_test.flux", Source: "2019-01-01T00:00:00Z", Start: ast.Position{ Column: 49, Line: 49, }, }, }, Value: parser.MustParseTime("2019-01-01T00:00:00Z"), }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 49, }, File: "show_measurements_test.flux", Source: "range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)", Start: ast.Position{ Column: 8, Line: 49, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 49, }, File: "show_measurements_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 49, }, }, }, Name: "range", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 50, }, File: "show_measurements_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)", Start: ast.Position{ Column: 39, Line: 48, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 50, }, File: "show_measurements_test.flux", Source: "fn: (r) => true", Start: ast.Position{ Column: 15, Line: 50, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 50, }, File: "show_measurements_test.flux", Source: "fn: (r) => true", Start: ast.Position{ Column: 15, Line: 50, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 50, }, File: "show_measurements_test.flux", Source: "fn", Start: ast.Position{ Column: 15, Line: 50, }, }, }, Name: "fn", }, Value: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 50, }, File: "show_measurements_test.flux", Source: "(r) => true", Start: ast.Position{ Column: 19, Line: 50, }, }, }, Body: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 50, }, File: "show_measurements_test.flux", Source: "true", Start: ast.Position{ Column: 26, Line: 50, }, }, }, Name: "true", }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 50, }, File: "show_measurements_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 50, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 50, }, File: "show_measurements_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 50, }, }, }, Name: "r", }, Value: nil, }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 50, }, File: "show_measurements_test.flux", Source: "filter(fn: (r) => true)", Start: ast.Position{ Column: 8, Line: 50, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 50, }, File: "show_measurements_test.flux", Source: "filter", Start: ast.Position{ Column: 8, Line: 50, }, }, }, Name: "filter", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 51, }, File: "show_measurements_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_measurement\"])", Start: ast.Position{ Column: 39, Line: 48, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 38, Line: 51, }, File: "show_measurements_test.flux", Source: "columns: [\"_measurement\"]", Start: ast.Position{ Column: 13, Line: 51, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 38, Line: 51, }, File: "show_measurements_test.flux", Source: "columns: [\"_measurement\"]", Start: ast.Position{ Column: 13, Line: 51, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 20, Line: 51, }, File: "show_measurements_test.flux", Source: "columns", Start: ast.Position{ Column: 13, Line: 51, }, }, }, Name: "columns", }, Value: &ast.ArrayExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 38, Line: 51, }, File: "show_measurements_test.flux", Source: "[\"_measurement\"]", Start: ast.Position{ Column: 22, Line: 51, }, }, }, Elements: []ast.Expression{&ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 51, }, File: "show_measurements_test.flux", Source: "\"_measurement\"", Start: ast.Position{ Column: 23, Line: 51, }, }, }, Value: "_measurement", }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 51, }, File: "show_measurements_test.flux", Source: "keep(columns: [\"_measurement\"])", Start: ast.Position{ Column: 8, Line: 51, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 51, }, File: "show_measurements_test.flux", Source: "keep", Start: ast.Position{ Column: 8, Line: 51, }, }, }, Name: "keep", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 52, }, File: "show_measurements_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_measurement\"])\n |> group()", Start: ast.Position{ Column: 39, Line: 48, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 52, }, File: "show_measurements_test.flux", Source: "group()", Start: ast.Position{ Column: 8, Line: 52, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 52, }, File: "show_measurements_test.flux", Source: "group", Start: ast.Position{ Column: 8, Line: 52, }, }, }, Name: "group", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 53, }, File: "show_measurements_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_measurement\"])\n |> group()\n |> distinct(column: \"_measurement\")", Start: ast.Position{ Column: 39, Line: 48, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 53, }, File: "show_measurements_test.flux", Source: "column: \"_measurement\"", Start: ast.Position{ Column: 17, Line: 53, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 53, }, File: "show_measurements_test.flux", Source: "column: \"_measurement\"", Start: ast.Position{ Column: 17, Line: 53, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 53, }, File: "show_measurements_test.flux", Source: "column", Start: ast.Position{ Column: 17, Line: 53, }, }, }, Name: "column", }, Value: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 39, Line: 53, }, File: "show_measurements_test.flux", Source: "\"_measurement\"", Start: ast.Position{ Column: 25, Line: 53, }, }, }, Value: "_measurement", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 53, }, File: "show_measurements_test.flux", Source: "distinct(column: \"_measurement\")", Start: ast.Position{ Column: 8, Line: 53, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 53, }, File: "show_measurements_test.flux", Source: "distinct", Start: ast.Position{ Column: 8, Line: 53, }, }, }, Name: "distinct", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 54, }, File: "show_measurements_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_measurement\"])\n |> group()\n |> distinct(column: \"_measurement\")\n |> sort()", Start: ast.Position{ Column: 39, Line: 48, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 54, }, File: "show_measurements_test.flux", Source: "sort()", Start: ast.Position{ Column: 8, Line: 54, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 54, }, File: "show_measurements_test.flux", Source: "sort", Start: ast.Position{ Column: 8, Line: 54, }, }, }, Name: "sort", }, }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 34, Line: 48, }, File: "show_measurements_test.flux", Source: "tables=<-", Start: ast.Position{ Column: 25, Line: 48, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 48, }, File: "show_measurements_test.flux", Source: "tables", Start: ast.Position{ Column: 25, Line: 48, }, }, }, Name: "tables", }, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 34, Line: 48, }, File: "show_measurements_test.flux", Source: "<-", Start: ast.Position{ Column: 32, Line: 48, }, }, }}, }}, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 109, Line: 57, }, File: "show_measurements_test.flux", Source: "show_measurements = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_measurements_fn})", Start: ast.Position{ Column: 6, Line: 56, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 56, }, File: "show_measurements_test.flux", Source: "show_measurements", Start: ast.Position{ Column: 6, Line: 56, }, }, }, Name: "show_measurements", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 109, Line: 57, }, File: "show_measurements_test.flux", Source: "() =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_measurements_fn})", Start: ast.Position{ Column: 26, Line: 56, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 109, Line: 57, }, File: "show_measurements_test.flux", Source: "({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_measurements_fn})", Start: ast.Position{ Column: 5, Line: 57, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 108, Line: 57, }, File: "show_measurements_test.flux", Source: "{input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_measurements_fn}", Start: ast.Position{ Column: 6, Line: 57, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 57, }, File: "show_measurements_test.flux", Source: "input: testing.loadStorage(csv: input)", Start: ast.Position{ Column: 7, Line: 57, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 57, }, File: "show_measurements_test.flux", Source: "input", Start: ast.Position{ Column: 7, Line: 57, }, }, }, Name: "input", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 57, }, File: "show_measurements_test.flux", Source: "csv: input", Start: ast.Position{ Column: 34, Line: 57, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 57, }, File: "show_measurements_test.flux", Source: "csv: input", Start: ast.Position{ Column: 34, Line: 57, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 57, }, File: "show_measurements_test.flux", Source: "csv", Start: ast.Position{ Column: 34, Line: 57, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 57, }, File: "show_measurements_test.flux", Source: "input", Start: ast.Position{ Column: 39, Line: 57, }, }, }, Name: "input", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 57, }, File: "show_measurements_test.flux", Source: "testing.loadStorage(csv: input)", Start: ast.Position{ Column: 14, Line: 57, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 57, }, File: "show_measurements_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 14, Line: 57, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 57, }, File: "show_measurements_test.flux", Source: "testing", Start: ast.Position{ Column: 14, Line: 57, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 57, }, File: "show_measurements_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 22, Line: 57, }, }, }, Name: "loadStorage", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 57, }, File: "show_measurements_test.flux", Source: "want: testing.loadMem(csv: output)", Start: ast.Position{ Column: 47, Line: 57, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 51, Line: 57, }, File: "show_measurements_test.flux", Source: "want", Start: ast.Position{ Column: 47, Line: 57, }, }, }, Name: "want", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 57, }, File: "show_measurements_test.flux", Source: "csv: output", Start: ast.Position{ Column: 69, Line: 57, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 57, }, File: "show_measurements_test.flux", Source: "csv: output", Start: ast.Position{ Column: 69, Line: 57, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 72, Line: 57, }, File: "show_measurements_test.flux", Source: "csv", Start: ast.Position{ Column: 69, Line: 57, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 57, }, File: "show_measurements_test.flux", Source: "output", Start: ast.Position{ Column: 74, Line: 57, }, }, }, Name: "output", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 57, }, File: "show_measurements_test.flux", Source: "testing.loadMem(csv: output)", Start: ast.Position{ Column: 53, Line: 57, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 57, }, File: "show_measurements_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 53, Line: 57, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 60, Line: 57, }, File: "show_measurements_test.flux", Source: "testing", Start: ast.Position{ Column: 53, Line: 57, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 57, }, File: "show_measurements_test.flux", Source: "loadMem", Start: ast.Position{ Column: 61, Line: 57, }, }, }, Name: "loadMem", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 57, }, File: "show_measurements_test.flux", Source: "fn: show_measurements_fn", Start: ast.Position{ Column: 83, Line: 57, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 85, Line: 57, }, File: "show_measurements_test.flux", Source: "fn", Start: ast.Position{ Column: 83, Line: 57, }, }, }, Name: "fn", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 57, }, File: "show_measurements_test.flux", Source: "show_measurements_fn", Start: ast.Position{ Column: 87, Line: 57, }, }, }, Name: "show_measurements_fn", }, }}, With: nil, }, }, Params: nil, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 109, Line: 57, }, File: "show_measurements_test.flux", Source: "test show_measurements = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_measurements_fn})", Start: ast.Position{ Column: 1, Line: 56, }, }, }, }}, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "show_measurements_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 3, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "show_measurements_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 3, }, }, }, Value: "testing", }, }}, Metadata: "parser-type=rust", Name: "show_measurements_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "show_measurements_test.flux", Source: "package v1_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "show_measurements_test.flux", Source: "v1_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "v1_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 79, }, File: "show_tag_keys_test.flux", Source: "package v1_test\n\nimport \"testing\"\n\ninput = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,long\n#group,false,false,false,true,true,true,true,false\n#default,_result,,,,,,,\n,result,table,_time,_measurement,host,region,_field,_value\n,,0,2018-05-22T19:53:26Z,system,us-east,host.local,load1,10\n,,0,2018-05-22T19:53:36Z,system,us-east,host.local,load1,11\n,,0,2018-05-22T19:53:46Z,system,us-east,host.local,load1,18\n,,0,2018-05-22T19:53:56Z,system,us-east,host.local,load1,19\n,,0,2018-05-22T19:54:06Z,system,us-east,host.local,load1,17\n,,0,2018-05-22T19:54:16Z,system,us-east,host.local,load1,17\n\n,,1,2018-05-22T19:53:26Z,system,us-east,host.local,load3,16\n,,1,2018-05-22T19:53:36Z,system,us-east,host.local,load3,16\n,,1,2018-05-22T19:53:46Z,system,us-east,host.local,load3,15\n,,1,2018-05-22T19:53:56Z,system,us-east,host.local,load3,19\n,,1,2018-05-22T19:54:06Z,system,us-east,host.local,load3,19\n,,1,2018-05-22T19:54:16Z,system,us-east,host.local,load3,19\n\n,,2,2018-05-22T19:53:26Z,system,us-west,host.local,load5,19\n,,2,2018-05-22T19:53:36Z,system,us-west,host.local,load5,22\n,,2,2018-05-22T19:53:46Z,system,us-west,host.local,load5,11\n,,2,2018-05-22T19:53:56Z,system,us-west,host.local,load5,12\n,,2,2018-05-22T19:54:06Z,system,us-west,host.local,load5,13\n,,2,2018-05-22T19:54:16Z,system,us-west,host.local,load5,13\n\"\n\noutput = \"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,_field\n,,0,_measurement\n,,0,_start\n,,0,_stop\n,,0,host\n,,0,region\n\"\n\nshow_tag_keys_fn = (tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keys()\n |> keep(columns: [\"_value\"])\n |> distinct()\n |> sort()\n\ntest show_tag_keys = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_tag_keys_fn})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 55, }, File: "show_tag_keys_test.flux", Source: "input = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,long\n#group,false,false,false,true,true,true,true,false\n#default,_result,,,,,,,\n,result,table,_time,_measurement,host,region,_field,_value\n,,0,2018-05-22T19:53:26Z,system,us-east,host.local,load1,10\n,,0,2018-05-22T19:53:36Z,system,us-east,host.local,load1,11\n,,0,2018-05-22T19:53:46Z,system,us-east,host.local,load1,18\n,,0,2018-05-22T19:53:56Z,system,us-east,host.local,load1,19\n,,0,2018-05-22T19:54:06Z,system,us-east,host.local,load1,17\n,,0,2018-05-22T19:54:16Z,system,us-east,host.local,load1,17\n\n,,1,2018-05-22T19:53:26Z,system,us-east,host.local,load3,16\n,,1,2018-05-22T19:53:36Z,system,us-east,host.local,load3,16\n,,1,2018-05-22T19:53:46Z,system,us-east,host.local,load3,15\n,,1,2018-05-22T19:53:56Z,system,us-east,host.local,load3,19\n,,1,2018-05-22T19:54:06Z,system,us-east,host.local,load3,19\n,,1,2018-05-22T19:54:16Z,system,us-east,host.local,load3,19\n\n,,2,2018-05-22T19:53:26Z,system,us-west,host.local,load5,19\n,,2,2018-05-22T19:53:36Z,system,us-west,host.local,load5,22\n,,2,2018-05-22T19:53:46Z,system,us-west,host.local,load5,11\n,,2,2018-05-22T19:53:56Z,system,us-west,host.local,load5,12\n,,2,2018-05-22T19:54:06Z,system,us-west,host.local,load5,13\n,,2,2018-05-22T19:54:16Z,system,us-west,host.local,load5,13\n\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 5, }, File: "show_tag_keys_test.flux", Source: "input", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Name: "input", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 55, }, File: "show_tag_keys_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,long\n#group,false,false,false,true,true,true,true,false\n#default,_result,,,,,,,\n,result,table,_time,_measurement,host,region,_field,_value\n,,0,2018-05-22T19:53:26Z,system,us-east,host.local,load1,10\n,,0,2018-05-22T19:53:36Z,system,us-east,host.local,load1,11\n,,0,2018-05-22T19:53:46Z,system,us-east,host.local,load1,18\n,,0,2018-05-22T19:53:56Z,system,us-east,host.local,load1,19\n,,0,2018-05-22T19:54:06Z,system,us-east,host.local,load1,17\n,,0,2018-05-22T19:54:16Z,system,us-east,host.local,load1,17\n\n,,1,2018-05-22T19:53:26Z,system,us-east,host.local,load3,16\n,,1,2018-05-22T19:53:36Z,system,us-east,host.local,load3,16\n,,1,2018-05-22T19:53:46Z,system,us-east,host.local,load3,15\n,,1,2018-05-22T19:53:56Z,system,us-east,host.local,load3,19\n,,1,2018-05-22T19:54:06Z,system,us-east,host.local,load3,19\n,,1,2018-05-22T19:54:16Z,system,us-east,host.local,load3,19\n\n,,2,2018-05-22T19:53:26Z,system,us-west,host.local,load5,19\n,,2,2018-05-22T19:53:36Z,system,us-west,host.local,load5,22\n,,2,2018-05-22T19:53:46Z,system,us-west,host.local,load5,11\n,,2,2018-05-22T19:53:56Z,system,us-west,host.local,load5,12\n,,2,2018-05-22T19:54:06Z,system,us-west,host.local,load5,13\n,,2,2018-05-22T19:54:16Z,system,us-west,host.local,load5,13\n\"", Start: ast.Position{ Column: 9, Line: 5, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n#datatype,string,long,dateTime:RFC3339,string,string,string,string,long\n#group,false,false,false,true,true,true,true,false\n#default,_result,,,,,,,\n,result,table,_time,_measurement,host,region,_field,_value\n,,0,2018-05-22T19:53:26Z,system,us-east,host.local,load1,10\n,,0,2018-05-22T19:53:36Z,system,us-east,host.local,load1,11\n,,0,2018-05-22T19:53:46Z,system,us-east,host.local,load1,18\n,,0,2018-05-22T19:53:56Z,system,us-east,host.local,load1,19\n,,0,2018-05-22T19:54:06Z,system,us-east,host.local,load1,17\n,,0,2018-05-22T19:54:16Z,system,us-east,host.local,load1,17\n\n,,1,2018-05-22T19:53:26Z,system,us-east,host.local,load3,16\n,,1,2018-05-22T19:53:36Z,system,us-east,host.local,load3,16\n,,1,2018-05-22T19:53:46Z,system,us-east,host.local,load3,15\n,,1,2018-05-22T19:53:56Z,system,us-east,host.local,load3,19\n,,1,2018-05-22T19:54:06Z,system,us-east,host.local,load3,19\n,,1,2018-05-22T19:54:16Z,system,us-east,host.local,load3,19\n\n,,2,2018-05-22T19:53:26Z,system,us-west,host.local,load5,19\n,,2,2018-05-22T19:53:36Z,system,us-west,host.local,load5,22\n,,2,2018-05-22T19:53:46Z,system,us-west,host.local,load5,11\n,,2,2018-05-22T19:53:56Z,system,us-west,host.local,load5,12\n,,2,2018-05-22T19:54:06Z,system,us-west,host.local,load5,13\n,,2,2018-05-22T19:54:16Z,system,us-west,host.local,load5,13\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 68, }, File: "show_tag_keys_test.flux", Source: "output = \"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,_field\n,,0,_measurement\n,,0,_start\n,,0,_stop\n,,0,host\n,,0,region\n\"", Start: ast.Position{ Column: 1, Line: 57, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 57, }, File: "show_tag_keys_test.flux", Source: "output", Start: ast.Position{ Column: 1, Line: 57, }, }, }, Name: "output", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 68, }, File: "show_tag_keys_test.flux", Source: "\"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,_field\n,,0,_measurement\n,,0,_start\n,,0,_stop\n,,0,host\n,,0,region\n\"", Start: ast.Position{ Column: 10, Line: 57, }, }, }, Value: "\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,_field\n,,0,_measurement\n,,0,_start\n,,0,_stop\n,,0,host\n,,0,region\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 76, }, File: "show_tag_keys_test.flux", Source: "show_tag_keys_fn = (tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keys()\n |> keep(columns: [\"_value\"])\n |> distinct()\n |> sort()", Start: ast.Position{ Column: 1, Line: 70, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 70, }, File: "show_tag_keys_test.flux", Source: "show_tag_keys_fn", Start: ast.Position{ Column: 1, Line: 70, }, }, }, Name: "show_tag_keys_fn", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 76, }, File: "show_tag_keys_test.flux", Source: "(tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keys()\n |> keep(columns: [\"_value\"])\n |> distinct()\n |> sort()", Start: ast.Position{ Column: 20, Line: 70, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 70, }, File: "show_tag_keys_test.flux", Source: "tables", Start: ast.Position{ Column: 35, Line: 70, }, }, }, Name: "tables", }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 71, }, File: "show_tag_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)", Start: ast.Position{ Column: 35, Line: 70, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 71, }, File: "show_tag_keys_test.flux", Source: "start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 71, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 71, }, File: "show_tag_keys_test.flux", Source: "start: 2018-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 71, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 71, }, File: "show_tag_keys_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 71, }, }, }, Name: "start", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 71, }, File: "show_tag_keys_test.flux", Source: "2018-01-01T00:00:00Z", Start: ast.Position{ Column: 21, Line: 71, }, }, }, Value: parser.MustParseTime("2018-01-01T00:00:00Z"), }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 71, }, File: "show_tag_keys_test.flux", Source: "stop: 2019-01-01T00:00:00Z", Start: ast.Position{ Column: 43, Line: 71, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 47, Line: 71, }, File: "show_tag_keys_test.flux", Source: "stop", Start: ast.Position{ Column: 43, Line: 71, }, }, }, Name: "stop", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 71, }, File: "show_tag_keys_test.flux", Source: "2019-01-01T00:00:00Z", Start: ast.Position{ Column: 49, Line: 71, }, }, }, Value: parser.MustParseTime("2019-01-01T00:00:00Z"), }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 71, }, File: "show_tag_keys_test.flux", Source: "range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)", Start: ast.Position{ Column: 8, Line: 71, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 71, }, File: "show_tag_keys_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 71, }, }, }, Name: "range", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 72, }, File: "show_tag_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)", Start: ast.Position{ Column: 35, Line: 70, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 72, }, File: "show_tag_keys_test.flux", Source: "fn: (r) => true", Start: ast.Position{ Column: 15, Line: 72, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 72, }, File: "show_tag_keys_test.flux", Source: "fn: (r) => true", Start: ast.Position{ Column: 15, Line: 72, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 72, }, File: "show_tag_keys_test.flux", Source: "fn", Start: ast.Position{ Column: 15, Line: 72, }, }, }, Name: "fn", }, Value: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 72, }, File: "show_tag_keys_test.flux", Source: "(r) => true", Start: ast.Position{ Column: 19, Line: 72, }, }, }, Body: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 72, }, File: "show_tag_keys_test.flux", Source: "true", Start: ast.Position{ Column: 26, Line: 72, }, }, }, Name: "true", }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 72, }, File: "show_tag_keys_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 72, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 72, }, File: "show_tag_keys_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 72, }, }, }, Name: "r", }, Value: nil, }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 72, }, File: "show_tag_keys_test.flux", Source: "filter(fn: (r) => true)", Start: ast.Position{ Column: 8, Line: 72, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 72, }, File: "show_tag_keys_test.flux", Source: "filter", Start: ast.Position{ Column: 8, Line: 72, }, }, }, Name: "filter", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 73, }, File: "show_tag_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keys()", Start: ast.Position{ Column: 35, Line: 70, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 73, }, File: "show_tag_keys_test.flux", Source: "keys()", Start: ast.Position{ Column: 8, Line: 73, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 73, }, File: "show_tag_keys_test.flux", Source: "keys", Start: ast.Position{ Column: 8, Line: 73, }, }, }, Name: "keys", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 74, }, File: "show_tag_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keys()\n |> keep(columns: [\"_value\"])", Start: ast.Position{ Column: 35, Line: 70, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 74, }, File: "show_tag_keys_test.flux", Source: "columns: [\"_value\"]", Start: ast.Position{ Column: 13, Line: 74, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 74, }, File: "show_tag_keys_test.flux", Source: "columns: [\"_value\"]", Start: ast.Position{ Column: 13, Line: 74, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 20, Line: 74, }, File: "show_tag_keys_test.flux", Source: "columns", Start: ast.Position{ Column: 13, Line: 74, }, }, }, Name: "columns", }, Value: &ast.ArrayExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 74, }, File: "show_tag_keys_test.flux", Source: "[\"_value\"]", Start: ast.Position{ Column: 22, Line: 74, }, }, }, Elements: []ast.Expression{&ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 74, }, File: "show_tag_keys_test.flux", Source: "\"_value\"", Start: ast.Position{ Column: 23, Line: 74, }, }, }, Value: "_value", }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 74, }, File: "show_tag_keys_test.flux", Source: "keep(columns: [\"_value\"])", Start: ast.Position{ Column: 8, Line: 74, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 74, }, File: "show_tag_keys_test.flux", Source: "keep", Start: ast.Position{ Column: 8, Line: 74, }, }, }, Name: "keep", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 18, Line: 75, }, File: "show_tag_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keys()\n |> keep(columns: [\"_value\"])\n |> distinct()", Start: ast.Position{ Column: 35, Line: 70, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 18, Line: 75, }, File: "show_tag_keys_test.flux", Source: "distinct()", Start: ast.Position{ Column: 8, Line: 75, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 75, }, File: "show_tag_keys_test.flux", Source: "distinct", Start: ast.Position{ Column: 8, Line: 75, }, }, }, Name: "distinct", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 76, }, File: "show_tag_keys_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keys()\n |> keep(columns: [\"_value\"])\n |> distinct()\n |> sort()", Start: ast.Position{ Column: 35, Line: 70, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 76, }, File: "show_tag_keys_test.flux", Source: "sort()", Start: ast.Position{ Column: 8, Line: 76, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 76, }, File: "show_tag_keys_test.flux", Source: "sort", Start: ast.Position{ Column: 8, Line: 76, }, }, }, Name: "sort", }, }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 70, }, File: "show_tag_keys_test.flux", Source: "tables=<-", Start: ast.Position{ Column: 21, Line: 70, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 27, Line: 70, }, File: "show_tag_keys_test.flux", Source: "tables", Start: ast.Position{ Column: 21, Line: 70, }, }, }, Name: "tables", }, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 70, }, File: "show_tag_keys_test.flux", Source: "<-", Start: ast.Position{ Column: 28, Line: 70, }, }, }}, }}, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 79, }, File: "show_tag_keys_test.flux", Source: "show_tag_keys = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_tag_keys_fn})", Start: ast.Position{ Column: 6, Line: 78, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 78, }, File: "show_tag_keys_test.flux", Source: "show_tag_keys", Start: ast.Position{ Column: 6, Line: 78, }, }, }, Name: "show_tag_keys", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 79, }, File: "show_tag_keys_test.flux", Source: "() =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_tag_keys_fn})", Start: ast.Position{ Column: 22, Line: 78, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 79, }, File: "show_tag_keys_test.flux", Source: "({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_tag_keys_fn})", Start: ast.Position{ Column: 5, Line: 79, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 104, Line: 79, }, File: "show_tag_keys_test.flux", Source: "{input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_tag_keys_fn}", Start: ast.Position{ Column: 6, Line: 79, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 79, }, File: "show_tag_keys_test.flux", Source: "input: testing.loadStorage(csv: input)", Start: ast.Position{ Column: 7, Line: 79, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 79, }, File: "show_tag_keys_test.flux", Source: "input", Start: ast.Position{ Column: 7, Line: 79, }, }, }, Name: "input", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 79, }, File: "show_tag_keys_test.flux", Source: "csv: input", Start: ast.Position{ Column: 34, Line: 79, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 79, }, File: "show_tag_keys_test.flux", Source: "csv: input", Start: ast.Position{ Column: 34, Line: 79, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 79, }, File: "show_tag_keys_test.flux", Source: "csv", Start: ast.Position{ Column: 34, Line: 79, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 79, }, File: "show_tag_keys_test.flux", Source: "input", Start: ast.Position{ Column: 39, Line: 79, }, }, }, Name: "input", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 79, }, File: "show_tag_keys_test.flux", Source: "testing.loadStorage(csv: input)", Start: ast.Position{ Column: 14, Line: 79, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 79, }, File: "show_tag_keys_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 14, Line: 79, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 79, }, File: "show_tag_keys_test.flux", Source: "testing", Start: ast.Position{ Column: 14, Line: 79, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 79, }, File: "show_tag_keys_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 22, Line: 79, }, }, }, Name: "loadStorage", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 79, }, File: "show_tag_keys_test.flux", Source: "want: testing.loadMem(csv: output)", Start: ast.Position{ Column: 47, Line: 79, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 51, Line: 79, }, File: "show_tag_keys_test.flux", Source: "want", Start: ast.Position{ Column: 47, Line: 79, }, }, }, Name: "want", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 79, }, File: "show_tag_keys_test.flux", Source: "csv: output", Start: ast.Position{ Column: 69, Line: 79, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 79, }, File: "show_tag_keys_test.flux", Source: "csv: output", Start: ast.Position{ Column: 69, Line: 79, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 72, Line: 79, }, File: "show_tag_keys_test.flux", Source: "csv", Start: ast.Position{ Column: 69, Line: 79, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 79, }, File: "show_tag_keys_test.flux", Source: "output", Start: ast.Position{ Column: 74, Line: 79, }, }, }, Name: "output", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 79, }, File: "show_tag_keys_test.flux", Source: "testing.loadMem(csv: output)", Start: ast.Position{ Column: 53, Line: 79, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 79, }, File: "show_tag_keys_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 53, Line: 79, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 60, Line: 79, }, File: "show_tag_keys_test.flux", Source: "testing", Start: ast.Position{ Column: 53, Line: 79, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 79, }, File: "show_tag_keys_test.flux", Source: "loadMem", Start: ast.Position{ Column: 61, Line: 79, }, }, }, Name: "loadMem", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 103, Line: 79, }, File: "show_tag_keys_test.flux", Source: "fn: show_tag_keys_fn", Start: ast.Position{ Column: 83, Line: 79, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 85, Line: 79, }, File: "show_tag_keys_test.flux", Source: "fn", Start: ast.Position{ Column: 83, Line: 79, }, }, }, Name: "fn", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 103, Line: 79, }, File: "show_tag_keys_test.flux", Source: "show_tag_keys_fn", Start: ast.Position{ Column: 87, Line: 79, }, }, }, Name: "show_tag_keys_fn", }, }}, With: nil, }, }, Params: nil, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 79, }, File: "show_tag_keys_test.flux", Source: "test show_tag_keys = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_tag_keys_fn})", Start: ast.Position{ Column: 1, Line: 78, }, }, }, }}, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "show_tag_keys_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 3, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "show_tag_keys_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 3, }, }, }, Value: "testing", }, }}, Metadata: "parser-type=rust", Name: "show_tag_keys_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "show_tag_keys_test.flux", Source: "package v1_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "show_tag_keys_test.flux", Source: "v1_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "v1_test", }, }, }, &ast.File{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 59, }, File: "show_tag_values_test.flux", Source: "package v1_test\n\nimport \"testing\"\n\ninput = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.local,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.local,used_percent,82.64\n\"\n\noutput = \"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load1\n,,0,load3\n,,0,load5\n,,0,used_percent\n\"\n\nshow_tag_values_fn = (tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()\n\ntest show_tag_values = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_tag_values_fn})", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Body: []ast.Statement{&ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 37, }, File: "show_tag_values_test.flux", Source: "input = \"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.local,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.local,used_percent,82.64\n\"", Start: ast.Position{ Column: 1, Line: 5, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 6, Line: 5, }, File: "show_tag_values_test.flux", Source: "input", Start: ast.Position{ Column: 1, Line: 5, }, }, }, Name: "input", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 37, }, File: "show_tag_values_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.local,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.local,used_percent,82.64\n\"", Start: ast.Position{ Column: 9, Line: 5, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,string,double\n#group,false,false,false,true,true,true,false\n#default,_result,,,,,,\n,result,table,_time,_measurement,host,_field,_value\n,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83\n,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.72\n,,0,2018-05-22T19:53:46Z,system,host.local,load1,1.74\n,,0,2018-05-22T19:53:56Z,system,host.local,load1,1.63\n,,0,2018-05-22T19:54:06Z,system,host.local,load1,1.91\n,,0,2018-05-22T19:54:16Z,system,host.local,load1,1.84\n\n,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:53:36Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:46Z,system,host.local,load3,1.97\n,,1,2018-05-22T19:53:56Z,system,host.local,load3,1.96\n,,1,2018-05-22T19:54:06Z,system,host.local,load3,1.98\n,,1,2018-05-22T19:54:16Z,system,host.local,load3,1.97\n\n,,2,2018-05-22T19:53:26Z,system,host.local,load5,1.95\n,,2,2018-05-22T19:53:36Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:46Z,system,host.local,load5,1.92\n,,2,2018-05-22T19:53:56Z,system,host.local,load5,1.89\n,,2,2018-05-22T19:54:06Z,system,host.local,load5,1.94\n,,2,2018-05-22T19:54:16Z,system,host.local,load5,1.93\n\n,,3,2018-05-22T19:53:26Z,swap,host.local,used_percent,82.98\n,,3,2018-05-22T19:53:36Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:46Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:53:56Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:06Z,swap,host.local,used_percent,82.59\n,,3,2018-05-22T19:54:16Z,swap,host.local,used_percent,82.64\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 48, }, File: "show_tag_values_test.flux", Source: "output = \"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load1\n,,0,load3\n,,0,load5\n,,0,used_percent\n\"", Start: ast.Position{ Column: 1, Line: 39, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 39, }, File: "show_tag_values_test.flux", Source: "output", Start: ast.Position{ Column: 1, Line: 39, }, }, }, Name: "output", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 48, }, File: "show_tag_values_test.flux", Source: "\"\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load1\n,,0,load3\n,,0,load5\n,,0,used_percent\n\"", Start: ast.Position{ Column: 10, Line: 39, }, }, }, Value: "\n#datatype,string,long,string\n#group,false,false,false\n#default,0,,\n,result,table,_value\n,,0,load1\n,,0,load3\n,,0,load5\n,,0,used_percent\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 56, }, File: "show_tag_values_test.flux", Source: "show_tag_values_fn = (tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()", Start: ast.Position{ Column: 1, Line: 50, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 50, }, File: "show_tag_values_test.flux", Source: "show_tag_values_fn", Start: ast.Position{ Column: 1, Line: 50, }, }, }, Name: "show_tag_values_fn", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 56, }, File: "show_tag_values_test.flux", Source: "(tables=<-) => tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()", Start: ast.Position{ Column: 22, Line: 50, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 43, Line: 50, }, File: "show_tag_values_test.flux", Source: "tables", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Name: "tables", }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 51, }, File: "show_tag_values_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 51, }, File: "show_tag_values_test.flux", Source: "start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 51, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 51, }, File: "show_tag_values_test.flux", Source: "start: 2018-01-01T00:00:00Z", Start: ast.Position{ Column: 14, Line: 51, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 51, }, File: "show_tag_values_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 51, }, }, }, Name: "start", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 51, }, File: "show_tag_values_test.flux", Source: "2018-01-01T00:00:00Z", Start: ast.Position{ Column: 21, Line: 51, }, }, }, Value: parser.MustParseTime("2018-01-01T00:00:00Z"), }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 51, }, File: "show_tag_values_test.flux", Source: "stop: 2019-01-01T00:00:00Z", Start: ast.Position{ Column: 43, Line: 51, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 47, Line: 51, }, File: "show_tag_values_test.flux", Source: "stop", Start: ast.Position{ Column: 43, Line: 51, }, }, }, Name: "stop", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 51, }, File: "show_tag_values_test.flux", Source: "2019-01-01T00:00:00Z", Start: ast.Position{ Column: 49, Line: 51, }, }, }, Value: parser.MustParseTime("2019-01-01T00:00:00Z"), }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 51, }, File: "show_tag_values_test.flux", Source: "range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)", Start: ast.Position{ Column: 8, Line: 51, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 51, }, File: "show_tag_values_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 51, }, }, }, Name: "range", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 52, }, File: "show_tag_values_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 52, }, File: "show_tag_values_test.flux", Source: "fn: (r) => true", Start: ast.Position{ Column: 15, Line: 52, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 52, }, File: "show_tag_values_test.flux", Source: "fn: (r) => true", Start: ast.Position{ Column: 15, Line: 52, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 52, }, File: "show_tag_values_test.flux", Source: "fn", Start: ast.Position{ Column: 15, Line: 52, }, }, }, Name: "fn", }, Value: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 52, }, File: "show_tag_values_test.flux", Source: "(r) => true", Start: ast.Position{ Column: 19, Line: 52, }, }, }, Body: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 30, Line: 52, }, File: "show_tag_values_test.flux", Source: "true", Start: ast.Position{ Column: 26, Line: 52, }, }, }, Name: "true", }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 52, }, File: "show_tag_values_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 52, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 52, }, File: "show_tag_values_test.flux", Source: "r", Start: ast.Position{ Column: 20, Line: 52, }, }, }, Name: "r", }, Value: nil, }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 52, }, File: "show_tag_values_test.flux", Source: "filter(fn: (r) => true)", Start: ast.Position{ Column: 8, Line: 52, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 52, }, File: "show_tag_values_test.flux", Source: "filter", Start: ast.Position{ Column: 8, Line: 52, }, }, }, Name: "filter", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 53, }, File: "show_tag_values_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 53, }, File: "show_tag_values_test.flux", Source: "columns: [\"_field\"]", Start: ast.Position{ Column: 13, Line: 53, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 53, }, File: "show_tag_values_test.flux", Source: "columns: [\"_field\"]", Start: ast.Position{ Column: 13, Line: 53, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 20, Line: 53, }, File: "show_tag_values_test.flux", Source: "columns", Start: ast.Position{ Column: 13, Line: 53, }, }, }, Name: "columns", }, Value: &ast.ArrayExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 53, }, File: "show_tag_values_test.flux", Source: "[\"_field\"]", Start: ast.Position{ Column: 22, Line: 53, }, }, }, Elements: []ast.Expression{&ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 53, }, File: "show_tag_values_test.flux", Source: "\"_field\"", Start: ast.Position{ Column: 23, Line: 53, }, }, }, Value: "_field", }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 53, }, File: "show_tag_values_test.flux", Source: "keep(columns: [\"_field\"])", Start: ast.Position{ Column: 8, Line: 53, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 53, }, File: "show_tag_values_test.flux", Source: "keep", Start: ast.Position{ Column: 8, Line: 53, }, }, }, Name: "keep", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 54, }, File: "show_tag_values_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])\n |> group()", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 15, Line: 54, }, File: "show_tag_values_test.flux", Source: "group()", Start: ast.Position{ Column: 8, Line: 54, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 54, }, File: "show_tag_values_test.flux", Source: "group", Start: ast.Position{ Column: 8, Line: 54, }, }, }, Name: "group", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 34, Line: 55, }, File: "show_tag_values_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 55, }, File: "show_tag_values_test.flux", Source: "column: \"_field\"", Start: ast.Position{ Column: 17, Line: 55, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 55, }, File: "show_tag_values_test.flux", Source: "column: \"_field\"", Start: ast.Position{ Column: 17, Line: 55, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 55, }, File: "show_tag_values_test.flux", Source: "column", Start: ast.Position{ Column: 17, Line: 55, }, }, }, Name: "column", }, Value: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 55, }, File: "show_tag_values_test.flux", Source: "\"_field\"", Start: ast.Position{ Column: 25, Line: 55, }, }, }, Value: "_field", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 34, Line: 55, }, File: "show_tag_values_test.flux", Source: "distinct(column: \"_field\")", Start: ast.Position{ Column: 8, Line: 55, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 55, }, File: "show_tag_values_test.flux", Source: "distinct", Start: ast.Position{ Column: 8, Line: 55, }, }, }, Name: "distinct", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 56, }, File: "show_tag_values_test.flux", Source: "tables\n |> range(start: 2018-01-01T00:00:00Z, stop: 2019-01-01T00:00:00Z)\n |> filter(fn: (r) => true)\n |> keep(columns: [\"_field\"])\n |> group()\n |> distinct(column: \"_field\")\n |> sort()", Start: ast.Position{ Column: 37, Line: 50, }, }, }, Call: &ast.CallExpression{ Arguments: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 56, }, File: "show_tag_values_test.flux", Source: "sort()", Start: ast.Position{ Column: 8, Line: 56, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 56, }, File: "show_tag_values_test.flux", Source: "sort", Start: ast.Position{ Column: 8, Line: 56, }, }, }, Name: "sort", }, }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 50, }, File: "show_tag_values_test.flux", Source: "tables=<-", Start: ast.Position{ Column: 23, Line: 50, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 29, Line: 50, }, File: "show_tag_values_test.flux", Source: "tables", Start: ast.Position{ Column: 23, Line: 50, }, }, }, Name: "tables", }, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 50, }, File: "show_tag_values_test.flux", Source: "<-", Start: ast.Position{ Column: 30, Line: 50, }, }, }}, }}, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 59, }, File: "show_tag_values_test.flux", Source: "show_tag_values = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_tag_values_fn})", Start: ast.Position{ Column: 6, Line: 58, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 58, }, File: "show_tag_values_test.flux", Source: "show_tag_values", Start: ast.Position{ Column: 6, Line: 58, }, }, }, Name: "show_tag_values", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 59, }, File: "show_tag_values_test.flux", Source: "() =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_tag_values_fn})", Start: ast.Position{ Column: 24, Line: 58, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 59, }, File: "show_tag_values_test.flux", Source: "({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_tag_values_fn})", Start: ast.Position{ Column: 5, Line: 59, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 106, Line: 59, }, File: "show_tag_values_test.flux", Source: "{input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_tag_values_fn}", Start: ast.Position{ Column: 6, Line: 59, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 59, }, File: "show_tag_values_test.flux", Source: "input: testing.loadStorage(csv: input)", Start: ast.Position{ Column: 7, Line: 59, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 59, }, File: "show_tag_values_test.flux", Source: "input", Start: ast.Position{ Column: 7, Line: 59, }, }, }, Name: "input", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 59, }, File: "show_tag_values_test.flux", Source: "csv: input", Start: ast.Position{ Column: 34, Line: 59, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 59, }, File: "show_tag_values_test.flux", Source: "csv: input", Start: ast.Position{ Column: 34, Line: 59, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 59, }, File: "show_tag_values_test.flux", Source: "csv", Start: ast.Position{ Column: 34, Line: 59, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 44, Line: 59, }, File: "show_tag_values_test.flux", Source: "input", Start: ast.Position{ Column: 39, Line: 59, }, }, }, Name: "input", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 59, }, File: "show_tag_values_test.flux", Source: "testing.loadStorage(csv: input)", Start: ast.Position{ Column: 14, Line: 59, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 59, }, File: "show_tag_values_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 14, Line: 59, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 59, }, File: "show_tag_values_test.flux", Source: "testing", Start: ast.Position{ Column: 14, Line: 59, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 59, }, File: "show_tag_values_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 22, Line: 59, }, }, }, Name: "loadStorage", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 59, }, File: "show_tag_values_test.flux", Source: "want: testing.loadMem(csv: output)", Start: ast.Position{ Column: 47, Line: 59, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 51, Line: 59, }, File: "show_tag_values_test.flux", Source: "want", Start: ast.Position{ Column: 47, Line: 59, }, }, }, Name: "want", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 59, }, File: "show_tag_values_test.flux", Source: "csv: output", Start: ast.Position{ Column: 69, Line: 59, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 59, }, File: "show_tag_values_test.flux", Source: "csv: output", Start: ast.Position{ Column: 69, Line: 59, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 72, Line: 59, }, File: "show_tag_values_test.flux", Source: "csv", Start: ast.Position{ Column: 69, Line: 59, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 80, Line: 59, }, File: "show_tag_values_test.flux", Source: "output", Start: ast.Position{ Column: 74, Line: 59, }, }, }, Name: "output", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 81, Line: 59, }, File: "show_tag_values_test.flux", Source: "testing.loadMem(csv: output)", Start: ast.Position{ Column: 53, Line: 59, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 59, }, File: "show_tag_values_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 53, Line: 59, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 60, Line: 59, }, File: "show_tag_values_test.flux", Source: "testing", Start: ast.Position{ Column: 53, Line: 59, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 68, Line: 59, }, File: "show_tag_values_test.flux", Source: "loadMem", Start: ast.Position{ Column: 61, Line: 59, }, }, }, Name: "loadMem", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 59, }, File: "show_tag_values_test.flux", Source: "fn: show_tag_values_fn", Start: ast.Position{ Column: 83, Line: 59, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 85, Line: 59, }, File: "show_tag_values_test.flux", Source: "fn", Start: ast.Position{ Column: 83, Line: 59, }, }, }, Name: "fn", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 105, Line: 59, }, File: "show_tag_values_test.flux", Source: "show_tag_values_fn", Start: ast.Position{ Column: 87, Line: 59, }, }, }, Name: "show_tag_values_fn", }, }}, With: nil, }, }, Params: nil, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 107, Line: 59, }, File: "show_tag_values_test.flux", Source: "test show_tag_values = () =>\n ({input: testing.loadStorage(csv: input), want: testing.loadMem(csv: output), fn: show_tag_values_fn})", Start: ast.Position{ Column: 1, Line: 58, }, }, }, }}, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "show_tag_values_test.flux", Source: "import \"testing\"", Start: ast.Position{ Column: 1, Line: 3, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "show_tag_values_test.flux", Source: "\"testing\"", Start: ast.Position{ Column: 8, Line: 3, }, }, }, Value: "testing", }, }}, Metadata: "parser-type=rust", Name: "show_tag_values_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "show_tag_values_test.flux", Source: "package v1_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 16, Line: 1, }, File: "show_tag_values_test.flux", Source: "v1_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "v1_test", }, }, }}, Package: "v1_test", Path: "influxdata/influxdb/v1", }}
Functions ¶
This section is empty.
Types ¶
type DatabasesOpSpec ¶ added in v0.68.0
func (*DatabasesOpSpec) Kind ¶ added in v0.68.0
func (s *DatabasesOpSpec) Kind() flux.OperationKind
type DatabasesProcedureSpec ¶ added in v0.68.0
type DatabasesProcedureSpec struct { plan.DefaultCost Org *influxdb.NameOrID Host *string Token *string }
func (*DatabasesProcedureSpec) Copy ¶ added in v0.68.0
func (s *DatabasesProcedureSpec) Copy() plan.ProcedureSpec
func (*DatabasesProcedureSpec) GetHost ¶ added in v0.68.0
func (s *DatabasesProcedureSpec) GetHost() *string
func (*DatabasesProcedureSpec) GetOrg ¶ added in v0.68.0
func (s *DatabasesProcedureSpec) GetOrg() *influxdb.NameOrID
func (*DatabasesProcedureSpec) GetToken ¶ added in v0.68.0
func (s *DatabasesProcedureSpec) GetToken() *string
func (*DatabasesProcedureSpec) Kind ¶ added in v0.68.0
func (s *DatabasesProcedureSpec) Kind() plan.ProcedureKind
func (*DatabasesProcedureSpec) PostPhysicalValidate ¶ added in v0.68.0
func (s *DatabasesProcedureSpec) PostPhysicalValidate(id plan.NodeID) error
func (*DatabasesProcedureSpec) SetHost ¶ added in v0.68.0
func (s *DatabasesProcedureSpec) SetHost(host *string)
func (*DatabasesProcedureSpec) SetOrg ¶ added in v0.68.0
func (s *DatabasesProcedureSpec) SetOrg(org *influxdb.NameOrID)
func (*DatabasesProcedureSpec) SetToken ¶ added in v0.68.0
func (s *DatabasesProcedureSpec) SetToken(token *string)
type DatabasesRemoteProcedureSpec ¶ added in v0.68.0
type DatabasesRemoteProcedureSpec struct { plan.DefaultCost *DatabasesProcedureSpec }
func (*DatabasesRemoteProcedureSpec) BuildQuery ¶ added in v0.68.0
func (s *DatabasesRemoteProcedureSpec) BuildQuery() *ast.File
func (*DatabasesRemoteProcedureSpec) Copy ¶ added in v0.68.0
func (s *DatabasesRemoteProcedureSpec) Copy() plan.ProcedureSpec
func (*DatabasesRemoteProcedureSpec) Kind ¶ added in v0.68.0
func (s *DatabasesRemoteProcedureSpec) Kind() plan.ProcedureKind
func (*DatabasesRemoteProcedureSpec) PostPhysicalValidate ¶ added in v0.68.0
func (s *DatabasesRemoteProcedureSpec) PostPhysicalValidate(id plan.NodeID) error
type DatabasesRemoteRule ¶ added in v0.68.0
type DatabasesRemoteRule struct{}
func (DatabasesRemoteRule) Name ¶ added in v0.68.0
func (p DatabasesRemoteRule) Name() string
func (DatabasesRemoteRule) Pattern ¶ added in v0.68.0
func (p DatabasesRemoteRule) Pattern() plan.Pattern
type FromInfluxJSONOpSpec ¶
FromInfluxJSONOpSpec defines the `fromInfluxJSON` function signature
func (*FromInfluxJSONOpSpec) Kind ¶
func (s *FromInfluxJSONOpSpec) Kind() flux.OperationKind
type FromInfluxJSONProcedureSpec ¶
type FromInfluxJSONProcedureSpec struct { plan.DefaultCost JSON string File string }
FromInfluxJSONProcedureSpec describes the `fromInfluxJSON` prodecure
func (*FromInfluxJSONProcedureSpec) Copy ¶
func (s *FromInfluxJSONProcedureSpec) Copy() plan.ProcedureSpec
func (*FromInfluxJSONProcedureSpec) Kind ¶
func (s *FromInfluxJSONProcedureSpec) Kind() plan.ProcedureKind
type JSONSource ¶
type JSONSource struct {
// contains filtered or unexported fields
}
func (*JSONSource) AddTransformation ¶
func (c *JSONSource) AddTransformation(t execute.Transformation)
func (*JSONSource) Run ¶
func (c *JSONSource) Run(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.