clockworklabs / SpacetimeDB

Multiplayer at the speed of light
https://spacetimedb.com
Other
4.41k stars 110 forks source link

Fix inference for UNION #1994

Open mamcx opened 1 week ago

mamcx commented 1 week ago

Description of Changes

When trying to infer the type for UNION like queries we get:

 Unexpected type: (expected) (u32: U32f32: F32str: String) != (u32: U32f32: F32str: String) (inferred)

Because the check is only 'nominal' (aka: test both table_id are the same), this patch also makes a structural check.

Expected complexity level and risk

1

Testing

Describe any testing you've done, and any testing you'd like your reviewers to do, so that you're confident that all the changes work as expected!

cloutiertyler commented 6 days ago

bots please

(doing this for unrelated reasons to this PR)

github-actions[bot] commented 6 days ago

Bot test failed. Please check the workflow run for details.