- changed status to resolved
optional "compress labels" compiler behavior
Issue #1211
resolved
this is an interesting feature which I have working. I would like to see if this might be an optional feature, or also if it suggests refinements to the inner workings of long label names and such. The attached patch illustrates the basic idea. a statement which now compiles as:
SELECT anon_1.name AS anon_1_name FROM (SELECT users.id AS id, users.name AS name FROM users WHERE users.id IN (?, ?)) AS anon_1
becomes:
SELECT anon_1._2 AS _1 \nFROM (SELECT users.id AS _2, users.name AS _3 \nFROM users \nWHERE users.id IN (?, ?)) AS anon_1
the key is that it looks at a given column slightly more intelligently (adds a speed hit at the moment which maybe can be refined) to determine if its derived or real. We can tell if a derived column is going to be labeled or not using logic similar to label_select_column(), and perhaps that logic can be rolled into some kind of cache.
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.5.xx (automated comment)
- Log in to comment
came up with something that conserves call counts, makes the code a little simpler in 9f894d2f265bb5fd03ab0b3aa3fd164108c99259.