aggregate

package
v0.103.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const TableKind = pkgpath + ".table"
View Source
const WindowKind = pkgpath + ".window"

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: 3,
					Line:   50,
				},
				File:   "table_test.flux",
				Source: "package aggregate_test\n\nimport \"testing\"\nimport \"contrib/jsternberg/aggregate\"\n\noption now = () => (2030-01-01T00:00:00Z)\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T00:00:00Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:10Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:20Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:30Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:40Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:50Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,1,2018-05-22T00:00:00Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:10Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:20Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:30Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:40Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:50Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n\"\n\noutData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,double,double,double,double,long\n#group,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false\n#default,_result,,,,,,,,,,,,,,\n,result,table,_start,_stop,_field,_measurement,device,fstype,host,path,sum,mean,min,max,count\n,,0,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/,210,35,30,40,6\n,,1,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/tmp,240,40,35,45,6\n\"\n\naggregate_table = (table=<-) => table\n\t|> range(start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z)\n\t|> aggregate.table(columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t})\n\ntest _aggregate_table = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: aggregate_table,\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: 42,
							Line:   6,
						},
						File:   "table_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:   "table_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:   "table_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:   "table_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:   "table_test.flux",
									Source: "2030-01-01T00:00:00Z",
									Start: ast.Position{
										Column: 21,
										Line:   6,
									},
								},
							},
							Value: parser.MustParseTime("2030-01-01T00:00:00Z"),
						},
					},
					Params: []*ast.Property{},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 42,
						Line:   6,
					},
					File:   "table_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:   25,
					},
					File:   "table_test.flux",
					Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T00:00:00Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:10Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:20Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:30Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:40Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:50Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,1,2018-05-22T00:00:00Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:10Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:20Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:30Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:40Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:50Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\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:   "table_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:   25,
						},
						File:   "table_test.flux",
						Source: "\"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T00:00:00Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:10Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:20Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:30Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:40Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:50Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,1,2018-05-22T00:00:00Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:10Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:20Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:30Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:40Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:50Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n\"",
						Start: ast.Position{
							Column: 10,
							Line:   8,
						},
					},
				},
				Value: "\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T00:00:00Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:10Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:20Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:30Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:40Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:50Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,1,2018-05-22T00:00:00Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:10Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:20Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:30Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:40Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:50Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   34,
					},
					File:   "table_test.flux",
					Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,double,double,double,double,long\n#group,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false\n#default,_result,,,,,,,,,,,,,,\n,result,table,_start,_stop,_field,_measurement,device,fstype,host,path,sum,mean,min,max,count\n,,0,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/,210,35,30,40,6\n,,1,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/tmp,240,40,35,45,6\n\"",
					Start: ast.Position{
						Column: 1,
						Line:   27,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 8,
							Line:   27,
						},
						File:   "table_test.flux",
						Source: "outData",
						Start: ast.Position{
							Column: 1,
							Line:   27,
						},
					},
				},
				Name: "outData",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   34,
						},
						File:   "table_test.flux",
						Source: "\"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,double,double,double,double,long\n#group,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false\n#default,_result,,,,,,,,,,,,,,\n,result,table,_start,_stop,_field,_measurement,device,fstype,host,path,sum,mean,min,max,count\n,,0,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/,210,35,30,40,6\n,,1,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/tmp,240,40,35,45,6\n\"",
						Start: ast.Position{
							Column: 11,
							Line:   27,
						},
					},
				},
				Value: "\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,double,double,double,double,long\n#group,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false\n#default,_result,,,,,,,,,,,,,,\n,result,table,_start,_stop,_field,_measurement,device,fstype,host,path,sum,mean,min,max,count\n,,0,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/,210,35,30,40,6\n,,1,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/tmp,240,40,35,45,6\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 4,
						Line:   44,
					},
					File:   "table_test.flux",
					Source: "aggregate_table = (table=<-) => table\n\t|> range(start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z)\n\t|> aggregate.table(columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t})",
					Start: ast.Position{
						Column: 1,
						Line:   36,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 16,
							Line:   36,
						},
						File:   "table_test.flux",
						Source: "aggregate_table",
						Start: ast.Position{
							Column: 1,
							Line:   36,
						},
					},
				},
				Name: "aggregate_table",
			},
			Init: &ast.FunctionExpression{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 4,
							Line:   44,
						},
						File:   "table_test.flux",
						Source: "(table=<-) => table\n\t|> range(start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z)\n\t|> aggregate.table(columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t})",
						Start: ast.Position{
							Column: 19,
							Line:   36,
						},
					},
				},
				Body: &ast.PipeExpression{
					Argument: &ast.PipeExpression{
						Argument: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 38,
										Line:   36,
									},
									File:   "table_test.flux",
									Source: "table",
									Start: ast.Position{
										Column: 33,
										Line:   36,
									},
								},
							},
							Name: "table",
						},
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 67,
									Line:   37,
								},
								File:   "table_test.flux",
								Source: "table\n\t|> range(start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z)",
								Start: ast.Position{
									Column: 33,
									Line:   36,
								},
							},
						},
						Call: &ast.CallExpression{
							Arguments: []ast.Expression{&ast.ObjectExpression{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 66,
											Line:   37,
										},
										File:   "table_test.flux",
										Source: "start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z",
										Start: ast.Position{
											Column: 11,
											Line:   37,
										},
									},
								},
								Properties: []*ast.Property{&ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 38,
												Line:   37,
											},
											File:   "table_test.flux",
											Source: "start: 2018-05-22T00:00:00Z",
											Start: ast.Position{
												Column: 11,
												Line:   37,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 16,
													Line:   37,
												},
												File:   "table_test.flux",
												Source: "start",
												Start: ast.Position{
													Column: 11,
													Line:   37,
												},
											},
										},
										Name: "start",
									},
									Value: &ast.DateTimeLiteral{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 38,
													Line:   37,
												},
												File:   "table_test.flux",
												Source: "2018-05-22T00:00:00Z",
												Start: ast.Position{
													Column: 18,
													Line:   37,
												},
											},
										},
										Value: parser.MustParseTime("2018-05-22T00:00:00Z"),
									},
								}, &ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 66,
												Line:   37,
											},
											File:   "table_test.flux",
											Source: "stop: 2018-05-22T00:01:00Z",
											Start: ast.Position{
												Column: 40,
												Line:   37,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 44,
													Line:   37,
												},
												File:   "table_test.flux",
												Source: "stop",
												Start: ast.Position{
													Column: 40,
													Line:   37,
												},
											},
										},
										Name: "stop",
									},
									Value: &ast.DateTimeLiteral{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 66,
													Line:   37,
												},
												File:   "table_test.flux",
												Source: "2018-05-22T00:01:00Z",
												Start: ast.Position{
													Column: 46,
													Line:   37,
												},
											},
										},
										Value: parser.MustParseTime("2018-05-22T00:01:00Z"),
									},
								}},
								With: nil,
							}},
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 67,
										Line:   37,
									},
									File:   "table_test.flux",
									Source: "range(start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z)",
									Start: ast.Position{
										Column: 5,
										Line:   37,
									},
								},
							},
							Callee: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 10,
											Line:   37,
										},
										File:   "table_test.flux",
										Source: "range",
										Start: ast.Position{
											Column: 5,
											Line:   37,
										},
									},
								},
								Name: "range",
							},
						},
					},
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 4,
								Line:   44,
							},
							File:   "table_test.flux",
							Source: "table\n\t|> range(start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z)\n\t|> aggregate.table(columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t})",
							Start: ast.Position{
								Column: 33,
								Line:   36,
							},
						},
					},
					Call: &ast.CallExpression{
						Arguments: []ast.Expression{&ast.ObjectExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 3,
										Line:   44,
									},
									File:   "table_test.flux",
									Source: "columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t}",
									Start: ast.Position{
										Column: 21,
										Line:   38,
									},
								},
							},
							Properties: []*ast.Property{&ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 3,
											Line:   44,
										},
										File:   "table_test.flux",
										Source: "columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t}",
										Start: ast.Position{
											Column: 21,
											Line:   38,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 28,
												Line:   38,
											},
											File:   "table_test.flux",
											Source: "columns",
											Start: ast.Position{
												Column: 21,
												Line:   38,
											},
										},
									},
									Name: "columns",
								},
								Value: &ast.ObjectExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 3,
												Line:   44,
											},
											File:   "table_test.flux",
											Source: "{\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t}",
											Start: ast.Position{
												Column: 30,
												Line:   38,
											},
										},
									},
									Properties: []*ast.Property{&ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 23,
													Line:   39,
												},
												File:   "table_test.flux",
												Source: "sum: aggregate.sum()",
												Start: ast.Position{
													Column: 3,
													Line:   39,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 6,
														Line:   39,
													},
													File:   "table_test.flux",
													Source: "sum",
													Start: ast.Position{
														Column: 3,
														Line:   39,
													},
												},
											},
											Name: "sum",
										},
										Value: &ast.CallExpression{
											Arguments: nil,
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 23,
														Line:   39,
													},
													File:   "table_test.flux",
													Source: "aggregate.sum()",
													Start: ast.Position{
														Column: 8,
														Line:   39,
													},
												},
											},
											Callee: &ast.MemberExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 21,
															Line:   39,
														},
														File:   "table_test.flux",
														Source: "aggregate.sum",
														Start: ast.Position{
															Column: 8,
															Line:   39,
														},
													},
												},
												Object: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 17,
																Line:   39,
															},
															File:   "table_test.flux",
															Source: "aggregate",
															Start: ast.Position{
																Column: 8,
																Line:   39,
															},
														},
													},
													Name: "aggregate",
												},
												Property: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 21,
																Line:   39,
															},
															File:   "table_test.flux",
															Source: "sum",
															Start: ast.Position{
																Column: 18,
																Line:   39,
															},
														},
													},
													Name: "sum",
												},
											},
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 25,
													Line:   40,
												},
												File:   "table_test.flux",
												Source: "mean: aggregate.mean()",
												Start: ast.Position{
													Column: 3,
													Line:   40,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 7,
														Line:   40,
													},
													File:   "table_test.flux",
													Source: "mean",
													Start: ast.Position{
														Column: 3,
														Line:   40,
													},
												},
											},
											Name: "mean",
										},
										Value: &ast.CallExpression{
											Arguments: nil,
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 25,
														Line:   40,
													},
													File:   "table_test.flux",
													Source: "aggregate.mean()",
													Start: ast.Position{
														Column: 9,
														Line:   40,
													},
												},
											},
											Callee: &ast.MemberExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 23,
															Line:   40,
														},
														File:   "table_test.flux",
														Source: "aggregate.mean",
														Start: ast.Position{
															Column: 9,
															Line:   40,
														},
													},
												},
												Object: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 18,
																Line:   40,
															},
															File:   "table_test.flux",
															Source: "aggregate",
															Start: ast.Position{
																Column: 9,
																Line:   40,
															},
														},
													},
													Name: "aggregate",
												},
												Property: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 23,
																Line:   40,
															},
															File:   "table_test.flux",
															Source: "mean",
															Start: ast.Position{
																Column: 19,
																Line:   40,
															},
														},
													},
													Name: "mean",
												},
											},
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 23,
													Line:   41,
												},
												File:   "table_test.flux",
												Source: "min: aggregate.min()",
												Start: ast.Position{
													Column: 3,
													Line:   41,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 6,
														Line:   41,
													},
													File:   "table_test.flux",
													Source: "min",
													Start: ast.Position{
														Column: 3,
														Line:   41,
													},
												},
											},
											Name: "min",
										},
										Value: &ast.CallExpression{
											Arguments: nil,
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 23,
														Line:   41,
													},
													File:   "table_test.flux",
													Source: "aggregate.min()",
													Start: ast.Position{
														Column: 8,
														Line:   41,
													},
												},
											},
											Callee: &ast.MemberExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 21,
															Line:   41,
														},
														File:   "table_test.flux",
														Source: "aggregate.min",
														Start: ast.Position{
															Column: 8,
															Line:   41,
														},
													},
												},
												Object: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 17,
																Line:   41,
															},
															File:   "table_test.flux",
															Source: "aggregate",
															Start: ast.Position{
																Column: 8,
																Line:   41,
															},
														},
													},
													Name: "aggregate",
												},
												Property: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 21,
																Line:   41,
															},
															File:   "table_test.flux",
															Source: "min",
															Start: ast.Position{
																Column: 18,
																Line:   41,
															},
														},
													},
													Name: "min",
												},
											},
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 23,
													Line:   42,
												},
												File:   "table_test.flux",
												Source: "max: aggregate.max()",
												Start: ast.Position{
													Column: 3,
													Line:   42,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 6,
														Line:   42,
													},
													File:   "table_test.flux",
													Source: "max",
													Start: ast.Position{
														Column: 3,
														Line:   42,
													},
												},
											},
											Name: "max",
										},
										Value: &ast.CallExpression{
											Arguments: nil,
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 23,
														Line:   42,
													},
													File:   "table_test.flux",
													Source: "aggregate.max()",
													Start: ast.Position{
														Column: 8,
														Line:   42,
													},
												},
											},
											Callee: &ast.MemberExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 21,
															Line:   42,
														},
														File:   "table_test.flux",
														Source: "aggregate.max",
														Start: ast.Position{
															Column: 8,
															Line:   42,
														},
													},
												},
												Object: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 17,
																Line:   42,
															},
															File:   "table_test.flux",
															Source: "aggregate",
															Start: ast.Position{
																Column: 8,
																Line:   42,
															},
														},
													},
													Name: "aggregate",
												},
												Property: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 21,
																Line:   42,
															},
															File:   "table_test.flux",
															Source: "max",
															Start: ast.Position{
																Column: 18,
																Line:   42,
															},
														},
													},
													Name: "max",
												},
											},
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 27,
													Line:   43,
												},
												File:   "table_test.flux",
												Source: "count: aggregate.count()",
												Start: ast.Position{
													Column: 3,
													Line:   43,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 8,
														Line:   43,
													},
													File:   "table_test.flux",
													Source: "count",
													Start: ast.Position{
														Column: 3,
														Line:   43,
													},
												},
											},
											Name: "count",
										},
										Value: &ast.CallExpression{
											Arguments: nil,
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 27,
														Line:   43,
													},
													File:   "table_test.flux",
													Source: "aggregate.count()",
													Start: ast.Position{
														Column: 10,
														Line:   43,
													},
												},
											},
											Callee: &ast.MemberExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 25,
															Line:   43,
														},
														File:   "table_test.flux",
														Source: "aggregate.count",
														Start: ast.Position{
															Column: 10,
															Line:   43,
														},
													},
												},
												Object: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 19,
																Line:   43,
															},
															File:   "table_test.flux",
															Source: "aggregate",
															Start: ast.Position{
																Column: 10,
																Line:   43,
															},
														},
													},
													Name: "aggregate",
												},
												Property: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 25,
																Line:   43,
															},
															File:   "table_test.flux",
															Source: "count",
															Start: ast.Position{
																Column: 20,
																Line:   43,
															},
														},
													},
													Name: "count",
												},
											},
										},
									}},
									With: nil,
								},
							}},
							With: nil,
						}},
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 4,
									Line:   44,
								},
								File:   "table_test.flux",
								Source: "aggregate.table(columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t})",
								Start: ast.Position{
									Column: 5,
									Line:   38,
								},
							},
						},
						Callee: &ast.MemberExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 20,
										Line:   38,
									},
									File:   "table_test.flux",
									Source: "aggregate.table",
									Start: ast.Position{
										Column: 5,
										Line:   38,
									},
								},
							},
							Object: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 14,
											Line:   38,
										},
										File:   "table_test.flux",
										Source: "aggregate",
										Start: ast.Position{
											Column: 5,
											Line:   38,
										},
									},
								},
								Name: "aggregate",
							},
							Property: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 20,
											Line:   38,
										},
										File:   "table_test.flux",
										Source: "table",
										Start: ast.Position{
											Column: 15,
											Line:   38,
										},
									},
								},
								Name: "table",
							},
						},
					},
				},
				Params: []*ast.Property{&ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 28,
								Line:   36,
							},
							File:   "table_test.flux",
							Source: "table=<-",
							Start: ast.Position{
								Column: 20,
								Line:   36,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 25,
									Line:   36,
								},
								File:   "table_test.flux",
								Source: "table",
								Start: ast.Position{
									Column: 20,
									Line:   36,
								},
							},
						},
						Name: "table",
					},
					Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 28,
								Line:   36,
							},
							File:   "table_test.flux",
							Source: "<-",
							Start: ast.Position{
								Column: 26,
								Line:   36,
							},
						},
					}},
				}},
			},
		}, &ast.TestStatement{
			Assignment: &ast.VariableAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 3,
							Line:   50,
						},
						File:   "table_test.flux",
						Source: "_aggregate_table = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: aggregate_table,\n})",
						Start: ast.Position{
							Column: 6,
							Line:   46,
						},
					},
				},
				ID: &ast.Identifier{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 22,
								Line:   46,
							},
							File:   "table_test.flux",
							Source: "_aggregate_table",
							Start: ast.Position{
								Column: 6,
								Line:   46,
							},
						},
					},
					Name: "_aggregate_table",
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 3,
								Line:   50,
							},
							File:   "table_test.flux",
							Source: "() => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: aggregate_table,\n})",
							Start: ast.Position{
								Column: 25,
								Line:   46,
							},
						},
					},
					Body: &ast.ParenExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 3,
									Line:   50,
								},
								File:   "table_test.flux",
								Source: "({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: aggregate_table,\n})",
								Start: ast.Position{
									Column: 31,
									Line:   46,
								},
							},
						},
						Expression: &ast.ObjectExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 2,
										Line:   50,
									},
									File:   "table_test.flux",
									Source: "{\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: aggregate_table,\n}",
									Start: ast.Position{
										Column: 32,
										Line:   46,
									},
								},
							},
							Properties: []*ast.Property{&ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 41,
											Line:   47,
										},
										File:   "table_test.flux",
										Source: "input: testing.loadStorage(csv: inData)",
										Start: ast.Position{
											Column: 2,
											Line:   47,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 7,
												Line:   47,
											},
											File:   "table_test.flux",
											Source: "input",
											Start: ast.Position{
												Column: 2,
												Line:   47,
											},
										},
									},
									Name: "input",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 40,
													Line:   47,
												},
												File:   "table_test.flux",
												Source: "csv: inData",
												Start: ast.Position{
													Column: 29,
													Line:   47,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 40,
														Line:   47,
													},
													File:   "table_test.flux",
													Source: "csv: inData",
													Start: ast.Position{
														Column: 29,
														Line:   47,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 32,
															Line:   47,
														},
														File:   "table_test.flux",
														Source: "csv",
														Start: ast.Position{
															Column: 29,
															Line:   47,
														},
													},
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 40,
															Line:   47,
														},
														File:   "table_test.flux",
														Source: "inData",
														Start: ast.Position{
															Column: 34,
															Line:   47,
														},
													},
												},
												Name: "inData",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 41,
												Line:   47,
											},
											File:   "table_test.flux",
											Source: "testing.loadStorage(csv: inData)",
											Start: ast.Position{
												Column: 9,
												Line:   47,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 28,
													Line:   47,
												},
												File:   "table_test.flux",
												Source: "testing.loadStorage",
												Start: ast.Position{
													Column: 9,
													Line:   47,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 16,
														Line:   47,
													},
													File:   "table_test.flux",
													Source: "testing",
													Start: ast.Position{
														Column: 9,
														Line:   47,
													},
												},
											},
											Name: "testing",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 28,
														Line:   47,
													},
													File:   "table_test.flux",
													Source: "loadStorage",
													Start: ast.Position{
														Column: 17,
														Line:   47,
													},
												},
											},
											Name: "loadStorage",
										},
									},
								},
							}, &ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 37,
											Line:   48,
										},
										File:   "table_test.flux",
										Source: "want: testing.loadMem(csv: outData)",
										Start: ast.Position{
											Column: 2,
											Line:   48,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 6,
												Line:   48,
											},
											File:   "table_test.flux",
											Source: "want",
											Start: ast.Position{
												Column: 2,
												Line:   48,
											},
										},
									},
									Name: "want",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 36,
													Line:   48,
												},
												File:   "table_test.flux",
												Source: "csv: outData",
												Start: ast.Position{
													Column: 24,
													Line:   48,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 36,
														Line:   48,
													},
													File:   "table_test.flux",
													Source: "csv: outData",
													Start: ast.Position{
														Column: 24,
														Line:   48,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 27,
															Line:   48,
														},
														File:   "table_test.flux",
														Source: "csv",
														Start: ast.Position{
															Column: 24,
															Line:   48,
														},
													},
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 36,
															Line:   48,
														},
														File:   "table_test.flux",
														Source: "outData",
														Start: ast.Position{
															Column: 29,
															Line:   48,
														},
													},
												},
												Name: "outData",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 37,
												Line:   48,
											},
											File:   "table_test.flux",
											Source: "testing.loadMem(csv: outData)",
											Start: ast.Position{
												Column: 8,
												Line:   48,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 23,
													Line:   48,
												},
												File:   "table_test.flux",
												Source: "testing.loadMem",
												Start: ast.Position{
													Column: 8,
													Line:   48,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 15,
														Line:   48,
													},
													File:   "table_test.flux",
													Source: "testing",
													Start: ast.Position{
														Column: 8,
														Line:   48,
													},
												},
											},
											Name: "testing",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 23,
														Line:   48,
													},
													File:   "table_test.flux",
													Source: "loadMem",
													Start: ast.Position{
														Column: 16,
														Line:   48,
													},
												},
											},
											Name: "loadMem",
										},
									},
								},
							}, &ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 21,
											Line:   49,
										},
										File:   "table_test.flux",
										Source: "fn: aggregate_table",
										Start: ast.Position{
											Column: 2,
											Line:   49,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 4,
												Line:   49,
											},
											File:   "table_test.flux",
											Source: "fn",
											Start: ast.Position{
												Column: 2,
												Line:   49,
											},
										},
									},
									Name: "fn",
								},
								Value: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 21,
												Line:   49,
											},
											File:   "table_test.flux",
											Source: "aggregate_table",
											Start: ast.Position{
												Column: 6,
												Line:   49,
											},
										},
									},
									Name: "aggregate_table",
								},
							}},
							With: nil,
						},
					},
					Params: []*ast.Property{},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 3,
						Line:   50,
					},
					File:   "table_test.flux",
					Source: "test _aggregate_table = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: aggregate_table,\n})",
					Start: ast.Position{
						Column: 1,
						Line:   46,
					},
				},
			},
		}},
		Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 17,
						Line:   3,
					},
					File:   "table_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:   "table_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: 38,
						Line:   4,
					},
					File:   "table_test.flux",
					Source: "import \"contrib/jsternberg/aggregate\"",
					Start: ast.Position{
						Column: 1,
						Line:   4,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 38,
							Line:   4,
						},
						File:   "table_test.flux",
						Source: "\"contrib/jsternberg/aggregate\"",
						Start: ast.Position{
							Column: 8,
							Line:   4,
						},
					},
				},
				Value: "contrib/jsternberg/aggregate",
			},
		}},
		Metadata: "parser-type=rust",
		Name:     "table_test.flux",
		Package: &ast.PackageClause{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 23,
						Line:   1,
					},
					File:   "table_test.flux",
					Source: "package aggregate_test",
					Start: ast.Position{
						Column: 1,
						Line:   1,
					},
				},
			},
			Name: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 23,
							Line:   1,
						},
						File:   "table_test.flux",
						Source: "aggregate_test",
						Start: ast.Position{
							Column: 9,
							Line:   1,
						},
					},
				},
				Name: "aggregate_test",
			},
		},
	}, &ast.File{
		BaseNode: ast.BaseNode{
			Errors: nil,
			Loc: &ast.SourceLocation{
				End: ast.Position{
					Column: 3,
					Line:   52,
				},
				File:   "window_test.flux",
				Source: "package aggregate_test\n\nimport \"testing\"\nimport \"contrib/jsternberg/aggregate\"\n\noption now = () => (2030-01-01T00:00:00Z)\n\ninData = \"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T00:00:00Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:10Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:20Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:30Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:40Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:50Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,1,2018-05-22T00:00:00Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:10Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:20Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:30Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:40Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:50Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n\"\n\noutData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,dateTime:RFC3339,dateTime:RFC3339,double,double,double,double,long\n#group,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false\n#default,_result,,,,,,,,,,,,,,,,\n,result,table,_start,_stop,_field,_measurement,device,fstype,host,path,start,stop,sum,mean,min,max,count\n,,0,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/,2018-05-22T00:00:00Z,2018-05-22T00:00:30Z,90,30,30,30,3\n,,0,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/,2018-05-22T00:00:30Z,2018-05-22T00:01:00Z,120,40,40,40,3\n,,1,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/tmp,2018-05-22T00:00:00Z,2018-05-22T00:00:30Z,105,35,35,35,3\n,,1,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/tmp,2018-05-22T00:00:30Z,2018-05-22T00:01:00Z,135,45,45,45,3\n\"\n\naggregate_window = (table=<-) => table\n\t|> range(start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z)\n\t|> aggregate.window(every: 30s, columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t})\n\ntest _aggregate_window = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: aggregate_window,\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: 42,
							Line:   6,
						},
						File:   "window_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:   "window_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:   "window_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:   "window_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:   "window_test.flux",
									Source: "2030-01-01T00:00:00Z",
									Start: ast.Position{
										Column: 21,
										Line:   6,
									},
								},
							},
							Value: parser.MustParseTime("2030-01-01T00:00:00Z"),
						},
					},
					Params: []*ast.Property{},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 42,
						Line:   6,
					},
					File:   "window_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:   25,
					},
					File:   "window_test.flux",
					Source: "inData = \"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T00:00:00Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:10Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:20Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:30Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:40Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:50Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,1,2018-05-22T00:00:00Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:10Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:20Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:30Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:40Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:50Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\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:   "window_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:   25,
						},
						File:   "window_test.flux",
						Source: "\"\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T00:00:00Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:10Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:20Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:30Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:40Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:50Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,1,2018-05-22T00:00:00Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:10Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:20Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:30Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:40Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:50Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n\"",
						Start: ast.Position{
							Column: 10,
							Line:   8,
						},
					},
				},
				Value: "\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string,string,string\n#group,false,false,false,false,true,true,true,true,true,true\n#default,_result,,,,,,,,,\n,result,table,_time,_value,_field,_measurement,device,fstype,host,path\n,,0,2018-05-22T00:00:00Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:10Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:20Z,30,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:30Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:40Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,0,2018-05-22T00:00:50Z,40,used_percent,disk,disk1s1,apfs,host.local,/\n,,1,2018-05-22T00:00:00Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:10Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:20Z,35,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:30Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:40Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n,,1,2018-05-22T00:00:50Z,45,used_percent,disk,disk1s1,apfs,host.local,/tmp\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   36,
					},
					File:   "window_test.flux",
					Source: "outData = \"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,dateTime:RFC3339,dateTime:RFC3339,double,double,double,double,long\n#group,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false\n#default,_result,,,,,,,,,,,,,,,,\n,result,table,_start,_stop,_field,_measurement,device,fstype,host,path,start,stop,sum,mean,min,max,count\n,,0,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/,2018-05-22T00:00:00Z,2018-05-22T00:00:30Z,90,30,30,30,3\n,,0,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/,2018-05-22T00:00:30Z,2018-05-22T00:01:00Z,120,40,40,40,3\n,,1,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/tmp,2018-05-22T00:00:00Z,2018-05-22T00:00:30Z,105,35,35,35,3\n,,1,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/tmp,2018-05-22T00:00:30Z,2018-05-22T00:01:00Z,135,45,45,45,3\n\"",
					Start: ast.Position{
						Column: 1,
						Line:   27,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 8,
							Line:   27,
						},
						File:   "window_test.flux",
						Source: "outData",
						Start: ast.Position{
							Column: 1,
							Line:   27,
						},
					},
				},
				Name: "outData",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   36,
						},
						File:   "window_test.flux",
						Source: "\"\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,dateTime:RFC3339,dateTime:RFC3339,double,double,double,double,long\n#group,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false\n#default,_result,,,,,,,,,,,,,,,,\n,result,table,_start,_stop,_field,_measurement,device,fstype,host,path,start,stop,sum,mean,min,max,count\n,,0,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/,2018-05-22T00:00:00Z,2018-05-22T00:00:30Z,90,30,30,30,3\n,,0,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/,2018-05-22T00:00:30Z,2018-05-22T00:01:00Z,120,40,40,40,3\n,,1,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/tmp,2018-05-22T00:00:00Z,2018-05-22T00:00:30Z,105,35,35,35,3\n,,1,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/tmp,2018-05-22T00:00:30Z,2018-05-22T00:01:00Z,135,45,45,45,3\n\"",
						Start: ast.Position{
							Column: 11,
							Line:   27,
						},
					},
				},
				Value: "\n#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,dateTime:RFC3339,dateTime:RFC3339,double,double,double,double,long\n#group,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false\n#default,_result,,,,,,,,,,,,,,,,\n,result,table,_start,_stop,_field,_measurement,device,fstype,host,path,start,stop,sum,mean,min,max,count\n,,0,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/,2018-05-22T00:00:00Z,2018-05-22T00:00:30Z,90,30,30,30,3\n,,0,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/,2018-05-22T00:00:30Z,2018-05-22T00:01:00Z,120,40,40,40,3\n,,1,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/tmp,2018-05-22T00:00:00Z,2018-05-22T00:00:30Z,105,35,35,35,3\n,,1,2018-05-22T00:00:00Z,2018-05-22T00:01:00Z,used_percent,disk,disk1s1,apfs,host.local,/tmp,2018-05-22T00:00:30Z,2018-05-22T00:01:00Z,135,45,45,45,3\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 4,
						Line:   46,
					},
					File:   "window_test.flux",
					Source: "aggregate_window = (table=<-) => table\n\t|> range(start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z)\n\t|> aggregate.window(every: 30s, columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t})",
					Start: ast.Position{
						Column: 1,
						Line:   38,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 17,
							Line:   38,
						},
						File:   "window_test.flux",
						Source: "aggregate_window",
						Start: ast.Position{
							Column: 1,
							Line:   38,
						},
					},
				},
				Name: "aggregate_window",
			},
			Init: &ast.FunctionExpression{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 4,
							Line:   46,
						},
						File:   "window_test.flux",
						Source: "(table=<-) => table\n\t|> range(start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z)\n\t|> aggregate.window(every: 30s, columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t})",
						Start: ast.Position{
							Column: 20,
							Line:   38,
						},
					},
				},
				Body: &ast.PipeExpression{
					Argument: &ast.PipeExpression{
						Argument: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 39,
										Line:   38,
									},
									File:   "window_test.flux",
									Source: "table",
									Start: ast.Position{
										Column: 34,
										Line:   38,
									},
								},
							},
							Name: "table",
						},
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 67,
									Line:   39,
								},
								File:   "window_test.flux",
								Source: "table\n\t|> range(start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z)",
								Start: ast.Position{
									Column: 34,
									Line:   38,
								},
							},
						},
						Call: &ast.CallExpression{
							Arguments: []ast.Expression{&ast.ObjectExpression{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 66,
											Line:   39,
										},
										File:   "window_test.flux",
										Source: "start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z",
										Start: ast.Position{
											Column: 11,
											Line:   39,
										},
									},
								},
								Properties: []*ast.Property{&ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 38,
												Line:   39,
											},
											File:   "window_test.flux",
											Source: "start: 2018-05-22T00:00:00Z",
											Start: ast.Position{
												Column: 11,
												Line:   39,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 16,
													Line:   39,
												},
												File:   "window_test.flux",
												Source: "start",
												Start: ast.Position{
													Column: 11,
													Line:   39,
												},
											},
										},
										Name: "start",
									},
									Value: &ast.DateTimeLiteral{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 38,
													Line:   39,
												},
												File:   "window_test.flux",
												Source: "2018-05-22T00:00:00Z",
												Start: ast.Position{
													Column: 18,
													Line:   39,
												},
											},
										},
										Value: parser.MustParseTime("2018-05-22T00:00:00Z"),
									},
								}, &ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 66,
												Line:   39,
											},
											File:   "window_test.flux",
											Source: "stop: 2018-05-22T00:01:00Z",
											Start: ast.Position{
												Column: 40,
												Line:   39,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 44,
													Line:   39,
												},
												File:   "window_test.flux",
												Source: "stop",
												Start: ast.Position{
													Column: 40,
													Line:   39,
												},
											},
										},
										Name: "stop",
									},
									Value: &ast.DateTimeLiteral{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 66,
													Line:   39,
												},
												File:   "window_test.flux",
												Source: "2018-05-22T00:01:00Z",
												Start: ast.Position{
													Column: 46,
													Line:   39,
												},
											},
										},
										Value: parser.MustParseTime("2018-05-22T00:01:00Z"),
									},
								}},
								With: nil,
							}},
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 67,
										Line:   39,
									},
									File:   "window_test.flux",
									Source: "range(start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z)",
									Start: ast.Position{
										Column: 5,
										Line:   39,
									},
								},
							},
							Callee: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 10,
											Line:   39,
										},
										File:   "window_test.flux",
										Source: "range",
										Start: ast.Position{
											Column: 5,
											Line:   39,
										},
									},
								},
								Name: "range",
							},
						},
					},
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 4,
								Line:   46,
							},
							File:   "window_test.flux",
							Source: "table\n\t|> range(start: 2018-05-22T00:00:00Z, stop: 2018-05-22T00:01:00Z)\n\t|> aggregate.window(every: 30s, columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t})",
							Start: ast.Position{
								Column: 34,
								Line:   38,
							},
						},
					},
					Call: &ast.CallExpression{
						Arguments: []ast.Expression{&ast.ObjectExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 3,
										Line:   46,
									},
									File:   "window_test.flux",
									Source: "every: 30s, columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t}",
									Start: ast.Position{
										Column: 22,
										Line:   40,
									},
								},
							},
							Properties: []*ast.Property{&ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 32,
											Line:   40,
										},
										File:   "window_test.flux",
										Source: "every: 30s",
										Start: ast.Position{
											Column: 22,
											Line:   40,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 27,
												Line:   40,
											},
											File:   "window_test.flux",
											Source: "every",
											Start: ast.Position{
												Column: 22,
												Line:   40,
											},
										},
									},
									Name: "every",
								},
								Value: &ast.DurationLiteral{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 32,
												Line:   40,
											},
											File:   "window_test.flux",
											Source: "30s",
											Start: ast.Position{
												Column: 29,
												Line:   40,
											},
										},
									},
									Values: []ast.Duration{ast.Duration{
										Magnitude: int64(30),
										Unit:      "s",
									}},
								},
							}, &ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 3,
											Line:   46,
										},
										File:   "window_test.flux",
										Source: "columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t}",
										Start: ast.Position{
											Column: 34,
											Line:   40,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 41,
												Line:   40,
											},
											File:   "window_test.flux",
											Source: "columns",
											Start: ast.Position{
												Column: 34,
												Line:   40,
											},
										},
									},
									Name: "columns",
								},
								Value: &ast.ObjectExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 3,
												Line:   46,
											},
											File:   "window_test.flux",
											Source: "{\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t}",
											Start: ast.Position{
												Column: 43,
												Line:   40,
											},
										},
									},
									Properties: []*ast.Property{&ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 23,
													Line:   41,
												},
												File:   "window_test.flux",
												Source: "sum: aggregate.sum()",
												Start: ast.Position{
													Column: 3,
													Line:   41,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 6,
														Line:   41,
													},
													File:   "window_test.flux",
													Source: "sum",
													Start: ast.Position{
														Column: 3,
														Line:   41,
													},
												},
											},
											Name: "sum",
										},
										Value: &ast.CallExpression{
											Arguments: nil,
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 23,
														Line:   41,
													},
													File:   "window_test.flux",
													Source: "aggregate.sum()",
													Start: ast.Position{
														Column: 8,
														Line:   41,
													},
												},
											},
											Callee: &ast.MemberExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 21,
															Line:   41,
														},
														File:   "window_test.flux",
														Source: "aggregate.sum",
														Start: ast.Position{
															Column: 8,
															Line:   41,
														},
													},
												},
												Object: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 17,
																Line:   41,
															},
															File:   "window_test.flux",
															Source: "aggregate",
															Start: ast.Position{
																Column: 8,
																Line:   41,
															},
														},
													},
													Name: "aggregate",
												},
												Property: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 21,
																Line:   41,
															},
															File:   "window_test.flux",
															Source: "sum",
															Start: ast.Position{
																Column: 18,
																Line:   41,
															},
														},
													},
													Name: "sum",
												},
											},
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 25,
													Line:   42,
												},
												File:   "window_test.flux",
												Source: "mean: aggregate.mean()",
												Start: ast.Position{
													Column: 3,
													Line:   42,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 7,
														Line:   42,
													},
													File:   "window_test.flux",
													Source: "mean",
													Start: ast.Position{
														Column: 3,
														Line:   42,
													},
												},
											},
											Name: "mean",
										},
										Value: &ast.CallExpression{
											Arguments: nil,
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 25,
														Line:   42,
													},
													File:   "window_test.flux",
													Source: "aggregate.mean()",
													Start: ast.Position{
														Column: 9,
														Line:   42,
													},
												},
											},
											Callee: &ast.MemberExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 23,
															Line:   42,
														},
														File:   "window_test.flux",
														Source: "aggregate.mean",
														Start: ast.Position{
															Column: 9,
															Line:   42,
														},
													},
												},
												Object: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 18,
																Line:   42,
															},
															File:   "window_test.flux",
															Source: "aggregate",
															Start: ast.Position{
																Column: 9,
																Line:   42,
															},
														},
													},
													Name: "aggregate",
												},
												Property: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 23,
																Line:   42,
															},
															File:   "window_test.flux",
															Source: "mean",
															Start: ast.Position{
																Column: 19,
																Line:   42,
															},
														},
													},
													Name: "mean",
												},
											},
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 23,
													Line:   43,
												},
												File:   "window_test.flux",
												Source: "min: aggregate.min()",
												Start: ast.Position{
													Column: 3,
													Line:   43,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 6,
														Line:   43,
													},
													File:   "window_test.flux",
													Source: "min",
													Start: ast.Position{
														Column: 3,
														Line:   43,
													},
												},
											},
											Name: "min",
										},
										Value: &ast.CallExpression{
											Arguments: nil,
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 23,
														Line:   43,
													},
													File:   "window_test.flux",
													Source: "aggregate.min()",
													Start: ast.Position{
														Column: 8,
														Line:   43,
													},
												},
											},
											Callee: &ast.MemberExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 21,
															Line:   43,
														},
														File:   "window_test.flux",
														Source: "aggregate.min",
														Start: ast.Position{
															Column: 8,
															Line:   43,
														},
													},
												},
												Object: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 17,
																Line:   43,
															},
															File:   "window_test.flux",
															Source: "aggregate",
															Start: ast.Position{
																Column: 8,
																Line:   43,
															},
														},
													},
													Name: "aggregate",
												},
												Property: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 21,
																Line:   43,
															},
															File:   "window_test.flux",
															Source: "min",
															Start: ast.Position{
																Column: 18,
																Line:   43,
															},
														},
													},
													Name: "min",
												},
											},
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 23,
													Line:   44,
												},
												File:   "window_test.flux",
												Source: "max: aggregate.max()",
												Start: ast.Position{
													Column: 3,
													Line:   44,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 6,
														Line:   44,
													},
													File:   "window_test.flux",
													Source: "max",
													Start: ast.Position{
														Column: 3,
														Line:   44,
													},
												},
											},
											Name: "max",
										},
										Value: &ast.CallExpression{
											Arguments: nil,
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 23,
														Line:   44,
													},
													File:   "window_test.flux",
													Source: "aggregate.max()",
													Start: ast.Position{
														Column: 8,
														Line:   44,
													},
												},
											},
											Callee: &ast.MemberExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 21,
															Line:   44,
														},
														File:   "window_test.flux",
														Source: "aggregate.max",
														Start: ast.Position{
															Column: 8,
															Line:   44,
														},
													},
												},
												Object: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 17,
																Line:   44,
															},
															File:   "window_test.flux",
															Source: "aggregate",
															Start: ast.Position{
																Column: 8,
																Line:   44,
															},
														},
													},
													Name: "aggregate",
												},
												Property: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 21,
																Line:   44,
															},
															File:   "window_test.flux",
															Source: "max",
															Start: ast.Position{
																Column: 18,
																Line:   44,
															},
														},
													},
													Name: "max",
												},
											},
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 27,
													Line:   45,
												},
												File:   "window_test.flux",
												Source: "count: aggregate.count()",
												Start: ast.Position{
													Column: 3,
													Line:   45,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 8,
														Line:   45,
													},
													File:   "window_test.flux",
													Source: "count",
													Start: ast.Position{
														Column: 3,
														Line:   45,
													},
												},
											},
											Name: "count",
										},
										Value: &ast.CallExpression{
											Arguments: nil,
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 27,
														Line:   45,
													},
													File:   "window_test.flux",
													Source: "aggregate.count()",
													Start: ast.Position{
														Column: 10,
														Line:   45,
													},
												},
											},
											Callee: &ast.MemberExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 25,
															Line:   45,
														},
														File:   "window_test.flux",
														Source: "aggregate.count",
														Start: ast.Position{
															Column: 10,
															Line:   45,
														},
													},
												},
												Object: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 19,
																Line:   45,
															},
															File:   "window_test.flux",
															Source: "aggregate",
															Start: ast.Position{
																Column: 10,
																Line:   45,
															},
														},
													},
													Name: "aggregate",
												},
												Property: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 25,
																Line:   45,
															},
															File:   "window_test.flux",
															Source: "count",
															Start: ast.Position{
																Column: 20,
																Line:   45,
															},
														},
													},
													Name: "count",
												},
											},
										},
									}},
									With: nil,
								},
							}},
							With: nil,
						}},
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 4,
									Line:   46,
								},
								File:   "window_test.flux",
								Source: "aggregate.window(every: 30s, columns: {\n\t\tsum: aggregate.sum(),\n\t\tmean: aggregate.mean(),\n\t\tmin: aggregate.min(),\n\t\tmax: aggregate.max(),\n\t\tcount: aggregate.count(),\n\t})",
								Start: ast.Position{
									Column: 5,
									Line:   40,
								},
							},
						},
						Callee: &ast.MemberExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 21,
										Line:   40,
									},
									File:   "window_test.flux",
									Source: "aggregate.window",
									Start: ast.Position{
										Column: 5,
										Line:   40,
									},
								},
							},
							Object: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 14,
											Line:   40,
										},
										File:   "window_test.flux",
										Source: "aggregate",
										Start: ast.Position{
											Column: 5,
											Line:   40,
										},
									},
								},
								Name: "aggregate",
							},
							Property: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 21,
											Line:   40,
										},
										File:   "window_test.flux",
										Source: "window",
										Start: ast.Position{
											Column: 15,
											Line:   40,
										},
									},
								},
								Name: "window",
							},
						},
					},
				},
				Params: []*ast.Property{&ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 29,
								Line:   38,
							},
							File:   "window_test.flux",
							Source: "table=<-",
							Start: ast.Position{
								Column: 21,
								Line:   38,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 26,
									Line:   38,
								},
								File:   "window_test.flux",
								Source: "table",
								Start: ast.Position{
									Column: 21,
									Line:   38,
								},
							},
						},
						Name: "table",
					},
					Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 29,
								Line:   38,
							},
							File:   "window_test.flux",
							Source: "<-",
							Start: ast.Position{
								Column: 27,
								Line:   38,
							},
						},
					}},
				}},
			},
		}, &ast.TestStatement{
			Assignment: &ast.VariableAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 3,
							Line:   52,
						},
						File:   "window_test.flux",
						Source: "_aggregate_window = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: aggregate_window,\n})",
						Start: ast.Position{
							Column: 6,
							Line:   48,
						},
					},
				},
				ID: &ast.Identifier{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 23,
								Line:   48,
							},
							File:   "window_test.flux",
							Source: "_aggregate_window",
							Start: ast.Position{
								Column: 6,
								Line:   48,
							},
						},
					},
					Name: "_aggregate_window",
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 3,
								Line:   52,
							},
							File:   "window_test.flux",
							Source: "() => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: aggregate_window,\n})",
							Start: ast.Position{
								Column: 26,
								Line:   48,
							},
						},
					},
					Body: &ast.ParenExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 3,
									Line:   52,
								},
								File:   "window_test.flux",
								Source: "({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: aggregate_window,\n})",
								Start: ast.Position{
									Column: 32,
									Line:   48,
								},
							},
						},
						Expression: &ast.ObjectExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 2,
										Line:   52,
									},
									File:   "window_test.flux",
									Source: "{\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: aggregate_window,\n}",
									Start: ast.Position{
										Column: 33,
										Line:   48,
									},
								},
							},
							Properties: []*ast.Property{&ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 41,
											Line:   49,
										},
										File:   "window_test.flux",
										Source: "input: testing.loadStorage(csv: inData)",
										Start: ast.Position{
											Column: 2,
											Line:   49,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 7,
												Line:   49,
											},
											File:   "window_test.flux",
											Source: "input",
											Start: ast.Position{
												Column: 2,
												Line:   49,
											},
										},
									},
									Name: "input",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 40,
													Line:   49,
												},
												File:   "window_test.flux",
												Source: "csv: inData",
												Start: ast.Position{
													Column: 29,
													Line:   49,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 40,
														Line:   49,
													},
													File:   "window_test.flux",
													Source: "csv: inData",
													Start: ast.Position{
														Column: 29,
														Line:   49,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 32,
															Line:   49,
														},
														File:   "window_test.flux",
														Source: "csv",
														Start: ast.Position{
															Column: 29,
															Line:   49,
														},
													},
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 40,
															Line:   49,
														},
														File:   "window_test.flux",
														Source: "inData",
														Start: ast.Position{
															Column: 34,
															Line:   49,
														},
													},
												},
												Name: "inData",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 41,
												Line:   49,
											},
											File:   "window_test.flux",
											Source: "testing.loadStorage(csv: inData)",
											Start: ast.Position{
												Column: 9,
												Line:   49,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 28,
													Line:   49,
												},
												File:   "window_test.flux",
												Source: "testing.loadStorage",
												Start: ast.Position{
													Column: 9,
													Line:   49,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 16,
														Line:   49,
													},
													File:   "window_test.flux",
													Source: "testing",
													Start: ast.Position{
														Column: 9,
														Line:   49,
													},
												},
											},
											Name: "testing",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 28,
														Line:   49,
													},
													File:   "window_test.flux",
													Source: "loadStorage",
													Start: ast.Position{
														Column: 17,
														Line:   49,
													},
												},
											},
											Name: "loadStorage",
										},
									},
								},
							}, &ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 37,
											Line:   50,
										},
										File:   "window_test.flux",
										Source: "want: testing.loadMem(csv: outData)",
										Start: ast.Position{
											Column: 2,
											Line:   50,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 6,
												Line:   50,
											},
											File:   "window_test.flux",
											Source: "want",
											Start: ast.Position{
												Column: 2,
												Line:   50,
											},
										},
									},
									Name: "want",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 36,
													Line:   50,
												},
												File:   "window_test.flux",
												Source: "csv: outData",
												Start: ast.Position{
													Column: 24,
													Line:   50,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 36,
														Line:   50,
													},
													File:   "window_test.flux",
													Source: "csv: outData",
													Start: ast.Position{
														Column: 24,
														Line:   50,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 27,
															Line:   50,
														},
														File:   "window_test.flux",
														Source: "csv",
														Start: ast.Position{
															Column: 24,
															Line:   50,
														},
													},
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 36,
															Line:   50,
														},
														File:   "window_test.flux",
														Source: "outData",
														Start: ast.Position{
															Column: 29,
															Line:   50,
														},
													},
												},
												Name: "outData",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 37,
												Line:   50,
											},
											File:   "window_test.flux",
											Source: "testing.loadMem(csv: outData)",
											Start: ast.Position{
												Column: 8,
												Line:   50,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 23,
													Line:   50,
												},
												File:   "window_test.flux",
												Source: "testing.loadMem",
												Start: ast.Position{
													Column: 8,
													Line:   50,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 15,
														Line:   50,
													},
													File:   "window_test.flux",
													Source: "testing",
													Start: ast.Position{
														Column: 8,
														Line:   50,
													},
												},
											},
											Name: "testing",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 23,
														Line:   50,
													},
													File:   "window_test.flux",
													Source: "loadMem",
													Start: ast.Position{
														Column: 16,
														Line:   50,
													},
												},
											},
											Name: "loadMem",
										},
									},
								},
							}, &ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 22,
											Line:   51,
										},
										File:   "window_test.flux",
										Source: "fn: aggregate_window",
										Start: ast.Position{
											Column: 2,
											Line:   51,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 4,
												Line:   51,
											},
											File:   "window_test.flux",
											Source: "fn",
											Start: ast.Position{
												Column: 2,
												Line:   51,
											},
										},
									},
									Name: "fn",
								},
								Value: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 22,
												Line:   51,
											},
											File:   "window_test.flux",
											Source: "aggregate_window",
											Start: ast.Position{
												Column: 6,
												Line:   51,
											},
										},
									},
									Name: "aggregate_window",
								},
							}},
							With: nil,
						},
					},
					Params: []*ast.Property{},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 3,
						Line:   52,
					},
					File:   "window_test.flux",
					Source: "test _aggregate_window = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: aggregate_window,\n})",
					Start: ast.Position{
						Column: 1,
						Line:   48,
					},
				},
			},
		}},
		Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 17,
						Line:   3,
					},
					File:   "window_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:   "window_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: 38,
						Line:   4,
					},
					File:   "window_test.flux",
					Source: "import \"contrib/jsternberg/aggregate\"",
					Start: ast.Position{
						Column: 1,
						Line:   4,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 38,
							Line:   4,
						},
						File:   "window_test.flux",
						Source: "\"contrib/jsternberg/aggregate\"",
						Start: ast.Position{
							Column: 8,
							Line:   4,
						},
					},
				},
				Value: "contrib/jsternberg/aggregate",
			},
		}},
		Metadata: "parser-type=rust",
		Name:     "window_test.flux",
		Package: &ast.PackageClause{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 23,
						Line:   1,
					},
					File:   "window_test.flux",
					Source: "package aggregate_test",
					Start: ast.Position{
						Column: 1,
						Line:   1,
					},
				},
			},
			Name: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 23,
							Line:   1,
						},
						File:   "window_test.flux",
						Source: "aggregate_test",
						Start: ast.Position{
							Column: 9,
							Line:   1,
						},
					},
				},
				Name: "aggregate_test",
			},
		},
	}},
	Package: "aggregate_test",
	Path:    "contrib/jsternberg/aggregate",
}}

