Skip to content

[Superset 6.0.0rc1] Calculated Column isn't working and generate wrong SQL with ClickHouse #34784

@andy1xx8

Description

@andy1xx8

Bug description

Calculated Column isn't working with ClickHouse.
The engine doesnt generate proper SQL

  1. Define a calculated column , let's say: name_test by this sql: toString('This is a test name')
  2. Create a table chart and show that name_test
  3. Update to refesh the table.

This is the sql query generate by Superset 6.0.0rc1

SELECT
  "name_test" AS "name_test_a4abe3"
FROM (
  SELECT
    transaction_id,
    order_id,
    order_detail_id,
    log_time
  FROM analytics.fct_external_voucher FINAL
) AS "virtual_table"
ORDER BY
  "voucher_exchange_date" DESC
LIMIT 10

Screenshots/recordings

Image

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions