Closed dburkart closed 1 year ago
Currently, we crash if reduce is the first stage of a pipeline:
panic: interface conversion: schema.Object is schema.Unknown, not *schema.Type goroutine 55 [running]: github.com/dburkart/fossil/pkg/query/analysis.(*TypeChecker).Visit(0x14000180640, {0x10545fe40, 0x140001805a0}) /Users/dburkart/Projects/fossil/pkg/query/analysis/types.go:150 +0x3b48 github.com/dburkart/fossil/pkg/query/ast.Walk({0x10545fc40, 0x14000180640}, {0x10545fe40, 0x140001805a0}) /Users/dburkart/Projects/fossil/pkg/query/ast/walk.go:89 +0xa24 github.com/dburkart/fossil/pkg/query/ast.Walk({0x10545fc40, 0x14000180640}, {0x10545fc80, 0x140000c4360}) /Users/dburkart/Projects/fossil/pkg/query/ast/walk.go:83 +0x490 github.com/dburkart/fossil/pkg/query/ast.Walk({0x10545fc40, 0x14000180640}, {0x10545fca0, 0x140000c42d0}) /Users/dburkart/Projects/fossil/pkg/query/ast/walk.go:80 +0x338 github.com/dburkart/fossil/pkg/query/ast.Walk({0x10545fc40, 0x14000180640}, {0x10545fcc0, 0x140001805f0}) /Users/dburkart/Projects/fossil/pkg/query/ast/walk.go:76 +0xa9c github.com/dburkart/fossil/pkg/query/ast.Walk({0x10545fc40, 0x14000180640}, {0x10545fd40, 0x140000c4120}) /Users/dburkart/Projects/fossil/pkg/query/ast/walk.go:31 +0x600 github.com/dburkart/fossil/pkg/query.Prepare(0x1400027e6e0, {0x140000264b0, 0x29}) /Users/dburkart/Projects/fossil/pkg/query/prepare.go:48 +0x11c github.com/dburkart/fossil/pkg/server.QueryResponse({{0x140000264b0, 0x29}}, 0x1400027e6e0) /Users/dburkart/Projects/fossil/pkg/server/response.go:65 +0x50 github.com/dburkart/fossil/pkg/server.(*Server).HandleQuery(0x140002ccb40, {{0x0, 0x0}, {0x105460700, 0x14000010008}}, 0x140000a0588) /Users/dburkart/Projects/fossil/pkg/server/server.go:162 +0x188 github.com/dburkart/fossil/pkg/server.(*Server).accessLog.func1({{0x0, 0x0}, {0x105460700, 0x14000010008}}, 0x140000a0588) /Users/dburkart/Projects/fossil/pkg/server/server.go:79 +0x164 github.com/dburkart/fossil/pkg/server.(*MapMux).ServeMessage(0x1400008e010, 0x140001f02c0, 0x140000a0588) /Users/dburkart/Projects/fossil/pkg/server/mux.go:52 +0x174 created by github.com/dburkart/fossil/pkg/server.(*conn).Handle /Users/dburkart/Projects/fossil/pkg/server/mux.go:140 +0x444 Exiting.
This should be possible.
Currently, we crash if reduce is the first stage of a pipeline:
This should be possible.