Functions

func NewWindowTransformation added in v0.85.0

Types

type TableColumn

type TableColumn struct {
	Column  string
	Init    interpreter.ResolvedFunction
	Reduce  interpreter.ResolvedFunction
	Compute interpreter.ResolvedFunction
	As      string
	Fill    values.Value
}

type TableOpSpec

type TableOpSpec struct {
	Columns []TableColumn
}

func (*TableOpSpec) Kind

func (a *TableOpSpec) Kind() flux.OperationKind

type TableProcedureSpec

type TableProcedureSpec struct {
	plan.DefaultCost
	Columns []TableColumn
}

func (*TableProcedureSpec) Copy

func (*TableProcedureSpec) Kind

type WindowOpSpec added in v0.85.0

type WindowOpSpec struct {
	TimeSrc string
	Window  execute.Window
	Columns []TableColumn
}

func (*WindowOpSpec) Kind added in v0.85.0

func (a *WindowOpSpec) Kind() flux.OperationKind

type WindowProcedureSpec added in v0.85.0

type WindowProcedureSpec struct {
	plan.DefaultCost
	*TableProcedureSpec
	TimeSrc string
	Window  execute.Window
}

func (*WindowProcedureSpec) Copy added in v0.85.0

func (*WindowProcedureSpec) Kind added in v0.85.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL