cloudera / hue

Open source SQL Query Assistant service for Databases/Warehouses
https://cloudera.com
Apache License 2.0
1.17k stars 367 forks source link

Hue Table Browser for Trino throws exception with backquoted identifier not supported #3129

Closed sbbagal13 closed 1 year ago

sbbagal13 commented 1 year ago

Is the issue already present in https://github.com/cloudera/hue/issues or discussed in the forum https://discourse.gethue.com? No Describe the bug: Table Browser throws below exception while clicking on any table TrinoUserError(type=USER_ERROR, name=SYNTAX_ERROR, message="line 2:6: backquoted identifiers are not supported; use double quotes to quote identifiers", query_id=20221215_173752_00235_mmkqb) Steps to reproduce it? Open Table Browser and click on any table (Trino specific) Hue version or source? (e.g. open source 4.5, CDH 5.16, CDP 1.0...). System info (e.g. OS, Browser...). 4.10

sbbagal13 commented 1 year ago

image

sbbagal13 commented 1 year ago

Anyone facing similar issue ? do we have any workaround for this ?

bjornalm commented 1 year ago

Thanks for reporting.

I cannot reproduce this particular error in our latest build on our demo site, where most of the trino tables can be viewed in the file browser. I did however notice that some tables in the Trino DB collection (e.g. esg > carbon_factor) fail with Hive views are not supported which possibly could be related to your bug since backquotes\backticks could also be Hive specific.

@Harshg999 Any ideas?

Harshg999 commented 1 year ago

Hi @sbbagal13, AFAIK backticks are not supported by Trino. It follows the ANSI SQL standards.

Please share a sample trino specific table for which it is failing for you in Table Browser.

This PR was opened few months back but it was marked stale and got closed without review, can you see if this works for you? https://github.com/cloudera/hue/pull/2854

sbbagal13 commented 1 year ago

hi @Harshg999 Thanks, As shown in my first comment [https://github.com/cloudera/hue/issues/3129#issuecomment-1353470479], All Trino tables are failing in Table Browser. This table is from backend Hive.

Harshg999 commented 1 year ago

@sbbagal13 Can you once check if adding https://github.com/cloudera/hue/pull/2854 fix solves your backtick issue scenario?

sbbagal13 commented 1 year ago

Thanks @Harshg999, Yes PR #2854 fixes the Table browser issue. Any plan to merge this into main stream.

Harshg999 commented 1 year ago

That's great! We'll re-open the PR and merge it.