Allen Lantz

Results 49 comments of Allen Lantz

Yeah, I saw that in another PR and I thought I'd just send this one as an interim solution as it wasn't too difficult.

> > @finnbear mind taking a look? > > Sure; I recommend using a `BTreeSet` to avoid `derive(Hash)`'s as per https://github.com/surrealdb/surrealdb/pull/1218#discussion_r979293193 Ah 🤦‍♂️ yeah that'd make sense

@finnbear maybe create a new type under Number as NaN? We could give it explicit behavior for all of these ops and make sure NaN == NaN. Also I'm thinking...

> I generally agree with this, to cut down the number of "nothing" types. Or, to be consistent with the other special math case of dividing by 0 we could...

Removed last commit in that last force push ^

Note to whoever implements it, here is where to do so: https://github.com/surrealdb/surrealdb/blob/b31dbb28fe8bce95598c2fa4d44604590bf96dfd/lib/src/fnc/array.rs#L31-L43 https://github.com/surrealdb/surrealdb/blob/b31dbb28fe8bce95598c2fa4d44604590bf96dfd/lib/src/fnc/mod.rs#L66-L67

A thing to consider is, what happens if you have an array like `[[1, 2], "SurrealDB", [3, 4]]` should it output `[1, 2, 3, 4]` or `[1, 2, "SurrealDB", 3,...

Thoughts on having a second optional parameter to specify if the flatten should be distinct? Or have `array::flatten_distinct(array)`

> @AL1L I think it could be wrapped in the existing array distinct after flattening it? > ``` > array::distinct( > array::flatten([1, 2, 3]) > ) > ``` Yes this...