Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed multidimensional array decode error #206

Merged

Conversation

smagellan
Copy link
Contributor

This PR should fix #204

@xzkostyan
Copy link
Member

CI/CD failed: https://travis-ci.org/github/mymarilyn/clickhouse-driver/builds/765826137.

Please add test from issue to array testcase to cover this case.

It would be nice if we ensure that array column performance will not be degraded. To test it you can query array column with old version and new version of code

You can use following query for example (tune limit if it's necessary):

select arrayJoin(x), x from (select groupArray(number) as x from (select * from system.numbers limit 10000) as t)

To measure performance you can run %prun ipython's magic:

from clickhouse_driver import Client

client = Client('localhost')
%prun client.execute(sql)

@smagellan
Copy link
Contributor Author

smagellan commented Apr 5, 2021

@xzkostyan, how can I run test suite locally against local Clickhouse at port 9000? Is it a correct way :

setup.py test

?

@xzkostyan
Copy link
Member

  • Install test requirements pip install nose freezegun lz4<=3.0.1 zstd clickhouse-cityhash>=1.0.2.1
  • Run python setup.py test

@smagellan
Copy link
Contributor Author

smagellan commented Apr 5, 2021

@xzkostyan,

sql = "select arrayJoin(x), x from (select groupArray(number) as x from (select * from system.numbers limit 10000) as t)"
from clickhouse_driver import Client
client = Client(host='localhost', port='9000', database='default', user='default', password='default')
%prun client.execute(sql)
with new code
1193 function calls (1184 primitive calls) in 78.129 seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
       25   71.179    2.847   71.179    2.847 {method 'read' of 'clickhouse_driver.bufferedreader.BufferedReader' objects}
        2    2.476    1.238    2.476    1.238 arraycolumn.py:142(<listcomp>)
       11    1.774    0.161    1.774    0.161 {method 'unpack' of '_struct.Struct' objects}
        1    1.341    1.341   76.772   76.772 arraycolumn.py:112(_read)
        1    0.819    0.819   78.129   78.129 <string>:1(<module>)
        1    0.273    0.273    0.273    0.273 block.py:63(transposed)
       73    0.258    0.004    0.258    0.004 {clickhouse_driver.varint.read_varint}
        2    0.002    0.001   72.955   36.477 base.py:134(read_items)
        2    0.001    0.000    0.001    0.000 sre_compile.py:276(_optimize_charset)
        2    0.000    0.000    0.000    0.000 {built-in method marshal.loads}
        1    0.000    0.000    0.004    0.004 {built-in method _socket.getaddrinfo}
        5    0.000    0.000    0.000    0.000 {built-in method builtins.__build_class__}
        1    0.000    0.000    0.005    0.005 connection.py:270(_init_connection)
        1    0.000    0.000    0.000    0.000 stringprep.py:2(<module>)
        3    0.000    0.000    0.000    0.000 {method 'flush' of 'clickhouse_driver.bufferedwriter.BufferedWriter' objects}
        1    0.000    0.000    0.000    0.000 {method 'connect' of '_socket.socket' objects}
        1    0.000    0.000   76.772   76.772 arraycolumn.py:45(read_data)
       10    0.000    0.000   77.031    7.703 connection.py:458(receive_packet)
      3/1    0.000    0.000   78.129   78.129 {built-in method builtins.exec}
        3    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:1438(find_spec)
        3    0.000    0.000   76.773   25.591 native.py:54(read)
        2    0.000    0.000    0.000    0.000 {built-in method io.open_code}
        4    0.000    0.000    0.000    0.000 {method 'extend' of 'list' objects}
        7    0.000    0.000    0.000    0.000 {built-in method posix.stat}
        1    0.000    0.000   77.304   77.304 result.py:45(get_result)
        2    0.000    0.000    0.000    0.000 sre_compile.py:413(<listcomp>)
        1    0.000    0.000    0.000    0.000 sre_parse.py:493(_parse)
        2    0.000    0.000    0.001    0.000 <frozen importlib._bootstrap_external>:856(get_code)
        1    0.000    0.000    0.003    0.003 idna.py:3(<module>)
       10    0.000    0.000   77.032    7.703 client.py:145(receive_packet)
       33    0.000    0.000    0.000    0.000 {clickhouse_driver.varint.write_varint}
        8    0.000    0.000    0.273    0.034 result.py:22(store)
        1    0.000    0.000    0.000    0.000 connection.py:558(send_query)
       17    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:64(<listcomp>)
        4    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:301(cache_from_source)
        1    0.000    0.000    0.004    0.004 __init__.py:70(search_function)
        8    0.000    0.000    0.000    0.000 reader.py:24(read_binary_int)
        1    0.000    0.000    0.000    0.000 connection.py:382(receive_hello)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:901(_find_spec)
       16    0.000    0.000    0.000    0.000 writer.py:19(write_binary_bytes)
        2    0.000    0.000    0.000    0.000 {method 'read' of '_io.BufferedReader' objects}
       17    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:62(_path_join)
        1    0.000    0.000    0.004    0.004 connection.py:211(_create_socket)
        4    0.000    0.000    0.000    0.000 block.py:34(__init__)
      2/1    0.000    0.000    0.003    0.003 <frozen importlib._bootstrap>:659(_load_unlocked)
    72/71    0.000    0.000    0.000    0.000 {built-in method builtins.len}
        5    0.000    0.000    0.000    0.000 connection.py:533(receive_progress)
       10    0.000    0.000    0.000    0.000 connection.py:33(__init__)
        6    0.000    0.000    0.000    0.000 progress.py:6(__init__)
       16    0.000    0.000    0.000    0.000 writer.py:14(write_binary_str)
        1    0.000    0.000   77.310   77.310 client.py:190(execute)
        2    0.000    0.000    0.000    0.000 sre_compile.py:411(_mk_bitmap)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:166(_get_module_lock)
      3/2    0.000    0.000    0.000    0.000 service.py:44(get_column_by_spec)
      2/1    0.000    0.000    0.003    0.003 <frozen importlib._bootstrap>:1002(_find_and_load)
        1    0.000    0.000    0.001    0.001 re.py:289(_compile)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:486(_init_module_attrs)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:976(get_data)
        3    0.000    0.000   76.773   25.591 connection.py:522(receive_data)
        1    0.000    0.000    0.005    0.005 connection.py:293(connect)
        3    0.000    0.000    0.000    0.000 block.py:20(read)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:112(release)
        1    0.000    0.000    0.001    0.001 sre_compile.py:759(compile)
       14    0.000    0.000    0.000    0.000 reader.py:16(read_binary_str_fixed_len)
        1    0.000    0.000    0.004    0.004 socket.py:936(getaddrinfo)
       20    0.000    0.000    0.000    0.000 {built-in method builtins.getattr}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:1309(_get_spec)
        1    0.000    0.000    0.000    0.000 clientinfo.py:37(__init__)
        4    0.000    0.000    0.000    0.000 {built-in method _struct.pack}
        2    0.000    0.000    0.000    0.000 sre_compile.py:416(_bytes_to_codes)
      2/1    0.000    0.000    0.003    0.003 <frozen importlib._bootstrap>:967(_find_and_load_unlocked)
        1    0.000    0.000    0.000    0.000 socket.py:220(__init__)
       14    0.000    0.000    0.000    0.000 reader.py:6(read_binary_str)
        1    0.000    0.000    0.001    0.001 sre_compile.py:536(_compile_info)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:585(_compile_bytecode)
       10    0.000    0.000    0.000    0.000 {method 'find' of 'bytearray' objects}
        5    0.000    0.000    0.000    0.000 result.py:143(store_progress)
       14    0.000    0.000    0.000    0.000 reader.py:20(read_binary_bytes_fixed_len)
        5    0.000    0.000    0.000    0.000 __init__.py:1685(isEnabledFor)
        1    0.000    0.000    0.000    0.000 connection.py:368(send_hello)
        1    0.000    0.000    0.000    0.000 clientinfo.py:53(write)
        2    0.000    0.000    0.000    0.000 helpers.py:22(pairwise)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:87(acquire)
        4    0.000    0.000    0.000    0.000 intcolumn.py:43(__init__)
       22    0.000    0.000    0.000    0.000 {built-in method builtins.isinstance}
        2    0.000    0.000    0.000    0.000 {method '__exit__' of '_io._IOBase' objects}
        1    0.000    0.000    0.000    0.000 client.py:174(make_query_settings)
        5    0.000    0.000    0.000    0.000 progress.py:15(read)
        1    0.000    0.000    0.000    0.000 __init__.py:43(normalize_encoding)
       19    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:231(_verbose_message)
        9    0.000    0.000   77.032    8.559 client.py:129(packet_generator)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:636(spec_from_file_location)
        6    0.000    0.000    0.000    0.000 enum.py:646(__new__)
        1    0.000    0.000    0.000    0.000 connection.py:547(send_data)
        7    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:80(_path_stat)
        1    0.000    0.000    0.000    0.000 idna.py:300(getregentry)
        1    0.000    0.000    0.000    0.000 native.py:16(write)
        1    0.000    0.000    0.000    0.000 codecs.py:94(__new__)
        1    0.000    0.000   77.304   77.304 client.py:102(receive_result)
        2    0.000    0.000    0.000    0.000 {built-in method itertools.tee}
       41    0.000    0.000    0.000    0.000 {method 'append' of 'list' objects}
        6    0.000    0.000    0.000    0.000 enum.py:334(__call__)
      2/1    0.000    0.000    0.003    0.003 <frozen importlib._bootstrap_external>:784(exec_module)
        7    0.000    0.000    0.000    0.000 sre_parse.py:233(__next)
        1    0.000    0.000   77.305   77.305 client.py:438(process_ordinary_query)
        4    0.000    0.000    0.000    0.000 writer.py:24(write_binary_int)
        6    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:51(_unpack_uint32)
        1    0.000    0.000    0.003    0.003 {built-in method builtins.__import__}
        1    0.000    0.000    0.000    0.000 sre_parse.py:937(parse)
        2    0.000    0.000   76.773   38.386 service.py:92(read_column)
       22    0.000    0.000    0.000    0.000 {method 'join' of 'str' objects}
        2    0.000    0.000    0.000    0.000 sre_compile.py:249(_compile_charset)
        1    0.000    0.000    0.000    0.000 sre_compile.py:71(_compile)
       18    0.000    0.000    0.000    0.000 {method 'encode' of 'str' objects}
        1    0.000    0.000    0.000    0.000 idna.py:147(encode)
       38    0.000    0.000    0.000    0.000 {method 'rstrip' of 'str' objects}
        6    0.000    0.000    0.000    0.000 base.py:18(__init__)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:558(module_from_spec)
        5    0.000    0.000    0.000    0.000 progress.py:27(increment)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:500(_classify_pyc)
        2    0.000    0.000    0.000    0.000 {method 'tolist' of 'memoryview' objects}
        1    0.000    0.000    0.000    0.000 connection.py:45(__init__)
       16    0.000    0.000    0.000    0.000 {method 'rpartition' of 'str' objects}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:58(__init__)
        1    0.000    0.000    0.000    0.000 sre_parse.py:174(getwidth)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:431(_get_cached)
        1    0.000    0.000    0.000    0.000 connection.py:597(send_external_tables)
        1    0.000    0.000    0.000    0.000 sre_parse.py:435(_parse_sub)
        4    0.000    0.000    0.000    0.000 intcolumn.py:14(__init__)
        1    0.000    0.000    0.000    0.000 getpass.py:154(getuser)
       15    0.000    0.000    0.000    0.000 {method 'decode' of 'bytes' objects}
        1    0.000    0.000    0.000    0.000 enum.py:948(__and__)
        1    0.000    0.000    0.000    0.000 {built-in method _socket.gethostname}
        4    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:68(_path_split)
        5    0.000    0.000    0.000    0.000 __init__.py:1420(debug)
        1    0.000    0.000    0.001    0.001 sre_compile.py:598(_code)
        2    0.000    0.000   72.955   36.477 base.py:94(_read_data)
        4    0.000    0.000    0.000    0.000 socket.py:99(_intenum_converter)
        2    0.000    0.000    0.000    0.000 {method 'settimeout' of '_socket.socket' objects}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:1433(_get_spec)
       11    0.000    0.000    0.000    0.000 {method 'copy' of 'dict' objects}
        2    0.000    0.000    0.000    0.000 blockstreamprofileinfo.py:6(__init__)
        6    0.000    0.000    0.000    0.000 context.py:25(client_settings)
        1    0.000    0.000    0.000    0.000 os.py:674(__getitem__)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:185(cb)
        1    0.000    0.000    0.000    0.000 result.py:135(__init__)
        1    0.000    0.000    0.000    0.000 __init__.py:223(_releaseLock)
        4    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:385(cached)
        1    0.000    0.000    0.000    0.000 {method 'setsockopt' of '_socket.socket' objects}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:533(_validate_timestamp_pyc)
        2    0.000    0.000    0.000    0.000 base.py:123(make_struct)
       20    0.000    0.000    0.000    0.000 {method 'write' of 'clickhouse_driver.bufferedwriter.BufferedWriter' objects}
        6    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:878(__exit__)
        1    0.000    0.000    0.000    0.000 sre_parse.py:224(__init__)
        1    0.000    0.000    0.000    0.000 sre_parse.py:432(_uniq)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:156(__enter__)
        6    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:874(__enter__)
        6    0.000    0.000    0.000    0.000 sre_parse.py:254(get)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:463(_check_name_wrapper)
        1    0.000    0.000    0.000    0.000 arraycolumn.py:147(create_array_column)
        4    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:1272(_path_importer_cache)
        1    0.000    0.000    0.000    0.000 block.py:10(write)
        7    0.000    0.000    0.000    0.000 {built-in method builtins.hasattr}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:1341(find_spec)
        2    0.000    0.000    0.000    0.000 native.py:48(__init__)
        5    0.000    0.000    0.000    0.000 reader.py:49(read_binary_uint8)
        1    0.000    0.000    0.000    0.000 result.py:10(__init__)
       10    0.000    0.000    0.000    0.000 {built-in method _imp.release_lock}
        3    0.000    0.000    0.000    0.000 {method 'format' of 'str' objects}
       10    0.000    0.000    0.000    0.000 {built-in method _imp.acquire_lock}
        3    0.000    0.000    0.000    0.000 block.py:80(num_rows)
        1    0.000    0.000    0.000    0.000 {built-in method _sre.compile}
        1    0.000    0.000    0.000    0.000 __init__.py:214(_acquireLock)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:35(_new_module)
        2    0.000    0.000    0.000    0.000 {method 'translate' of 'bytearray' objects}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:90(_path_is_mode_type)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:811(find_spec)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:160(__exit__)
       23    0.000    0.000    0.000    0.000 {method 'startswith' of 'str' objects}
        3    0.000    0.000    0.000    0.000 writer.py:48(write_binary_uint8)
        1    0.000    0.000    0.000    0.000 writer.py:10(write_settings)
        7    0.000    0.000    0.000    0.000 {method 'get' of 'dict' objects}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:736(find_spec)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:1017(path_stats)
        1    0.000    0.000    0.000    0.000 connection.py:503(get_block_in_stream)
        2    0.000    0.000    0.000    0.000 {method 'cast' of 'memoryview' objects}
        3    0.000    0.000    0.000    0.000 block.py:68(normalize)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:351(__init__)
        4    0.000    0.000    0.000    0.000 {built-in method time.time}
        1    0.000    0.000    0.000    0.000 sre_compile.py:461(_get_literal_prefix)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:99(_path_isfile)
      2/1    0.000    0.000    0.003    0.003 <frozen importlib._bootstrap>:220(_call_with_frames_removed)
        2    0.000    0.000    0.000    0.000 sre_parse.py:286(tell)
        2    0.000    0.000    0.000    0.000 arraycolumn.py:30(__init__)
        6    0.000    0.000    0.000    0.000 {built-in method from_bytes}
        1    0.000    0.000    0.005    0.005 connection.py:203(force_connect)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:398(parent)
        6    0.000    0.000    0.000    0.000 sre_parse.py:249(match)
        1    0.000    0.000    0.000    0.000 connection.py:511(get_block_out_stream)
        3    0.000    0.000    0.000    0.000 {built-in method builtins.min}
        1    0.000    0.000    0.000    0.000 native.py:10(__init__)
        1    0.000    0.000    0.000    0.000 sre_parse.py:921(fix_flags)
        1    0.000    0.000    0.000    0.000 sre_compile.py:492(_get_charset_prefix)
        4    0.000    0.000    0.000    0.000 {method '__exit__' of '_thread.lock' objects}
        1    0.000    0.000    0.000    0.000 {built-in method _imp.is_builtin}
        2    0.000    0.000    0.000    0.000 {method 'endswith' of 'str' objects}
        1    0.000    0.000    0.000    0.000 _collections_abc.py:759(get)
        1    0.000    0.000    0.000    0.000 {built-in method builtins.setattr}
        1    0.000    0.000    0.000    0.000 os.py:754(encode)
        1    0.000    0.000    0.000    0.000 {built-in method fromkeys}
        1    0.000    0.000    0.000    0.000 __init__.py:1671(getEffectiveLevel)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:152(__init__)
        1    0.000    0.000    0.000    0.000 sre_parse.py:76(__init__)
        1    0.000    0.000    0.000    0.000 base.py:86(read_data)
        1    0.000    0.000    0.000    0.000 sre_parse.py:111(__init__)
        6    0.000    0.000    0.000    0.000 {built-in method posix.fspath}
        1    0.000    0.000    0.000    0.000 context.py:29(client_settings)
        2    0.000    0.000    0.000    0.000 sre_compile.py:595(isstring)
        4    0.000    0.000    0.000    0.000 {built-in method _thread.allocate_lock}
        1    0.000    0.000    0.000    0.000 blockstreamprofileinfo.py:16(read)
        4    0.000    0.000    0.000    0.000 context.py:9(server_info)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:946(__init__)
        1    0.000    0.000    0.273    0.273 block.py:87(get_rows)
        2    0.000    0.000    0.000    0.000 block.py:137(num_rows)
        3    0.000    0.000    0.000    0.000 block.py:76(num_columns)
        3    0.000    0.000    0.000    0.000 reader.py:41(read_binary_int32)
        2    0.000    0.000    0.000    0.000 {built-in method _imp.is_frozen}
        2    0.000    0.000    0.000    0.000 sre_parse.py:81(groups)
        1    0.000    0.000    0.000    0.000 block.py:133(num_columns)
        4    0.000    0.000    0.000    0.000 {built-in method _thread.get_ident}
        1    0.000    0.000    0.000    0.000 idna.py:146(Codec)
        1    0.000    0.000    0.000    0.000 native.py:43(finalize)
        1    0.000    0.000    0.000    0.000 sre_parse.py:164(__getitem__)
        4    0.000    0.000    0.000    0.000 {built-in method builtins.ord}
        1    0.000    0.000    0.000    0.000 connection.py:538(receive_profile_info)
        1    0.000    0.000    0.000    0.000 context.py:17(settings)
        1    0.000    0.000    0.001    0.001 re.py:250(compile)
        2    0.000    0.000    0.000    0.000 {built-in method _imp._fix_co_filename}
        4    0.000    0.000    0.000    0.000 {method 'isalnum' of 'str' objects}
        1    0.000    0.000    0.000    0.000 context.py:21(settings)
        2    0.000    0.000    0.000    0.000 {method 'pop' of 'dict' objects}
        1    0.000    0.000    0.000    0.000 sre_parse.py:172(append)
        2    0.000    0.000    0.000    0.000 sre_compile.py:453(_get_iscased)
        1    0.000    0.000    0.000    0.000 {method 'acquire' of '_thread.RLock' objects}
        1    0.000    0.000    0.000    0.000 clientinfo.py:49(empty)
        2    0.000    0.000    0.000    0.000 {built-in method builtins.next}
        1    0.000    0.000    0.000    0.000 {built-in method __new__ of type object at 0x906da0}
        1    0.000    0.000    0.000    0.000 sre_parse.py:160(__len__)
        1    0.000    0.000    0.000    0.000 block.py:101(_check_all_columns_equal_length)
        1    0.000    0.000    0.000    0.000 idna.py:218(IncrementalEncoder)
        1    0.000    0.000    0.000    0.000 os.py:758(decode)
        1    0.000    0.000    0.000    0.000 {method 'split' of 'bytes' objects}
        1    0.000    0.000    0.000    0.000 writer.py:40(write_binary_int32)
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}
        3    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:40(_relax_case)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:971(get_filename)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:406(has_location)
        1    0.000    0.000    0.000    0.000 context.py:13(server_info)
        1    0.000    0.000    0.000    0.000 block.py:93(_check_number_of_columns)
        2    0.000    0.000    0.000    0.000 {method 'items' of 'dict' objects}
        1    0.000    0.000    0.000    0.000 service.py:52(create_column_with_options)
        1    0.000    0.000    0.000    0.000 idna.py:253(IncrementalDecoder)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:781(create_module)
        1    0.000    0.000    0.000    0.000 idna.py:292(StreamWriter)
        1    0.000    0.000    0.000    0.000 block.py:116(normalize)
        1    0.000    0.000    0.000    0.000 {method 'update' of 'dict' objects}
        1    0.000    0.000    0.000    0.000 {method 'release' of '_thread.RLock' objects}
        1    0.000    0.000    0.000    0.000 __init__.py:1272(disable)
        1    0.000    0.000    0.000    0.000 arraycolumn.py:106(read_state_prefix)
        1    0.000    0.000    0.000    0.000 {method 'replace' of 'str' objects}
        1    0.000    0.000    0.000    0.000 result.py:140(store_profile)
        1    0.000    0.000    0.000    0.000 idna.py:295(StreamReader)
        2    0.000    0.000    0.000    0.000 base.py:109(read_state_prefix)
        1    0.000    0.000    0.000    0.000 result.py:149(store_elapsed)
with old code
1210 function calls (1201 primitive calls) in 138.951 seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
       25  128.415    5.137  128.415    5.137 {method 'read' of 'clickhouse_driver.bufferedreader.BufferedReader' objects}
       11    4.400    0.400    4.400    0.400 {method 'unpack' of '_struct.Struct' objects}
        1    2.585    2.585  137.455  137.455 arraycolumn.py:113(_read)
        1    2.018    2.018    2.018    2.018 arraycolumn.py:165(<listcomp>)
        1    0.845    0.845  138.951  138.951 <string>:1(<module>)
       79    0.376    0.005    0.376    0.005 {clickhouse_driver.varint.read_varint}
        1    0.270    0.270    0.270    0.270 block.py:63(transposed)
        2    0.036    0.018  132.851   66.425 base.py:134(read_items)
        2    0.000    0.000    0.001    0.000 sre_compile.py:276(_optimize_charset)
        1    0.000    0.000    0.002    0.002 {built-in method _socket.getaddrinfo}
        2    0.000    0.000    0.000    0.000 {built-in method marshal.loads}
        5    0.000    0.000    0.000    0.000 {built-in method builtins.__build_class__}
        1    0.000    0.000    0.003    0.003 connection.py:270(_init_connection)
        1    0.000    0.000  137.455  137.455 arraycolumn.py:46(read_data)
       11    0.000    0.000  137.832   12.530 connection.py:458(receive_packet)
        1    0.000    0.000    0.000    0.000 stringprep.py:2(<module>)
        3    0.000    0.000  137.456   45.819 native.py:54(read)
        4    0.000    0.000    0.000    0.000 {method 'extend' of 'list' objects}
        2    0.000    0.000    0.000    0.000 {built-in method io.open_code}
        1    0.000    0.000    0.000    0.000 {method 'connect' of '_socket.socket' objects}
        1    0.000    0.000  138.102  138.102 result.py:45(get_result)
        3    0.000    0.000    0.000    0.000 {method 'flush' of 'clickhouse_driver.bufferedwriter.BufferedWriter' objects}
      3/2    0.000    0.000    0.000    0.000 service.py:44(get_column_by_spec)
      3/1    0.000    0.000  138.951  138.951 {built-in method builtins.exec}
        7    0.000    0.000    0.000    0.000 {built-in method posix.stat}
        3    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:1438(find_spec)
       11    0.000    0.000  137.832   12.530 client.py:145(receive_packet)
        9    0.000    0.000    0.270    0.030 result.py:22(store)
        6    0.000    0.000    0.000    0.000 connection.py:533(receive_progress)
        7    0.000    0.000    0.000    0.000 progress.py:6(__init__)
        2    0.000    0.000    0.000    0.000 sre_compile.py:413(<listcomp>)
        8    0.000    0.000    0.000    0.000 reader.py:24(read_binary_int)
        2    0.000    0.000  137.455   68.728 service.py:92(read_column)
        1    0.000    0.000    0.000    0.000 sre_parse.py:493(_parse)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:856(get_code)
        1    0.000    0.000    0.001    0.001 idna.py:3(<module>)
      2/1    0.000    0.000    0.002    0.002 <frozen importlib._bootstrap>:659(_load_unlocked)
       11    0.000    0.000    0.000    0.000 connection.py:33(__init__)
        1    0.000    0.000    0.002    0.002 connection.py:211(_create_socket)
        6    0.000    0.000    0.000    0.000 progress.py:15(read)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:901(_find_spec)
       33    0.000    0.000    0.000    0.000 {clickhouse_driver.varint.write_varint}
        1    0.000    0.000    0.002    0.002 __init__.py:70(search_function)
        4    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:301(cache_from_source)
        1    0.000    0.000    0.000    0.000 helpers.py:22(pairwise)
        2    0.000    0.000    0.000    0.000 {method 'read' of '_io.BufferedReader' objects}
        4    0.000    0.000    0.000    0.000 block.py:34(__init__)
       17    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:64(<listcomp>)
       17    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:62(_path_join)
        3    0.000    0.000  137.456   45.819 connection.py:522(receive_data)
       14    0.000    0.000    0.000    0.000 reader.py:16(read_binary_str_fixed_len)
       16    0.000    0.000    0.000    0.000 writer.py:19(write_binary_bytes)
        1    0.000    0.000    0.000    0.000 client.py:174(make_query_settings)
       21    0.000    0.000    0.000    0.000 {built-in method builtins.getattr}
      2/1    0.000    0.000    0.002    0.002 <frozen importlib._bootstrap>:1002(_find_and_load)
       10    0.000    0.000  137.832   13.783 client.py:129(packet_generator)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:976(get_data)
        3    0.000    0.000    0.000    0.000 block.py:20(read)
        6    0.000    0.000    0.000    0.000 progress.py:27(increment)
        2    0.000    0.000    0.000    0.000 base.py:123(make_struct)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:166(_get_module_lock)
    71/70    0.000    0.000    0.000    0.000 {built-in method builtins.len}
        1    0.000    0.000    0.000    0.000 {built-in method itertools.tee}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:486(_init_module_attrs)
        2    0.000    0.000    0.000    0.000 sre_compile.py:411(_mk_bitmap)
        1    0.000    0.000    0.000    0.000 connection.py:382(receive_hello)
       14    0.000    0.000    0.000    0.000 reader.py:6(read_binary_str)
        1    0.000    0.000    0.001    0.001 sre_compile.py:759(compile)
        2    0.000    0.000    0.000    0.000 {method 'appendleft' of 'collections.deque' objects}
        1    0.000    0.000    0.001    0.001 re.py:289(_compile)
        4    0.000    0.000    0.000    0.000 intcolumn.py:43(__init__)
        1    0.000    0.000  138.105  138.105 client.py:190(execute)
        1    0.000    0.000    0.000    0.000 connection.py:558(send_query)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:87(acquire)
        1    0.000    0.000    0.000    0.000 socket.py:220(__init__)
        6    0.000    0.000    0.000    0.000 base.py:18(__init__)
       16    0.000    0.000    0.000    0.000 writer.py:14(write_binary_str)
      2/1    0.000    0.000    0.002    0.002 <frozen importlib._bootstrap>:967(_find_and_load_unlocked)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:1309(_get_spec)
        1    0.000    0.000    0.000    0.000 sre_compile.py:536(_compile_info)
        2    0.000    0.000    0.000    0.000 sre_compile.py:416(_bytes_to_codes)
        2    0.000    0.000  132.851   66.425 base.py:94(_read_data)
       10    0.000    0.000    0.000    0.000 {method 'find' of 'bytearray' objects}
        6    0.000    0.000    0.000    0.000 result.py:143(store_progress)
        1    0.000    0.000    0.000    0.000 __init__.py:43(normalize_encoding)
        1    0.000    0.000  138.102  138.102 client.py:438(process_ordinary_query)
        1    0.000    0.000    0.000    0.000 clientinfo.py:37(__init__)
       22    0.000    0.000    0.000    0.000 {built-in method builtins.isinstance}
        5    0.000    0.000    0.000    0.000 __init__.py:1685(isEnabledFor)
        1    0.000    0.000    0.002    0.002 socket.py:936(getaddrinfo)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:585(_compile_bytecode)
       14    0.000    0.000    0.000    0.000 reader.py:20(read_binary_bytes_fixed_len)
        1    0.000    0.000    0.000    0.000 connection.py:368(send_hello)
        2    0.000    0.000    0.000    0.000 {method '__exit__' of '_io._IOBase' objects}
       42    0.000    0.000    0.000    0.000 {method 'append' of 'list' objects}
        1    0.000    0.000    0.003    0.003 connection.py:293(connect)
        1    0.000    0.000    0.000    0.000 clientinfo.py:53(write)
        4    0.000    0.000    0.000    0.000 intcolumn.py:14(__init__)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:636(spec_from_file_location)
        4    0.000    0.000    0.000    0.000 {built-in method _struct.pack}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:431(_get_cached)
        4    0.000    0.000    0.000    0.000 writer.py:24(write_binary_int)
       19    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:231(_verbose_message)
       15    0.000    0.000    0.000    0.000 {method 'decode' of 'bytes' objects}
        6    0.000    0.000    0.000    0.000 enum.py:334(__call__)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:112(release)
        3    0.000    0.000    0.000    0.000 {method 'format' of 'str' objects}
        1    0.000    0.000    0.002    0.002 {built-in method builtins.__import__}
        1    0.000    0.000    0.000    0.000 sre_parse.py:937(parse)
        1    0.000    0.000    0.000    0.000 idna.py:300(getregentry)
        1    0.000    0.000    0.000    0.000 codecs.py:94(__new__)
        6    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:51(_unpack_uint32)
        7    0.000    0.000    0.000    0.000 sre_parse.py:233(__next)
      2/1    0.000    0.000    0.002    0.002 <frozen importlib._bootstrap_external>:784(exec_module)
       22    0.000    0.000    0.000    0.000 {method 'join' of 'str' objects}
        1    0.000    0.000    0.000    0.000 native.py:16(write)
        1    0.000    0.000    0.000    0.000 connection.py:547(send_data)
        1    0.000    0.000    0.000    0.000 sre_compile.py:71(_compile)
        1    0.000    0.000    0.000    0.000 idna.py:147(encode)
        7    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:80(_path_stat)
        6    0.000    0.000    0.000    0.000 context.py:25(client_settings)
        2    0.000    0.000    0.000    0.000 sre_compile.py:249(_compile_charset)
        1    0.000    0.000    0.000    0.000 sre_parse.py:174(getwidth)
        6    0.000    0.000    0.000    0.000 enum.py:646(__new__)
       11    0.000    0.000    0.000    0.000 {method 'copy' of 'dict' objects}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:558(module_from_spec)
        1    0.000    0.000    0.000    0.000 os.py:674(__getitem__)
        1    0.000    0.000    0.000    0.000 sre_parse.py:435(_parse_sub)
       23    0.000    0.000    0.000    0.000 {method 'startswith' of 'str' objects}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:500(_classify_pyc)
       18    0.000    0.000    0.000    0.000 {method 'encode' of 'str' objects}
        2    0.000    0.000    0.000    0.000 {method 'tolist' of 'memoryview' objects}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:58(__init__)
        1    0.000    0.000    0.000    0.000 enum.py:948(__and__)
       16    0.000    0.000    0.000    0.000 {method 'rpartition' of 'str' objects}
       38    0.000    0.000    0.000    0.000 {method 'rstrip' of 'str' objects}
        1    0.000    0.000    0.000    0.000 sre_compile.py:492(_get_charset_prefix)
        4    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:68(_path_split)
        1    0.000    0.000    0.000    0.000 connection.py:597(send_external_tables)
        1    0.000    0.000    0.000    0.000 connection.py:45(__init__)
        2    0.000    0.000    0.000    0.000 {method 'settimeout' of '_socket.socket' objects}
        5    0.000    0.000    0.000    0.000 reader.py:49(read_binary_uint8)
        1    0.000    0.000    0.000    0.000 getpass.py:154(getuser)
        1    0.000    0.000    0.000    0.000 __init__.py:223(_releaseLock)
        5    0.000    0.000    0.000    0.000 __init__.py:1420(debug)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:1433(_get_spec)
        4    0.000    0.000    0.000    0.000 socket.py:99(_intenum_converter)
        1    0.000    0.000  138.102  138.102 client.py:102(receive_result)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:185(cb)
        1    0.000    0.000    0.001    0.001 sre_compile.py:598(_code)
        2    0.000    0.000    0.000    0.000 blockstreamprofileinfo.py:6(__init__)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:156(__enter__)
        4    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:385(cached)
        1    0.000    0.000    0.000    0.000 {method 'setsockopt' of '_socket.socket' objects}
        1    0.000    0.000    0.000    0.000 result.py:135(__init__)
        2    0.000    0.000    0.000    0.000 arraycolumn.py:31(__init__)
        1    0.000    0.000    0.000    0.000 {built-in method _socket.gethostname}
        6    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:878(__exit__)
        6    0.000    0.000    0.000    0.000 sre_parse.py:254(get)
        6    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:874(__enter__)
        1    0.000    0.000    0.000    0.000 connection.py:511(get_block_out_stream)
        7    0.000    0.000    0.000    0.000 {built-in method builtins.hasattr}
        1    0.000    0.000    0.000    0.000 arraycolumn.py:170(create_array_column)
        1    0.000    0.000    0.000    0.000 sre_parse.py:432(_uniq)
        1    0.000    0.000    0.000    0.000 base.py:86(read_data)
       20    0.000    0.000    0.000    0.000 {method 'write' of 'clickhouse_driver.bufferedwriter.BufferedWriter' objects}
        3    0.000    0.000    0.000    0.000 block.py:68(normalize)
        4    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:1272(_path_importer_cache)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:533(_validate_timestamp_pyc)
        1    0.000    0.000    0.000    0.000 blockstreamprofileinfo.py:16(read)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:463(_check_name_wrapper)
        3    0.000    0.000    0.000    0.000 block.py:80(num_rows)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:1341(find_spec)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:946(__init__)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:351(__init__)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:35(_new_module)
        1    0.000    0.000    0.000    0.000 result.py:10(__init__)
        1    0.000    0.000    0.000    0.000 {built-in method _sre.compile}
        1    0.000    0.000    0.000    0.000 sre_parse.py:224(__init__)
        2    0.000    0.000    0.000    0.000 native.py:48(__init__)
       10    0.000    0.000    0.000    0.000 {built-in method _imp.release_lock}
        7    0.000    0.000    0.000    0.000 {method 'get' of 'dict' objects}
        3    0.000    0.000    0.000    0.000 reader.py:41(read_binary_int32)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:1017(path_stats)
        2    0.000    0.000    0.000    0.000 {method 'translate' of 'bytearray' objects}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:90(_path_is_mode_type)
        1    0.000    0.000    0.000    0.000 __init__.py:214(_acquireLock)
        1    0.000    0.000    0.000    0.000 block.py:10(write)
        4    0.000    0.000    0.000    0.000 {built-in method time.time}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:160(__exit__)
       10    0.000    0.000    0.000    0.000 {built-in method _imp.acquire_lock}
        6    0.000    0.000    0.000    0.000 sre_parse.py:249(match)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:811(find_spec)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:736(find_spec)
        3    0.000    0.000    0.000    0.000 writer.py:48(write_binary_uint8)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:99(_path_isfile)
        1    0.000    0.000    0.000    0.000 sre_parse.py:921(fix_flags)
        2    0.000    0.000    0.000    0.000 {method 'cast' of 'memoryview' objects}
        1    0.000    0.000    0.000    0.000 sre_compile.py:461(_get_literal_prefix)
        1    0.000    0.000    0.000    0.000 writer.py:10(write_settings)
        1    0.000    0.000    0.000    0.000 connection.py:503(get_block_in_stream)
      2/1    0.000    0.000    0.001    0.001 <frozen importlib._bootstrap>:220(_call_with_frames_removed)
        6    0.000    0.000    0.000    0.000 {built-in method from_bytes}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:398(parent)
        1    0.000    0.000    0.000    0.000 _collections_abc.py:759(get)
        3    0.000    0.000    0.000    0.000 {built-in method builtins.min}
        1    0.000    0.000    0.000    0.000 connection.py:538(receive_profile_info)
        2    0.000    0.000    0.000    0.000 sre_parse.py:286(tell)
        1    0.000    0.000    0.000    0.000 {built-in method builtins.setattr}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:152(__init__)
        2    0.000    0.000    0.000    0.000 {method 'endswith' of 'str' objects}
        1    0.000    0.000    0.000    0.000 __init__.py:1671(getEffectiveLevel)
        1    0.000    0.000    0.000    0.000 os.py:754(encode)
        1    0.000    0.000    0.003    0.003 connection.py:203(force_connect)
        4    0.000    0.000    0.000    0.000 {method '__exit__' of '_thread.lock' objects}
        6    0.000    0.000    0.000    0.000 {built-in method posix.fspath}
        2    0.000    0.000    0.000    0.000 sre_compile.py:595(isstring)
        3    0.000    0.000    0.000    0.000 block.py:76(num_columns)
        1    0.000    0.000    0.000    0.000 {built-in method fromkeys}
        1    0.000    0.000    0.000    0.000 context.py:29(client_settings)
        1    0.000    0.000    0.000    0.000 {built-in method _imp.is_builtin}
        1    0.000    0.000    0.000    0.000 sre_parse.py:76(__init__)
        1    0.000    0.000    0.270    0.270 block.py:87(get_rows)
        1    0.000    0.000    0.000    0.000 sre_parse.py:111(__init__)
        4    0.000    0.000    0.000    0.000 {built-in method _thread.get_ident}
        4    0.000    0.000    0.000    0.000 {built-in method _thread.allocate_lock}
        4    0.000    0.000    0.000    0.000 context.py:9(server_info)
        1    0.000    0.000    0.000    0.000 native.py:10(__init__)
        2    0.000    0.000    0.000    0.000 {built-in method _imp.is_frozen}
        1    0.000    0.000    0.000    0.000 service.py:52(create_column_with_options)
        1    0.000    0.000    0.000    0.000 sre_parse.py:164(__getitem__)
        1    0.000    0.000    0.001    0.001 re.py:250(compile)
        1    0.000    0.000    0.000    0.000 block.py:101(_check_all_columns_equal_length)
        1    0.000    0.000    0.000    0.000 block.py:93(_check_number_of_columns)
        2    0.000    0.000    0.000    0.000 block.py:137(num_rows)
        2    0.000    0.000    0.000    0.000 sre_parse.py:81(groups)
        1    0.000    0.000    0.000    0.000 context.py:17(settings)
        1    0.000    0.000    0.000    0.000 block.py:133(num_columns)
        1    0.000    0.000    0.000    0.000 idna.py:146(Codec)
        4    0.000    0.000    0.000    0.000 {method 'isalnum' of 'str' objects}
        1    0.000    0.000    0.000    0.000 {method 'acquire' of '_thread.RLock' objects}
        1    0.000    0.000    0.000    0.000 {built-in method builtins.next}
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}
        2    0.000    0.000    0.000    0.000 {method 'pop' of 'dict' objects}
        4    0.000    0.000    0.000    0.000 {built-in method builtins.ord}
        1    0.000    0.000    0.000    0.000 native.py:43(finalize)
        1    0.000    0.000    0.000    0.000 sre_parse.py:172(append)
        2    0.000    0.000    0.000    0.000 sre_compile.py:453(_get_iscased)
        1    0.000    0.000    0.000    0.000 context.py:21(settings)
        3    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:40(_relax_case)
        2    0.000    0.000    0.000    0.000 {built-in method _imp._fix_co_filename}
        1    0.000    0.000    0.000    0.000 arraycolumn.py:107(read_state_prefix)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:971(get_filename)
        1    0.000    0.000    0.000    0.000 __init__.py:1272(disable)
        1    0.000    0.000    0.000    0.000 sre_parse.py:160(__len__)
        1    0.000    0.000    0.000    0.000 {method 'split' of 'bytes' objects}
        1    0.000    0.000    0.000    0.000 os.py:758(decode)
        2    0.000    0.000    0.000    0.000 {method 'items' of 'dict' objects}
        1    0.000    0.000    0.000    0.000 idna.py:218(IncrementalEncoder)
        1    0.000    0.000    0.000    0.000 {built-in method __new__ of type object at 0x906da0}
        1    0.000    0.000    0.000    0.000 clientinfo.py:49(empty)
        1    0.000    0.000    0.000    0.000 writer.py:40(write_binary_int32)
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap>:406(has_location)
        1    0.000    0.000    0.000    0.000 result.py:140(store_profile)
        2    0.000    0.000    0.000    0.000 base.py:109(read_state_prefix)
        1    0.000    0.000    0.000    0.000 {method 'update' of 'dict' objects}
        1    0.000    0.000    0.000    0.000 block.py:116(normalize)
        1    0.000    0.000    0.000    0.000 context.py:13(server_info)
        1    0.000    0.000    0.000    0.000 {method 'release' of '_thread.RLock' objects}
        2    0.000    0.000    0.000    0.000 {method 'pop' of 'collections.deque' objects}
        2    0.000    0.000    0.000    0.000 <frozen importlib._bootstrap_external>:781(create_module)
        1    0.000    0.000    0.000    0.000 result.py:149(store_elapsed)
        1    0.000    0.000    0.000    0.000 {method 'replace' of 'str' objects}
        1    0.000    0.000    0.000    0.000 idna.py:253(IncrementalDecoder)
        1    0.000    0.000    0.000    0.000 idna.py:292(StreamWriter)
        1    0.000    0.000    0.000    0.000 idna.py:295(StreamReader)

