Documentation ¶
Index ¶
Constants ¶
View Source
const LinearInterpolateKind = "linearInterpolateKind"
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: 104, Line: 60, }, File: "interpolate_test.flux", Source: "package interpolate_test\n\nimport \"testing\"\nimport \"interpolate\"\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,double\n#group,false,false,false,true,true,false\n#default,_result,,,,,\n,result,table,_time,_measurement,_field,_value\n,,0,2014-01-01T01:00:00Z,_m,FF,0\n,,0,2014-01-01T01:02:00Z,_m,FF,2\n,,0,2014-01-01T01:04:00Z,_m,FF,4\n,,0,2014-01-01T01:06:00Z,_m,FF,6\n,,0,2014-01-01T01:08:00Z,_m,FF,8\n,,0,2014-01-01T01:10:00Z,_m,FF,10\n,,1,2014-01-01T01:01:00Z,_m,QQ,11\n,,1,2014-01-01T01:03:00Z,_m,QQ,9\n,,1,2014-01-01T01:05:00Z,_m,QQ,7\n,,1,2014-01-01T01:07:00Z,_m,QQ,5\n,,1,2014-01-01T01:09:00Z,_m,QQ,3\n,,1,2014-01-01T01:11:00Z,_m,QQ,1\n\"\n\noutData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,double\n#group,false,false,false,true,true,false\n#default,_result,,,,,\n,result,table,_time,_measurement,_field,_value\n,,0,2014-01-01T01:00:00Z,_m,FF,0\n,,0,2014-01-01T01:01:00Z,_m,FF,1\n,,0,2014-01-01T01:02:00Z,_m,FF,2\n,,0,2014-01-01T01:03:00Z,_m,FF,3\n,,0,2014-01-01T01:04:00Z,_m,FF,4\n,,0,2014-01-01T01:05:00Z,_m,FF,5\n,,0,2014-01-01T01:06:00Z,_m,FF,6\n,,0,2014-01-01T01:07:00Z,_m,FF,7\n,,0,2014-01-01T01:08:00Z,_m,FF,8\n,,0,2014-01-01T01:09:00Z,_m,FF,9\n,,0,2014-01-01T01:10:00Z,_m,FF,10\n,,1,2014-01-01T01:01:00Z,_m,QQ,11\n,,1,2014-01-01T01:02:00Z,_m,QQ,10\n,,1,2014-01-01T01:03:00Z,_m,QQ,9\n,,1,2014-01-01T01:04:00Z,_m,QQ,8\n,,1,2014-01-01T01:05:00Z,_m,QQ,7\n,,1,2014-01-01T01:06:00Z,_m,QQ,6\n,,1,2014-01-01T01:07:00Z,_m,QQ,5\n,,1,2014-01-01T01:08:00Z,_m,QQ,4\n,,1,2014-01-01T01:09:00Z,_m,QQ,3\n,,1,2014-01-01T01:10:00Z,_m,QQ,2\n,,1,2014-01-01T01:11:00Z,_m,QQ,1\n\"\n\ninterpolateFn = (table=<-) => table\n |> range(start: 2014-01-01T01:00:00Z, stop: 2014-01-01T02:00:00Z)\n |> interpolate.linear(every: 1m)\n |> drop(columns: [\"_start\", \"_stop\"])\n\ntest interpolate_test = () =>\n ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: interpolateFn})", 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: 23, }, File: "interpolate_test.flux", Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,double\n#group,false,false,false,true,true,false\n#default,_result,,,,,\n,result,table,_time,_measurement,_field,_value\n,,0,2014-01-01T01:00:00Z,_m,FF,0\n,,0,2014-01-01T01:02:00Z,_m,FF,2\n,,0,2014-01-01T01:04:00Z,_m,FF,4\n,,0,2014-01-01T01:06:00Z,_m,FF,6\n,,0,2014-01-01T01:08:00Z,_m,FF,8\n,,0,2014-01-01T01:10:00Z,_m,FF,10\n,,1,2014-01-01T01:01:00Z,_m,QQ,11\n,,1,2014-01-01T01:03:00Z,_m,QQ,9\n,,1,2014-01-01T01:05:00Z,_m,QQ,7\n,,1,2014-01-01T01:07:00Z,_m,QQ,5\n,,1,2014-01-01T01:09:00Z,_m,QQ,3\n,,1,2014-01-01T01:11:00Z,_m,QQ,1\n\"", Start: ast.Position{ Column: 1, Line: 6, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 7, Line: 6, }, File: "interpolate_test.flux", Source: "inData", Start: ast.Position{ Column: 1, Line: 6, }, }, }, Name: "inData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 23, }, File: "interpolate_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,double\n#group,false,false,false,true,true,false\n#default,_result,,,,,\n,result,table,_time,_measurement,_field,_value\n,,0,2014-01-01T01:00:00Z,_m,FF,0\n,,0,2014-01-01T01:02:00Z,_m,FF,2\n,,0,2014-01-01T01:04:00Z,_m,FF,4\n,,0,2014-01-01T01:06:00Z,_m,FF,6\n,,0,2014-01-01T01:08:00Z,_m,FF,8\n,,0,2014-01-01T01:10:00Z,_m,FF,10\n,,1,2014-01-01T01:01:00Z,_m,QQ,11\n,,1,2014-01-01T01:03:00Z,_m,QQ,9\n,,1,2014-01-01T01:05:00Z,_m,QQ,7\n,,1,2014-01-01T01:07:00Z,_m,QQ,5\n,,1,2014-01-01T01:09:00Z,_m,QQ,3\n,,1,2014-01-01T01:11:00Z,_m,QQ,1\n\"", Start: ast.Position{ Column: 10, Line: 6, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,double\n#group,false,false,false,true,true,false\n#default,_result,,,,,\n,result,table,_time,_measurement,_field,_value\n,,0,2014-01-01T01:00:00Z,_m,FF,0\n,,0,2014-01-01T01:02:00Z,_m,FF,2\n,,0,2014-01-01T01:04:00Z,_m,FF,4\n,,0,2014-01-01T01:06:00Z,_m,FF,6\n,,0,2014-01-01T01:08:00Z,_m,FF,8\n,,0,2014-01-01T01:10:00Z,_m,FF,10\n,,1,2014-01-01T01:01:00Z,_m,QQ,11\n,,1,2014-01-01T01:03:00Z,_m,QQ,9\n,,1,2014-01-01T01:05:00Z,_m,QQ,7\n,,1,2014-01-01T01:07:00Z,_m,QQ,5\n,,1,2014-01-01T01:09:00Z,_m,QQ,3\n,,1,2014-01-01T01:11:00Z,_m,QQ,1\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 52, }, File: "interpolate_test.flux", Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,string,string,double\n#group,false,false,false,true,true,false\n#default,_result,,,,,\n,result,table,_time,_measurement,_field,_value\n,,0,2014-01-01T01:00:00Z,_m,FF,0\n,,0,2014-01-01T01:01:00Z,_m,FF,1\n,,0,2014-01-01T01:02:00Z,_m,FF,2\n,,0,2014-01-01T01:03:00Z,_m,FF,3\n,,0,2014-01-01T01:04:00Z,_m,FF,4\n,,0,2014-01-01T01:05:00Z,_m,FF,5\n,,0,2014-01-01T01:06:00Z,_m,FF,6\n,,0,2014-01-01T01:07:00Z,_m,FF,7\n,,0,2014-01-01T01:08:00Z,_m,FF,8\n,,0,2014-01-01T01:09:00Z,_m,FF,9\n,,0,2014-01-01T01:10:00Z,_m,FF,10\n,,1,2014-01-01T01:01:00Z,_m,QQ,11\n,,1,2014-01-01T01:02:00Z,_m,QQ,10\n,,1,2014-01-01T01:03:00Z,_m,QQ,9\n,,1,2014-01-01T01:04:00Z,_m,QQ,8\n,,1,2014-01-01T01:05:00Z,_m,QQ,7\n,,1,2014-01-01T01:06:00Z,_m,QQ,6\n,,1,2014-01-01T01:07:00Z,_m,QQ,5\n,,1,2014-01-01T01:08:00Z,_m,QQ,4\n,,1,2014-01-01T01:09:00Z,_m,QQ,3\n,,1,2014-01-01T01:10:00Z,_m,QQ,2\n,,1,2014-01-01T01:11:00Z,_m,QQ,1\n\"", Start: ast.Position{ Column: 1, Line: 25, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 8, Line: 25, }, File: "interpolate_test.flux", Source: "outData", Start: ast.Position{ Column: 1, Line: 25, }, }, }, Name: "outData", }, Init: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 2, Line: 52, }, File: "interpolate_test.flux", Source: "\"\n#datatype,string,long,dateTime:RFC3339,string,string,double\n#group,false,false,false,true,true,false\n#default,_result,,,,,\n,result,table,_time,_measurement,_field,_value\n,,0,2014-01-01T01:00:00Z,_m,FF,0\n,,0,2014-01-01T01:01:00Z,_m,FF,1\n,,0,2014-01-01T01:02:00Z,_m,FF,2\n,,0,2014-01-01T01:03:00Z,_m,FF,3\n,,0,2014-01-01T01:04:00Z,_m,FF,4\n,,0,2014-01-01T01:05:00Z,_m,FF,5\n,,0,2014-01-01T01:06:00Z,_m,FF,6\n,,0,2014-01-01T01:07:00Z,_m,FF,7\n,,0,2014-01-01T01:08:00Z,_m,FF,8\n,,0,2014-01-01T01:09:00Z,_m,FF,9\n,,0,2014-01-01T01:10:00Z,_m,FF,10\n,,1,2014-01-01T01:01:00Z,_m,QQ,11\n,,1,2014-01-01T01:02:00Z,_m,QQ,10\n,,1,2014-01-01T01:03:00Z,_m,QQ,9\n,,1,2014-01-01T01:04:00Z,_m,QQ,8\n,,1,2014-01-01T01:05:00Z,_m,QQ,7\n,,1,2014-01-01T01:06:00Z,_m,QQ,6\n,,1,2014-01-01T01:07:00Z,_m,QQ,5\n,,1,2014-01-01T01:08:00Z,_m,QQ,4\n,,1,2014-01-01T01:09:00Z,_m,QQ,3\n,,1,2014-01-01T01:10:00Z,_m,QQ,2\n,,1,2014-01-01T01:11:00Z,_m,QQ,1\n\"", Start: ast.Position{ Column: 11, Line: 25, }, }, }, Value: "\n#datatype,string,long,dateTime:RFC3339,string,string,double\n#group,false,false,false,true,true,false\n#default,_result,,,,,\n,result,table,_time,_measurement,_field,_value\n,,0,2014-01-01T01:00:00Z,_m,FF,0\n,,0,2014-01-01T01:01:00Z,_m,FF,1\n,,0,2014-01-01T01:02:00Z,_m,FF,2\n,,0,2014-01-01T01:03:00Z,_m,FF,3\n,,0,2014-01-01T01:04:00Z,_m,FF,4\n,,0,2014-01-01T01:05:00Z,_m,FF,5\n,,0,2014-01-01T01:06:00Z,_m,FF,6\n,,0,2014-01-01T01:07:00Z,_m,FF,7\n,,0,2014-01-01T01:08:00Z,_m,FF,8\n,,0,2014-01-01T01:09:00Z,_m,FF,9\n,,0,2014-01-01T01:10:00Z,_m,FF,10\n,,1,2014-01-01T01:01:00Z,_m,QQ,11\n,,1,2014-01-01T01:02:00Z,_m,QQ,10\n,,1,2014-01-01T01:03:00Z,_m,QQ,9\n,,1,2014-01-01T01:04:00Z,_m,QQ,8\n,,1,2014-01-01T01:05:00Z,_m,QQ,7\n,,1,2014-01-01T01:06:00Z,_m,QQ,6\n,,1,2014-01-01T01:07:00Z,_m,QQ,5\n,,1,2014-01-01T01:08:00Z,_m,QQ,4\n,,1,2014-01-01T01:09:00Z,_m,QQ,3\n,,1,2014-01-01T01:10:00Z,_m,QQ,2\n,,1,2014-01-01T01:11:00Z,_m,QQ,1\n", }, }, &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 57, }, File: "interpolate_test.flux", Source: "interpolateFn = (table=<-) => table\n |> range(start: 2014-01-01T01:00:00Z, stop: 2014-01-01T02:00:00Z)\n |> interpolate.linear(every: 1m)\n |> drop(columns: [\"_start\", \"_stop\"])", Start: ast.Position{ Column: 1, Line: 54, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 14, Line: 54, }, File: "interpolate_test.flux", Source: "interpolateFn", Start: ast.Position{ Column: 1, Line: 54, }, }, }, Name: "interpolateFn", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 57, }, File: "interpolate_test.flux", Source: "(table=<-) => table\n |> range(start: 2014-01-01T01:00:00Z, stop: 2014-01-01T02:00:00Z)\n |> interpolate.linear(every: 1m)\n |> drop(columns: [\"_start\", \"_stop\"])", Start: ast.Position{ Column: 17, Line: 54, }, }, }, Body: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.PipeExpression{ Argument: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 36, Line: 54, }, File: "interpolate_test.flux", Source: "table", Start: ast.Position{ Column: 31, Line: 54, }, }, }, Name: "table", }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 55, }, File: "interpolate_test.flux", Source: "table\n |> range(start: 2014-01-01T01:00:00Z, stop: 2014-01-01T02:00:00Z)", Start: ast.Position{ Column: 31, Line: 54, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 55, }, File: "interpolate_test.flux", Source: "start: 2014-01-01T01:00:00Z, stop: 2014-01-01T02:00:00Z", Start: ast.Position{ Column: 14, Line: 55, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 55, }, File: "interpolate_test.flux", Source: "start: 2014-01-01T01:00:00Z", Start: ast.Position{ Column: 14, Line: 55, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 55, }, File: "interpolate_test.flux", Source: "start", Start: ast.Position{ Column: 14, Line: 55, }, }, }, Name: "start", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 55, }, File: "interpolate_test.flux", Source: "2014-01-01T01:00:00Z", Start: ast.Position{ Column: 21, Line: 55, }, }, }, Value: parser.MustParseTime("2014-01-01T01:00:00Z"), }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 55, }, File: "interpolate_test.flux", Source: "stop: 2014-01-01T02:00:00Z", Start: ast.Position{ Column: 43, Line: 55, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 47, Line: 55, }, File: "interpolate_test.flux", Source: "stop", Start: ast.Position{ Column: 43, Line: 55, }, }, }, Name: "stop", }, Value: &ast.DateTimeLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 55, }, File: "interpolate_test.flux", Source: "2014-01-01T02:00:00Z", Start: ast.Position{ Column: 49, Line: 55, }, }, }, Value: parser.MustParseTime("2014-01-01T02:00:00Z"), }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 70, Line: 55, }, File: "interpolate_test.flux", Source: "range(start: 2014-01-01T01:00:00Z, stop: 2014-01-01T02:00:00Z)", Start: ast.Position{ Column: 8, Line: 55, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 13, Line: 55, }, File: "interpolate_test.flux", Source: "range", Start: ast.Position{ Column: 8, Line: 55, }, }, }, Name: "range", }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 56, }, File: "interpolate_test.flux", Source: "table\n |> range(start: 2014-01-01T01:00:00Z, stop: 2014-01-01T02:00:00Z)\n |> interpolate.linear(every: 1m)", Start: ast.Position{ Column: 31, Line: 54, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 36, Line: 56, }, File: "interpolate_test.flux", Source: "every: 1m", Start: ast.Position{ Column: 27, Line: 56, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 36, Line: 56, }, File: "interpolate_test.flux", Source: "every: 1m", Start: ast.Position{ Column: 27, Line: 56, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 32, Line: 56, }, File: "interpolate_test.flux", Source: "every", Start: ast.Position{ Column: 27, Line: 56, }, }, }, Name: "every", }, Value: &ast.DurationLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 36, Line: 56, }, File: "interpolate_test.flux", Source: "1m", Start: ast.Position{ Column: 34, Line: 56, }, }, }, Values: []ast.Duration{ast.Duration{ Magnitude: int64(1), Unit: "m", }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 56, }, File: "interpolate_test.flux", Source: "interpolate.linear(every: 1m)", Start: ast.Position{ Column: 8, Line: 56, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 56, }, File: "interpolate_test.flux", Source: "interpolate.linear", Start: ast.Position{ Column: 8, Line: 56, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 19, Line: 56, }, File: "interpolate_test.flux", Source: "interpolate", Start: ast.Position{ Column: 8, Line: 56, }, }, }, Name: "interpolate", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 56, }, File: "interpolate_test.flux", Source: "linear", Start: ast.Position{ Column: 20, Line: 56, }, }, }, Name: "linear", }, }, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 57, }, File: "interpolate_test.flux", Source: "table\n |> range(start: 2014-01-01T01:00:00Z, stop: 2014-01-01T02:00:00Z)\n |> interpolate.linear(every: 1m)\n |> drop(columns: [\"_start\", \"_stop\"])", Start: ast.Position{ Column: 31, Line: 54, }, }, }, Call: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 57, }, File: "interpolate_test.flux", Source: "columns: [\"_start\", \"_stop\"]", Start: ast.Position{ Column: 13, Line: 57, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 57, }, File: "interpolate_test.flux", Source: "columns: [\"_start\", \"_stop\"]", Start: ast.Position{ Column: 13, Line: 57, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 20, Line: 57, }, File: "interpolate_test.flux", Source: "columns", Start: ast.Position{ Column: 13, Line: 57, }, }, }, Name: "columns", }, Value: &ast.ArrayExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 41, Line: 57, }, File: "interpolate_test.flux", Source: "[\"_start\", \"_stop\"]", Start: ast.Position{ Column: 22, Line: 57, }, }, }, Elements: []ast.Expression{&ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 31, Line: 57, }, File: "interpolate_test.flux", Source: "\"_start\"", Start: ast.Position{ Column: 23, Line: 57, }, }, }, Value: "_start", }, &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 40, Line: 57, }, File: "interpolate_test.flux", Source: "\"_stop\"", Start: ast.Position{ Column: 33, Line: 57, }, }, }, Value: "_stop", }}, }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 42, Line: 57, }, File: "interpolate_test.flux", Source: "drop(columns: [\"_start\", \"_stop\"])", Start: ast.Position{ Column: 8, Line: 57, }, }, }, Callee: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 57, }, File: "interpolate_test.flux", Source: "drop", Start: ast.Position{ Column: 8, Line: 57, }, }, }, Name: "drop", }, }, }, Params: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 54, }, File: "interpolate_test.flux", Source: "table=<-", Start: ast.Position{ Column: 18, Line: 54, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 23, Line: 54, }, File: "interpolate_test.flux", Source: "table", Start: ast.Position{ Column: 18, Line: 54, }, }, }, Name: "table", }, Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 26, Line: 54, }, File: "interpolate_test.flux", Source: "<-", Start: ast.Position{ Column: 24, Line: 54, }, }, }}, }}, }, }, &ast.TestStatement{ Assignment: &ast.VariableAssignment{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 104, Line: 60, }, File: "interpolate_test.flux", Source: "interpolate_test = () =>\n ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: interpolateFn})", Start: ast.Position{ Column: 6, Line: 59, }, }, }, ID: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 22, Line: 59, }, File: "interpolate_test.flux", Source: "interpolate_test", Start: ast.Position{ Column: 6, Line: 59, }, }, }, Name: "interpolate_test", }, Init: &ast.FunctionExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 104, Line: 60, }, File: "interpolate_test.flux", Source: "() =>\n ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: interpolateFn})", Start: ast.Position{ Column: 25, Line: 59, }, }, }, Body: &ast.ParenExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 104, Line: 60, }, File: "interpolate_test.flux", Source: "({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: interpolateFn})", Start: ast.Position{ Column: 5, Line: 60, }, }, }, Expression: &ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 103, Line: 60, }, File: "interpolate_test.flux", Source: "{input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: interpolateFn}", Start: ast.Position{ Column: 6, Line: 60, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 46, Line: 60, }, File: "interpolate_test.flux", Source: "input: testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 7, Line: 60, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 12, Line: 60, }, File: "interpolate_test.flux", Source: "input", Start: ast.Position{ Column: 7, Line: 60, }, }, }, Name: "input", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 60, }, File: "interpolate_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 34, Line: 60, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 60, }, File: "interpolate_test.flux", Source: "csv: inData", Start: ast.Position{ Column: 34, Line: 60, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 37, Line: 60, }, File: "interpolate_test.flux", Source: "csv", Start: ast.Position{ Column: 34, Line: 60, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 45, Line: 60, }, File: "interpolate_test.flux", Source: "inData", Start: ast.Position{ Column: 39, Line: 60, }, }, }, Name: "inData", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 46, Line: 60, }, File: "interpolate_test.flux", Source: "testing.loadStorage(csv: inData)", Start: ast.Position{ Column: 14, Line: 60, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 60, }, File: "interpolate_test.flux", Source: "testing.loadStorage", Start: ast.Position{ Column: 14, Line: 60, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 60, }, File: "interpolate_test.flux", Source: "testing", Start: ast.Position{ Column: 14, Line: 60, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 33, Line: 60, }, File: "interpolate_test.flux", Source: "loadStorage", Start: ast.Position{ Column: 22, Line: 60, }, }, }, Name: "loadStorage", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 83, Line: 60, }, File: "interpolate_test.flux", Source: "want: testing.loadMem(csv: outData)", Start: ast.Position{ Column: 48, Line: 60, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 52, Line: 60, }, File: "interpolate_test.flux", Source: "want", Start: ast.Position{ Column: 48, Line: 60, }, }, }, Name: "want", }, Value: &ast.CallExpression{ Arguments: []ast.Expression{&ast.ObjectExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 82, Line: 60, }, File: "interpolate_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 70, Line: 60, }, }, }, Properties: []*ast.Property{&ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 82, Line: 60, }, File: "interpolate_test.flux", Source: "csv: outData", Start: ast.Position{ Column: 70, Line: 60, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 73, Line: 60, }, File: "interpolate_test.flux", Source: "csv", Start: ast.Position{ Column: 70, Line: 60, }, }, }, Name: "csv", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 82, Line: 60, }, File: "interpolate_test.flux", Source: "outData", Start: ast.Position{ Column: 75, Line: 60, }, }, }, Name: "outData", }, }}, With: nil, }}, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 83, Line: 60, }, File: "interpolate_test.flux", Source: "testing.loadMem(csv: outData)", Start: ast.Position{ Column: 54, Line: 60, }, }, }, Callee: &ast.MemberExpression{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 60, }, File: "interpolate_test.flux", Source: "testing.loadMem", Start: ast.Position{ Column: 54, Line: 60, }, }, }, Object: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 61, Line: 60, }, File: "interpolate_test.flux", Source: "testing", Start: ast.Position{ Column: 54, Line: 60, }, }, }, Name: "testing", }, Property: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 69, Line: 60, }, File: "interpolate_test.flux", Source: "loadMem", Start: ast.Position{ Column: 62, Line: 60, }, }, }, Name: "loadMem", }, }, }, }, &ast.Property{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 102, Line: 60, }, File: "interpolate_test.flux", Source: "fn: interpolateFn", Start: ast.Position{ Column: 85, Line: 60, }, }, }, Key: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 87, Line: 60, }, File: "interpolate_test.flux", Source: "fn", Start: ast.Position{ Column: 85, Line: 60, }, }, }, Name: "fn", }, Value: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 102, Line: 60, }, File: "interpolate_test.flux", Source: "interpolateFn", Start: ast.Position{ Column: 89, Line: 60, }, }, }, Name: "interpolateFn", }, }}, With: nil, }, }, Params: []*ast.Property{}, }, }, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 104, Line: 60, }, File: "interpolate_test.flux", Source: "test interpolate_test = () =>\n ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: interpolateFn})", Start: ast.Position{ Column: 1, Line: 59, }, }, }, }}, Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{ As: nil, BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 17, Line: 3, }, File: "interpolate_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: "interpolate_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: 21, Line: 4, }, File: "interpolate_test.flux", Source: "import \"interpolate\"", Start: ast.Position{ Column: 1, Line: 4, }, }, }, Path: &ast.StringLiteral{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 21, Line: 4, }, File: "interpolate_test.flux", Source: "\"interpolate\"", Start: ast.Position{ Column: 8, Line: 4, }, }, }, Value: "interpolate", }, }}, Metadata: "parser-type=rust", Name: "interpolate_test.flux", Package: &ast.PackageClause{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 25, Line: 1, }, File: "interpolate_test.flux", Source: "package interpolate_test", Start: ast.Position{ Column: 1, Line: 1, }, }, }, Name: &ast.Identifier{ BaseNode: ast.BaseNode{ Errors: nil, Loc: &ast.SourceLocation{ End: ast.Position{ Column: 25, Line: 1, }, File: "interpolate_test.flux", Source: "interpolate_test", Start: ast.Position{ Column: 9, Line: 1, }, }, }, Name: "interpolate_test", }, }, }}, Package: "interpolate_test", Path: "interpolate", }}
Functions ¶
func NewInterpolateTransformation ¶
func NewInterpolateTransformation(d execute.Dataset, cache execute.TableBuilderCache, spec *LinearInterpolateProcedureSpec) *interpolateTransformation
Types ¶
type LinearInterpolateOpSpec ¶
func (*LinearInterpolateOpSpec) Kind ¶
func (s *LinearInterpolateOpSpec) Kind() flux.OperationKind
type LinearInterpolateProcedureSpec ¶
type LinearInterpolateProcedureSpec struct { plan.DefaultCost Every flux.Duration `json:"every"` }
func (*LinearInterpolateProcedureSpec) Copy ¶
func (s *LinearInterpolateProcedureSpec) Copy() plan.ProcedureSpec
func (*LinearInterpolateProcedureSpec) Kind ¶
func (s *LinearInterpolateProcedureSpec) Kind() plan.ProcedureKind
func (*LinearInterpolateProcedureSpec) TriggerSpec ¶
func (s *LinearInterpolateProcedureSpec) TriggerSpec() plan.TriggerSpec
TriggerSpec implements plan.TriggerAwareProcedureSpec
Click to show internal directories.
Click to hide internal directories.