Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Conversation

@garyb
Copy link
Member

@garyb garyb commented Jul 27, 2019

@rintcius hacking this in should help with the codegen test stuff you're working on. With just these handful of changes our generated queries already look pretty close to that formatting we were applying by hand:

SELECT 
  c.c1 AS `Values of key a`, 
  c.c2 AS `Values of key id`, 
  c.c4 AS `Values of key id 2`, 
  c.c3 AS `Values of key value`
FROM
  ((SELECT 
    p5.g7 AS c1
  FROM
    (SELECT 
      `_sd_ensure_number`(r6.a) AS g7
    FROM
      `/datasource/dba83c92-955d-4bbd-8caa-0087c2e84413/ssssimple.ldjson` AS r6
    ) AS p5)
  UNION ALL
  (SELECT 
    p8.g10 AS c2, 
    p8.g12 AS c3, 
    p8.g11 AS c4
  FROM
    (SELECT 
      `_sd_ensure_number`(r9.entry.id) AS g10, 
      to_string(`_sd_ensure_number`(r9.entry.id)) AS g11, 
      `_sd_ensure_boolean`(r9.entry.value) AS g12
    FROM
      `/datasource/dba83c92-955d-4bbd-8caa-0087c2e84413/ssssst.ldjson` AS r9
    ) AS p8)
  ) AS c

@garyb garyb requested review from cryogenian and rintcius July 27, 2019 12:47
@garyb garyb merged commit 7141ef5 into slamdata:master Jul 30, 2019
@garyb garyb deleted the pretty branch July 30, 2019 10:29
@rintcius
Copy link
Member

Great, thanks @garyb !

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants