Skip to content

Add missing case to test COALESCE order logic#26

Open
replakcan wants to merge 1 commit intorhc2104:masterfrom
replakcan:master
Open

Add missing case to test COALESCE order logic#26
replakcan wants to merge 1 commit intorhc2104:masterfrom
replakcan:master

Conversation

@replakcan
Copy link

This PR adds a new row to the fighters dataset where both gun and sword are provided while tank is null. This allows the "Coalesce" task to better test the order of precedence when selecting the strongest available weapon.

To maintain the existing order based on weapon strength (tank > gun > sword > null), the new row was inserted as id: 2, and the IDs of subsequent entries were incremented accordingly.

New entry:
{
id: 2,
name: "Spec Ops Operative",
gun: "Glock 17",
sword: "Fairbairn Sykes Dagger",
tank: null
}

Without this case, COALESCE(tank, gun, sword) and COALESCE(tank, sword, gun) both produce the same results. This addition ensures correct ordering is actually evaluated.

Suggested in reference to Issue #[25].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant