timeplus-io / proton-python-driver

Python driver for Proton which support Proton native wire protocol
Other
10 stars 3 forks source link

query type low_cardinality(string) column exception in proton-python-client #7

Open jhao0117 opened 2 years ago

jhao0117 commented 2 years ago

create stream test_type (uuid uuid, int int, uint uint8, string string, float float, decimal decimal32(3), date date, datetime datetime, enum enum('a'=1, 'b'=2, 'z'=26), lowcardi low_cardinality(string))

CREATE STREAM test_type ( uuid uuid, int int, uint uint8, string string, float float, decimal decimal32(3), date date, datetime datetime, enum enum('a' = 1, 'b' = 2, 'z' = 26), lowcardi low_cardinality(string) )

Query id: 972f3626-9e2f-432a-a82e-ba4f16d225a4

Ok.

0 rows in set. Elapsed: 1.306 sec.

22c4746c784c :) insert into test_type (uuid, int, uint, string, float, decimal, date, datetime, enum, lowcardi) values (generate_uuidv4(), -1234567, 12345678, '{@string}', 12345.1234, 123456.123, to_date('2022-03-24'), to_datetime('2022-03-24 17:17:17'), 'a', '{@lowcardinalitystring}')

INSERT INTO test_type (uuid, int, uint, string, float, decimal, date, datetime, enum, lowcardi) FORMAT Values

Query id: 28439c00-66e6-4d12-b09b-6e82ed184b62

Ok.

client.execute('select * from table(test_type)') Traceback (most recent call last): File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/columns/service.py", line 106, in get_column_by_spec cls = column_by_type[spec] KeyError: '(string'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/client.py", line 296, in execute rv = self.process_ordinary_query( File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/client.py", line 482, in process_ordinary_query return self.receive_result(with_column_types=with_column_types, File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/client.py", line 143, in receive_result return result.get_result() File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/result.py", line 50, in get_result for packet in self.packet_generator: File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/client.py", line 159, in packet_generator packet = self.receive_packet() File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/client.py", line 173, in receive_packet packet = self.connection.receive_packet() File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/connection.py", line 485, in receive_packet packet.block = self.receive_data() File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/connection.py", line 558, in receive_data return (self.block_in_raw if raw else self.block_in).read() File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/streams/native.py", line 74, in read column = read_column(self.context, column_type, n_rows, File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/columns/service.py", line 115, in read_column column = get_column_by_spec(column_spec, column_options) File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/columns/service.py", line 95, in get_column_by_spec return create_low_cardinality_column(spec, create_column_with_options) File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/columns/lowcardinalitycolumn.py", line 11, in create_low_cardinality_column nested = column_by_spec_getter(inner) File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/columns/service.py", line 68, in create_column_with_options return get_column_by_spec(x, column_options, use_numpy=use_numpy) File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/columns/service.py", line 110, in get_column_by_spec raise errors.UnknownTypeError('Unknown type {}'.format(spec)) clickhouse_driver.errors.UnknownTypeError: Code: 50. Unknown type (string

jovezhong commented 2 years ago

s13

jovezhong commented 2 years ago

(Jove Github Bot) deferred this ticket to the next sprint.

jovezhong commented 2 years ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 2 years ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 2 years ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 1 year ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 1 year ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong commented 1 year ago

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.