timeplus-io / proton-python-driver

Python driver for Timeplus Enterprise or Timeplus Proton
https://timeplus.com
Other
12 stars 3 forks source link

query fixed_string type column exception #6

Open jhao0117 opened 2 years ago

jhao0117 commented 2 years ago
  1. 22c4746c784c :) create stream t_fixed_string(fixeds fixed_string(32))

CREATE STREAM t_fixed_string ( fixeds fixed_string(32) )

Query id: 93d8468a-4886-4878-abe9-013bb8f39054

Ok.

  1. 22c4746c784c :) insert into t_fixed_string(fixeds) values('{@fixed_string32}')

INSERT INTO t_fixed_string (fixeds) FORMAT Values

Query id: 3cb54498-1c85-42eb-a231-30359a7483d9

Ok.

1 rows in set. Elapsed: 0.003 sec.

22c4746c784c :)

  1. 22c4746c784c :) select * from table(t_fixed_string) in proton-client success

SELECT * FROM table(t_fixed_string)

Query id: c0f3e5db-0685-4b96-b8d6-7b4a51727171

┌─fixeds────────────┬────────────────_tp_time─┬──────────_tp_index_time─┐ │ {@fixed_string32} │ 2022-03-24 13:08:17.986 │ 2022-03-24 13:08:18.232 │ └───────────────────┴─────────────────────────┴─────────────────────────┘

1 rows in set. Elapsed: 0.004 sec.

22c4746c784c :) *4. >>> client.execute('select from table(t_fixed_string)')** 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 71, in get_column_by_spec return create_string_column(spec, column_options) File "/Users/jameshao/venvs/proton/lib/python3.9/site-packages/clickhouse_driver/columns/stringcolumn.py", line 71, in create_string_column length = int(spec[12:-1]) ValueError: invalid literal for int() with base 10: '(32'

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 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.