[14:03:56] AaronSchulz: (re ApiQueryUserContribsTest in sqlite) WTF? sqlite seems to thing that coalesce(4,null) < '4' is true. [14:06:48] anomie: nice that you tracked that down...I was having a hard time looking for a quick cause [14:07:09] anomie: is it the quotes? [14:08:25] AaronSchulz: Removing the quotes makes it give the correct answer. OTOH, select coalesce('4', null) < 5 incorrectly returns false. I think there's some bug in sqlite's type munging when coalesce() is involved. [15:09:00] AaronSchulz: Or maybe not a bug, but definitely weirdness in sqlite's non-strict type system. MySQL is really loose, it'll always try to convert the string to an integer for "int < string" and the like. MSSQL and Oracle do more or less the same. PostgreSQL is stricter, it has a special type for string literals (versus the actual string types in database tables) and only auto-converts that one. Sqlite separates "actual type" from optional [15:09:00] "expected type" (which it calls "affinity"), only casts if one side has an affinity and the other doesn't, and doesn't propagate affinity through function calls like coalesce(). And SQLite just arbitrarily decides that every integer is less than every string. Thus "intCol < '4'" works because intCol comes with integer affinity and '4' has none, but "coalesce(intCol1,intCol2) < '4'" fails because both sides have no affinity. [15:11:17] curious [15:11:43] is there decent way to cast manually here? [15:28:01] We could wrap the coalesce() in a cast(), like cast(coalesce(...) as integer). That would reapply the right affinity. [15:37:27] anomie: for the sync call ina few minutes, one of the things we'll discuss is "cross-wiki access and migration stages". I have cooked up a somewhat hacky solution, it would be helpful if you could have a brief look before the call: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/443985 [16:17:44] anomie, tgr|away cscott and i were trying to succintly summarize the templatestyles -> remex dependency and https://phabricator.wikimedia.org/T133410#4009008 is what i dug up and this is how it is phrased currently: "Since the preferred implementation of TemplateStyles has a dependency on RemexHtml, unblocking its deployment is the most immediate benefit to editors of the switch to RemexHtml." ... [16:18:11] can you suggest a better statement if that is incorrect wording? [16:18:28] that is for a blog post about tidy replacement. [16:18:30] subbu: I'm in a meeting, should end in about 12 minutes. [16:18:35] no rush. [16:30:28] subbu: TemplateStyles works without tidy and with Remex, but it has that paragraph break issue with Raggett tidy. Since for WMF sites "no tidy" isn't an option, your sentence seems accurate to me. [16:31:06] ok. ty.