New version looks better

@smagellan
Copy link
Contributor Author

smagellan commented Apr 5, 2021

Why do you python-folks hate semicolon so much?

@coveralls
Copy link

coveralls commented Apr 5, 2021

Coverage Status

Coverage decreased (-0.01%) to 95.987% when pulling b6bbf09 on smagellan:feature/fix-array-decode-error into ce23f99 on mymarilyn:master.

@smagellan
Copy link
Contributor Author

smagellan commented Apr 5, 2021

Looks like LowCardinality encoder is broken for 18.* (test_multidimensional passes without LowCardinality spec, at least with 18.12.17 db)

FAIL: test_multidimensional (tests.columns.test_array.ArrayTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/mymarilyn/clickhouse-driver/tests/columns/test_array.py", line 124, in test_multidimensional
    '[[[\'str1_1\',\'str1_2\',NULL],[NULL]],'
AssertionError: "[[['str1_1','str1_2',''],['']],[['str1_3','str1_4',''],['']]]\[63 chars]]]\n" != "[[['str1_1','str1_2',NULL],[NULL]],[['str1_3','str1_4',NULL],[[79 chars]]]\n"
- [[['str1_1','str1_2',''],['']],[['str1_3','str1_4',''],['']]]
?                      ^^   ^^                       ^^   ^^
+ [[['str1_1','str1_2',NULL],[NULL]],[['str1_3','str1_4',NULL],[NULL]]]
?                      ^^^^   ^^^^                       ^^^^   ^^^^
- [[['str2_1','str2_2',''],['']]]
?                      ^^   ^^
+ [[['str2_1','str2_2',NULL],[NULL]]]
?                      ^^^^   ^^^^
- [[['str3_1','str3_2',''],['']]]
?                      ^^   ^^
+ [[['str3_1','str3_2',NULL],[NULL]]]
?                      ^^^^   ^^^^

@smagellan
Copy link
Contributor Author

smagellan commented Apr 5, 2021

Ok, maybe unsupported LowCardinality is OK, found that in logs:

test_array (tests.columns.test_low_cardinality.LowCardinalityTestCase) ... SKIP: Mininum revision required: 19.3.3

@xzkostyan xzkostyan merged commit d3f9314 into mymarilyn:master Apr 6, 2021
@xzkostyan
Copy link
Member

Good job!

@smagellan
Copy link
Contributor Author

@xzkostyan Thank you!

@smagellan smagellan deleted the feature/fix-array-decode-error branch October 17, 2021 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multidimensional array decode error
3 participants