Conversation
ade95b4 to
095e2bb
Compare
| done | ||
| super db manage -q | ||
| super db -s -c 'from test@main:objects | drop id' | ||
| super db -s -c 'from test@main:objects | drop id | min:=defuse(min),max:=defuse(max)' |
There was a problem hiding this comment.
Maybe don't bother doing this change if we're just going to skip this test
| seq 1 10 | super -c '{ts:this}' - | super db load -q - | ||
| super db manage -log.level=warn -q -vectors | ||
| super db -s -c 'from test1@main:vectors | drop id' | ||
| super db -s -c 'from test1@main:vectors | drop id | min:=defuse(min),max:=defuse(max)' |
There was a problem hiding this comment.
Consider just not have the defuse here since this test is skipped anyways.
csup/scode.go
Outdated
| } | ||
| if p.max == nil || p.cmp(val, *p.max) > 0 { | ||
| p.max = val.Copy().Ptr() | ||
| if p.minmax || p.cmp(val, p.max) > 0 { |
There was a problem hiding this comment.
I think this should be not minmax
| if p.minmax || p.cmp(val, p.max) > 0 { | |
| if !p.minmax || p.cmp(val, p.max) > 0 { |
context.go
Outdated
| c.named[name] = named | ||
| return named, nil | ||
| if _, ok := c.byID[id]; ok { | ||
| //XXX if it wasn't in the named table, it can't be in byID table |
There was a problem hiding this comment.
Does this comment need the XXX which to me usually implies TODO ?
spq_test.go
Outdated
| if testing.Short() { | ||
| t.Skip("skipping boomerang in short mode") | ||
| } | ||
| t.Skip() |
There was a problem hiding this comment.
Consider putting a reason on the skip here?
There was a problem hiding this comment.
Oops, I forgot I did that. It should not be skipped and boomerangs don't pass. I have more work to do on this branch!
| } | ||
| it := val.Bytes().Iter() | ||
| bytes := it.Next() | ||
| //XXX |
There was a problem hiding this comment.
That is doing a DerefFusion so I'll replace.
sio/csvio/reader.go
Outdated
|
|
||
| func validate(strings []string) bool { | ||
| for _, s := range strings { | ||
| if !utf8.Valid([]byte(s)) { |
There was a problem hiding this comment.
This should be faster.
| if !utf8.Valid([]byte(s)) { | |
| if !utf8.ValidString(s) { |
order/direction.go
Outdated
| func (d Direction) Which() Which { | ||
| if d == Down { | ||
| return Desc | ||
| } | ||
| return Asc | ||
| } |
There was a problem hiding this comment.
Implicit conversion from Unknown to Asc feels like a potential rake. Maybe add a comment or a default parameter?
This commit changes the semantics of named type definitions so they are now immutable and cannot be modified once encountered and/or entered into a type context. It was sensible in early versions of SuperDB to allow named types to change in the spirit of coping with dynamic data, but now that we have fusion types, we can encode named types as abstract types that need not change. To do so, we introduce the concept of an any type, which is a fusion type whose super type is type "all" (added in this PR as the counterpart to type "none"). In a future PR, we will add a shorthand notation for the type "any" to be an abbreviation for "fusion(all)". The any type allows serializing native data structures with embedded super.Values or super.Types to an immutablnamed type, which can then be deserialized back into the correct native data type using reflection directed by the type name. This was needed by SuperDB's storage of various types of metadata (in CSUP and in commit logs) so that type names would continue to work for these data structures while now being immutable. In the future, the runtime will have complete transparency to the fusion and any types, but for now, we had to update many tests to manually call defuse on any values. A future version of SuperDB will (by default) automatically defuse output to SUP, etc. and the runtime will automatically defuse values that are operated upon. Finally, we disabled tests related to "db manage" and "create vectors" as the latter will go away when databases become CSUP native and the manage command likely depends on some script logic that is tripping over any types. (This problem will go away by itself when the runtime handles fusion types everywhere.) don't link check goes-around paper address PR feedback (boomerangs broken and need to be fixed) fix boomerangs fix typo address PR feedback
This commit changes the semantics of named type definitions so they are now immutable and cannot be modified once encountered and/or entered into a type context. It was sensible in early versions of SuperDB to allow named types to change in the spirit of coping with dynamic data, but now that we have fusion types, we can encode named types as abstract types that need not change.
To do so, we introduce the concept of an any type, which is a fusion type whose super type is type "all" (added in this PR as the counterpart to type "none"). In a future PR, we will add a shorthand notation for the type "any" to be an abbreviation for "fusion(all)". The any type allows serializing native data structures with embedded super.Values or super.Types to an immutable named type, which can then be deserialized back into the correct native data type using reflection directed by the type name. This was needed by SuperDB's storage of various types of metadata (in CSUP and in commit logs) so that type names would continue to work for these data structures while now being immutable.
In the future, the runtime will have complete transparency to the fusion and any types, but for now, we had to update many tests to manually call defuse on any values. A future version of SuperDB will (by default) automatically defuse output to SUP, etc. and the runtime will automatically defuse values that are operated upon.
We also ran into a problem where the order.Which type was persisted into a type context from serialized super data and also from marshaled Go structs. This caused a now-illegal type redefinition. To avoid this, we changed order.Which from a bool to string and removed the custom marshalers.
Finally, we disabled tests related to "db manage" and "create vectors" as the latter will go away when databases become CSUP native and the manage command likely depends on some script logic that is tripping over any types. (This problem will go away by itself when the runtime handles fusion types everywhere.)