trinodb/trino

Pass through query clickhouse connector problem

Closed this issue · 2 comments

Hello everyone, i have issue when im trying to use query from default CH connector 461 ver
Image

This what i got when using pass-through query
Image

Thats my output with default trino query
Image

ebyhr commented

That should be a limitation at ClickHouse side. Please report to ClickHouse community.

It seems to work for me:

trino> select * from table(clickhouse.system.query(query => 'select * from information_schema.views limit 1'));
                  table_catalog                  |                  table_schema                   |      table_name      |                 view_definition                 | check_option | is_updatable | is_insertable_into | is_trigger_updatable | is_trigger_deletable | is_trigge>
-------------------------------------------------+-------------------------------------------------+----------------------+-------------------------------------------------+--------------+--------------+--------------------+----------------------+----------------------+---------->
 49 4e 46 4f 52 4d 41 54 49 4f 4e 5f 53 43 48 45 | 49 4e 46 4f 52 4d 41 54 49 4f 4e 5f 53 43 48 45 | 43 4f 4c 55 4d 4e 53 | 53 45 4c 45 43 54 20 64 61 74 61 62 61 73 65 20 | 4e 4f 4e 45  | NO           | NO                 | NO                   | NO                   | NO       >
 4d 41                                           | 4d 41                                           |                      | 41 53 20 74 61 62 6c 65 5f 63 61 74 61 6c 6f 67 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 2c 20 64 61 74 61 62 61 73 65 20 41 53 20 74 61 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 62 6c 65 5f 73 63 68 65 6d 61 2c 20 64 61 74 61 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 62 61 73 65 20 41 53 20 54 41 42 4c 45 5f 53 43 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 48 45 4d 41 2c 20 74 61 62 6c 65 20 41 53 20 74 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 61 62 6c 65 5f 6e 61 6d 65 2c 20 74 61 62 6c 65 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 20 41 53 20 54 41 42 4c 45 5f 4e 41 4d 45 2c 20 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 6e 61 6d 65 20 41 53 20 63 6f 6c 75 6d 6e 5f 6e |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 61 6d 65 2c 20 70 6f 73 69 74 69 6f 6e 20 41 53 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 20 6f 72 64 69 6e 61 6c 5f 70 6f 73 69 74 69 6f |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 6e 2c 20 64 65 66 61 75 6c 74 5f 65 78 70 72 65 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 73 73 69 6f 6e 20 41 53 20 63 6f 6c 75 6d 6e 5f |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 64 65 66 61 75 6c 74 2c 20 74 79 70 65 20 4c 49 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 4b 45 20 27 4e 75 6c 6c 61 62 6c 65 28 25 29 27 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 20 41 53 20 69 73 5f 6e 75 6c 6c 61 62 6c 65 2c |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 20 74 79 70 65 20 41 53 20 64 61 74 61 5f 74 79 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 70 65 2c 20 63 68 61 72 61 63 74 65 72 5f 6f 63 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 74 65 74 5f 6c 65 6e 67 74 68 20 41 53 20 63 68 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 61 72 61 63 74 65 72 5f 6d 61 78 69 6d 75 6d 5f |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 6c 65 6e 67 74 68 2c 20 63 68 61 72 61 63 74 65 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 72 5f 6f 63 74 65 74 5f 6c 65 6e 67 74 68 2c 20 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 6e 75 6d 65 72 69 63 5f 70 72 65 63 69 73 69 6f |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 6e 2c 20 6e 75 6d 65 72 69 63 5f 70 72 65 63 69 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 73 69 6f 6e 5f 72 61 64 69 78 2c 20 6e 75 6d 65 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 72 69 63 5f 73 63 61 6c 65 2c 20 64 61 74 65 74 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 69 6d 65 5f 70 72 65 63 69 73 69 6f 6e 2c 20 4e |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 55 4c 4c 20 41 53 20 63 68 61 72 61 63 74 65 72 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 5f 73 65 74 5f 63 61 74 61 6c 6f 67 2c 20 4e 55 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 4c 4c 20 41 53 20 63 68 61 72 61 63 74 65 72 5f |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 73 65 74 5f 73 63 68 65 6d 61 2c 20 4e 55 4c 4c |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 20 41 53 20 63 68 61 72 61 63 74 65 72 5f 73 65 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 74 5f 6e 61 6d 65 2c 20 4e 55 4c 4c 20 41 53 20 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 63 6f 6c 6c 61 74 69 6f 6e 5f 63 61 74 61 6c 6f |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 67 2c 20 4e 55 4c 4c 20 41 53 20 63 6f 6c 6c 61 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 74 69 6f 6e 5f 73 63 68 65 6d 61 2c 20 4e 55 4c |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 4c 20 41 53 20 63 6f 6c 6c 61 74 69 6f 6e 5f 6e |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 61 6d 65 2c 20 4e 55 4c 4c 20 41 53 20 64 6f 6d |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 61 69 6e 5f 63 61 74 61 6c 6f 67 2c 20 4e 55 4c |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 4c 20 41 53 20 64 6f 6d 61 69 6e 5f 73 63 68 65 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 6d 61 2c 20 4e 55 4c 4c 20 41 53 20 64 6f 6d 61 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 69 6e 5f 6e 61 6d 65 2c 20 63 6f 6d 6d 65 6e 74 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 20 41 53 20 63 6f 6c 75 6d 6e 5f 63 6f 6d 6d 65 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 6e 74 2c 20 74 79 70 65 20 41 53 20 63 6f 6c 75 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 6d 6e 5f 74 79 70 65 20 46 52 4f 4d 20 73 79 73 |              |              |                    |                      |                      |          >
                                                 |                                                 |                      | 74 65 6d 2e 63 6f 6c 75 6d 6e 73                |              |              |                    |                      |                      |          >
(1 row)

Tested in ClickHouseQueryRunner (uses ClickHouse 23.8.12.13) + Trino 465.