Skip to content

Missing parentheses around SELECT as expressions #8

@cpg314

Description

@cpg314
local u = import 'sqlsonnet.libsonnet';

 local x = u.select({
   fields: [1.5],
});

u.select({
    fields: [
        u.fn('round', [
        x
        ])
    ],
})

generates

SELECT
  round(
    SELECT
      1.5
  )

which is not valid in Clickhouse's dialect.

On the other hand,

SELECT
  round(
    (SELECT
      1.5)
  )

is fine, so we are just missing parentheses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions