Closed tbg closed 9 years ago
Unless it's by far the common case to want a DTuple{x}
turn into x
, I personally prefer having EvalExpr
returning the expected (the one-element tuple). To avoid repeated code at the callsites, we could have a helper that does the unwrapping transparently when it applies.
Huh, I just removed the special case for a tuple of length 1 and nothing broke. Now I'm wondering precisely why I added this in the first place. Maybe something changed in the switch from the vitess grammar to the postgres grammar. Oh well, looks like we can remove the special case and have more sanity in this code.
these currently evaluate to its only element:
which may or may not be confusing or the wrong place to do this. There are callsites which want the element, but others want the tuple. Should figure out and decide which one it is going to be.