Search is not available for this dataset
identifier stringlengths 1 155 | parameters stringlengths 2 6.09k | docstring stringlengths 11 63.4k | docstring_summary stringlengths 0 63.4k | function stringlengths 29 99.8k | function_tokens list | start_point list | end_point list | language stringclasses 1
value | docstring_language stringlengths 2 7 | docstring_language_predictions stringlengths 18 23 | is_langid_reliable stringclasses 2
values |
|---|---|---|---|---|---|---|---|---|---|---|---|
TestIndexBase.test_create_different_index_repeatedly | (self, connect, collection) |
target: check if index can be created repeatedly, with the different create_index params
method: create another index with different index_params after index have been built
expected: return code 0, and describe index result equals with the second index params
|
target: check if index can be created repeatedly, with the different create_index params
method: create another index with different index_params after index have been built
expected: return code 0, and describe index result equals with the second index params
| def test_create_different_index_repeatedly(self, connect, collection):
'''
target: check if index can be created repeatedly, with the different create_index params
method: create another index with different index_params after index have been built
expected: return code 0, and describe i... | [
"def",
"test_create_different_index_repeatedly",
"(",
"self",
",",
"connect",
",",
"collection",
")",
":",
"nlist",
"=",
"NLIST",
"status",
",",
"ids",
"=",
"connect",
".",
"insert",
"(",
"collection",
",",
"vectors",
")",
"index_type_1",
"=",
"IndexType",
"."... | [
402,
4
] | [
420,
49
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBase.test_get_index_info | (self, connect, collection, get_index) |
target: test describe index interface
method: create collection and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
|
target: test describe index interface
method: create collection and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
| def test_get_index_info(self, connect, collection, get_index):
'''
target: test describe index interface
method: create collection and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
'''
index_param = get_index["index_pa... | [
"def",
"test_get_index_info",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_index",
")",
":",
"index_param",
"=",
"get_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_index",
"[",
"\"index_type\"",
"]",
"logging",
".",
"getLogger",
"(",
... | [
428,
4
] | [
444,
51
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBase.test_describe_and_drop_index_multi_collections | (self, connect, get_simple_index) |
target: test create, describe and drop index interface with multiple collections of L2
method: create collections and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
|
target: test create, describe and drop index interface with multiple collections of L2
method: create collections and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
| def test_describe_and_drop_index_multi_collections(self, connect, get_simple_index):
'''
target: test create, describe and drop index interface with multiple collections of L2
method: create collections and add vectors in it, create index, call describe index
expected: return code 0, and... | [
"def",
"test_describe_and_drop_index_multi_collections",
"(",
"self",
",",
"connect",
",",
"get_simple_index",
")",
":",
"nq",
"=",
"100",
"vectors",
"=",
"gen_vectors",
"(",
"nq",
",",
"dim",
")",
"collection_list",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
... | [
446,
4
] | [
483,
55
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBase.test_get_index_info_collection_not_existed | (self, connect) |
target: test describe index interface when collection name not existed
method: create collection and add vectors in it, create index
, make sure the collection name not in index
expected: return code not equals to 0, describe index failed
|
target: test describe index interface when collection name not existed
method: create collection and add vectors in it, create index
, make sure the collection name not in index
expected: return code not equals to 0, describe index failed
| def test_get_index_info_collection_not_existed(self, connect):
'''
target: test describe index interface when collection name not existed
method: create collection and add vectors in it, create index
, make sure the collection name not in index
expected: return code not equal... | [
"def",
"test_get_index_info_collection_not_existed",
"(",
"self",
",",
"connect",
")",
":",
"collection_name",
"=",
"gen_unique_str",
"(",
"self",
".",
"__class__",
".",
"__name__",
")",
"status",
",",
"result",
"=",
"connect",
".",
"get_index_info",
"(",
"collect... | [
495,
4
] | [
504,
30
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBase.test_get_index_info_collection_None | (self, connect) |
target: test describe index interface when collection name is None
method: create collection and add vectors in it, create index with an collection_name: None
expected: return code not equals to 0, describe index failed
|
target: test describe index interface when collection name is None
method: create collection and add vectors in it, create index with an collection_name: None
expected: return code not equals to 0, describe index failed
| def test_get_index_info_collection_None(self, connect):
'''
target: test describe index interface when collection name is None
method: create collection and add vectors in it, create index with an collection_name: None
expected: return code not equals to 0, describe index failed
... | [
"def",
"test_get_index_info_collection_None",
"(",
"self",
",",
"connect",
")",
":",
"collection_name",
"=",
"None",
"with",
"pytest",
".",
"raises",
"(",
"Exception",
")",
"as",
"e",
":",
"status",
"=",
"connect",
".",
"get_index_info",
"(",
"collection_name",
... | [
506,
4
] | [
514,
60
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBase.test_get_index_info_not_create | (self, connect, collection) |
target: test describe index interface when index not created
method: create collection and add vectors in it, create index
, make sure the collection name not in index
expected: return code not equals to 0, describe index failed
|
target: test describe index interface when index not created
method: create collection and add vectors in it, create index
, make sure the collection name not in index
expected: return code not equals to 0, describe index failed
| def test_get_index_info_not_create(self, connect, collection):
'''
target: test describe index interface when index not created
method: create collection and add vectors in it, create index
, make sure the collection name not in index
expected: return code not equals to 0, de... | [
"def",
"test_get_index_info_not_create",
"(",
"self",
",",
"connect",
",",
"collection",
")",
":",
"status",
",",
"ids",
"=",
"connect",
".",
"insert",
"(",
"collection",
",",
"vectors",
")",
"status",
",",
"result",
"=",
"connect",
".",
"get_index_info",
"(... | [
516,
4
] | [
526,
26
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBase.test_drop_index | (self, connect, collection, get_simple_index) |
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
|
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
| def test_drop_index(self, connect, collection, get_simple_index):
'''
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
'''
index_param = get_simple_index["inde... | [
"def",
"test_drop_index",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
"# status, ids = connec... | [
537,
4
] | [
555,
51
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBase.test_drop_index_repeatly | (self, connect, collection, get_simple_index) |
target: test drop index repeatly
method: create index, call drop index, and drop again
expected: return code 0
|
target: test drop index repeatly
method: create index, call drop index, and drop again
expected: return code 0
| def test_drop_index_repeatly(self, connect, collection, get_simple_index):
'''
target: test drop index repeatly
method: create index, call drop index, and drop again
expected: return code 0
'''
index_param = get_simple_index["index_param"]
index_type = get_simple_... | [
"def",
"test_drop_index_repeatly",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
"# status, ids... | [
558,
4
] | [
578,
51
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBase.test_drop_index_collection_not_existed | (self, connect) |
target: test drop index interface when collection name not existed
method: create collection and add vectors in it, create index
, make sure the collection name not in index, and then drop it
expected: return code not equals to 0, drop index failed
|
target: test drop index interface when collection name not existed
method: create collection and add vectors in it, create index
, make sure the collection name not in index, and then drop it
expected: return code not equals to 0, drop index failed
| def test_drop_index_collection_not_existed(self, connect):
'''
target: test drop index interface when collection name not existed
method: create collection and add vectors in it, create index
, make sure the collection name not in index, and then drop it
expected: return code... | [
"def",
"test_drop_index_collection_not_existed",
"(",
"self",
",",
"connect",
")",
":",
"collection_name",
"=",
"gen_unique_str",
"(",
"self",
".",
"__class__",
".",
"__name__",
")",
"status",
"=",
"connect",
".",
"drop_index",
"(",
"collection_name",
")",
"assert... | [
590,
4
] | [
599,
30
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBase.test_drop_index_collection_None | (self, connect) |
target: test drop index interface when collection name is None
method: create collection and add vectors in it, create index with an collection_name: None
expected: return code not equals to 0, drop index failed
|
target: test drop index interface when collection name is None
method: create collection and add vectors in it, create index with an collection_name: None
expected: return code not equals to 0, drop index failed
| def test_drop_index_collection_None(self, connect):
'''
target: test drop index interface when collection name is None
method: create collection and add vectors in it, create index with an collection_name: None
expected: return code not equals to 0, drop index failed
'''
... | [
"def",
"test_drop_index_collection_None",
"(",
"self",
",",
"connect",
")",
":",
"collection_name",
"=",
"None",
"with",
"pytest",
".",
"raises",
"(",
"Exception",
")",
"as",
"e",
":",
"status",
"=",
"connect",
".",
"drop_index",
"(",
"collection_name",
")"
] | [
601,
4
] | [
609,
56
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBase.test_drop_index_collection_not_create | (self, connect, collection) |
target: test drop index interface when index not created
method: create collection and add vectors in it, create index
expected: return code not equals to 0, drop index failed
|
target: test drop index interface when index not created
method: create collection and add vectors in it, create index
expected: return code not equals to 0, drop index failed
| def test_drop_index_collection_not_create(self, connect, collection):
'''
target: test drop index interface when index not created
method: create collection and add vectors in it, create index
expected: return code not equals to 0, drop index failed
'''
status, ids = conn... | [
"def",
"test_drop_index_collection_not_create",
"(",
"self",
",",
"connect",
",",
"collection",
")",
":",
"status",
",",
"ids",
"=",
"connect",
".",
"insert",
"(",
"collection",
",",
"vectors",
")",
"status",
",",
"result",
"=",
"connect",
".",
"get_index_info... | [
611,
4
] | [
623,
26
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBase.test_create_drop_index_repeatly | (self, connect, collection, get_simple_index) |
target: test create / drop index repeatly, use the same index params
method: create index, drop index, four times
expected: return code 0
|
target: test create / drop index repeatly, use the same index params
method: create index, drop index, four times
expected: return code 0
| def test_create_drop_index_repeatly(self, connect, collection, get_simple_index):
'''
target: test create / drop index repeatly, use the same index params
method: create index, drop index, four times
expected: return code 0
'''
index_param = get_simple_index["index_param"... | [
"def",
"test_create_drop_index_repeatly",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
"# stat... | [
626,
4
] | [
645,
55
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBase.test_create_drop_index_repeatly_different_index_params | (self, connect, collection) |
target: test create / drop index repeatly, use the different index params
method: create index, drop index, four times, each tme use different index_params to create index
expected: return code 0
|
target: test create / drop index repeatly, use the different index params
method: create index, drop index, four times, each tme use different index_params to create index
expected: return code 0
| def test_create_drop_index_repeatly_different_index_params(self, connect, collection):
'''
target: test create / drop index repeatly, use the different index params
method: create index, drop index, four times, each tme use different index_params to create index
expected: return code 0
... | [
"def",
"test_create_drop_index_repeatly_different_index_params",
"(",
"self",
",",
"connect",
",",
"collection",
")",
":",
"nlist",
"=",
"NLIST",
"indexs",
"=",
"[",
"{",
"\"index_type\"",
":",
"IndexType",
".",
"IVFLAT",
",",
"\"index_param\"",
":",
"{",
"\"nlist... | [
647,
4
] | [
666,
55
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_create_index | (self, connect, ip_collection, get_simple_index) |
target: test create index interface
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
|
target: test create index interface
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
| def test_create_index(self, connect, ip_collection, get_simple_index):
'''
target: test create index interface
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
'''
index_param = get_simple_index["index_par... | [
"def",
"test_create_index",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
"logging",
".",
... | [
706,
4
] | [
717,
26
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_create_index_collection | (self, connect, ip_collection, get_simple_index) |
target: test create index interface
method: create collection, create partition, and add vectors in it, create index on collection
expected: return code equals to 0, and search success
|
target: test create index interface
method: create collection, create partition, and add vectors in it, create index on collection
expected: return code equals to 0, and search success
| def test_create_index_collection(self, connect, ip_collection, get_simple_index):
'''
target: test create index interface
method: create collection, create partition, and add vectors in it, create index on collection
expected: return code equals to 0, and search success
'''
... | [
"def",
"test_create_index_collection",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
"loggin... | [
720,
4
] | [
732,
26
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_create_index_search_with_query_vectors | (self, connect, ip_collection, get_simple_index) |
target: test create index interface, search with more query vectors
method: create collection and add vectors in it, create index, with no manual flush
expected: return code equals to 0, and search success
|
target: test create index interface, search with more query vectors
method: create collection and add vectors in it, create index, with no manual flush
expected: return code equals to 0, and search success
| def test_create_index_search_with_query_vectors(self, connect, ip_collection, get_simple_index):
'''
target: test create index interface, search with more query vectors
method: create collection and add vectors in it, create index, with no manual flush
expected: return code equals to 0,... | [
"def",
"test_create_index_search_with_query_vectors",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
... | [
748,
4
] | [
768,
45
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP._test_create_index_multiprocessing | (self, connect, ip_collection, args) |
target: test create index interface with multiprocess
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
|
target: test create index interface with multiprocess
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
| def _test_create_index_multiprocessing(self, connect, ip_collection, args):
'''
target: test create index interface with multiprocess
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
'''
status, ids = conn... | [
"def",
"_test_create_index_multiprocessing",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"args",
")",
":",
"status",
",",
"ids",
"=",
"connect",
".",
"insert",
"(",
"ip_collection",
",",
"vectors",
")",
"def",
"build",
"(",
"connect",
")",
":",
... | [
773,
4
] | [
802,
43
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP._test_create_index_multiprocessing_multicollection | (self, connect, args) |
target: test create index interface with multiprocess
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
|
target: test create index interface with multiprocess
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
| def _test_create_index_multiprocessing_multicollection(self, connect, args):
'''
target: test create index interface with multiprocess
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
'''
process_num = 8
... | [
"def",
"_test_create_index_multiprocessing_multicollection",
"(",
"self",
",",
"connect",
",",
"args",
")",
":",
"process_num",
"=",
"8",
"loop_num",
"=",
"8",
"processes",
"=",
"[",
"]",
"collection",
"=",
"[",
"]",
"j",
"=",
"0",
"while",
"j",
"<",
"(",
... | [
806,
4
] | [
851,
20
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_create_index_no_vectors | (self, connect, ip_collection) |
target: test create index interface when there is no vectors in collection
method: create collection and add no vectors in it, and then create index
expected: return code equals to 0
|
target: test create index interface when there is no vectors in collection
method: create collection and add no vectors in it, and then create index
expected: return code equals to 0
| def test_create_index_no_vectors(self, connect, ip_collection):
'''
target: test create index interface when there is no vectors in collection
method: create collection and add no vectors in it, and then create index
expected: return code equals to 0
'''
nlist = NLIST
... | [
"def",
"test_create_index_no_vectors",
"(",
"self",
",",
"connect",
",",
"ip_collection",
")",
":",
"nlist",
"=",
"NLIST",
"index_type",
"=",
"IndexType",
".",
"IVF_SQ8",
"index_param",
"=",
"{",
"\"nlist\"",
":",
"nlist",
"}",
"status",
"=",
"connect",
".",
... | [
853,
4
] | [
863,
26
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_create_index_no_vectors_then_insert | (self, connect, ip_collection, get_simple_index) |
target: test create index interface when there is no vectors in collection, and does not affect the subsequent process
method: create collection and add no vectors in it, and then create index, add vectors in it
expected: return code equals to 0
|
target: test create index interface when there is no vectors in collection, and does not affect the subsequent process
method: create collection and add no vectors in it, and then create index, add vectors in it
expected: return code equals to 0
| def test_create_index_no_vectors_then_insert(self, connect, ip_collection, get_simple_index):
'''
target: test create index interface when there is no vectors in collection, and does not affect the subsequent process
method: create collection and add no vectors in it, and then create index, add ... | [
"def",
"test_create_index_no_vectors_then_insert",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]... | [
866,
4
] | [
876,
26
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_create_same_index_repeatedly | (self, connect, ip_collection) |
target: check if index can be created repeatedly, with the same create_index params
method: create index after index have been built
expected: return code success, and search ok
|
target: check if index can be created repeatedly, with the same create_index params
method: create index after index have been built
expected: return code success, and search ok
| def test_create_same_index_repeatedly(self, connect, ip_collection):
'''
target: check if index can be created repeatedly, with the same create_index params
method: create index after index have been built
expected: return code success, and search ok
'''
nlist = NLIST
... | [
"def",
"test_create_same_index_repeatedly",
"(",
"self",
",",
"connect",
",",
"ip_collection",
")",
":",
"nlist",
"=",
"NLIST",
"status",
",",
"ids",
"=",
"connect",
".",
"insert",
"(",
"ip_collection",
",",
"vectors",
")",
"index_type",
"=",
"IndexType",
".",... | [
879,
4
] | [
897,
38
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_create_different_index_repeatedly | (self, connect, ip_collection) |
target: check if index can be created repeatedly, with the different create_index params
method: create another index with different index_params after index have been built
expected: return code 0, and describe index result equals with the second index params
|
target: check if index can be created repeatedly, with the different create_index params
method: create another index with different index_params after index have been built
expected: return code 0, and describe index result equals with the second index params
| def test_create_different_index_repeatedly(self, connect, ip_collection):
'''
target: check if index can be created repeatedly, with the different create_index params
method: create another index with different index_params after index have been built
expected: return code 0, and describ... | [
"def",
"test_create_different_index_repeatedly",
"(",
"self",
",",
"connect",
",",
"ip_collection",
")",
":",
"nlist",
"=",
"NLIST",
"status",
",",
"ids",
"=",
"connect",
".",
"insert",
"(",
"ip_collection",
",",
"vectors",
")",
"index_type_1",
"=",
"IndexType",... | [
900,
4
] | [
918,
49
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_get_index_info | (self, connect, ip_collection, get_simple_index) |
target: test describe index interface
method: create collection and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
|
target: test describe index interface
method: create collection and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
| def test_get_index_info(self, connect, ip_collection, get_simple_index):
'''
target: test describe index interface
method: create collection and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
'''
index_param = get_simpl... | [
"def",
"test_get_index_info",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
"logging",
"."... | [
926,
4
] | [
946,
48
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_get_index_info_partition | (self, connect, ip_collection, get_simple_index) |
target: test describe index interface
method: create collection, create partition and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
|
target: test describe index interface
method: create collection, create partition and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
| def test_get_index_info_partition(self, connect, ip_collection, get_simple_index):
'''
target: test describe index interface
method: create collection, create partition and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
'''
... | [
"def",
"test_get_index_info_partition",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
"loggi... | [
948,
4
] | [
964,
47
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_get_index_info_partition_A | (self, connect, ip_collection, get_simple_index) |
target: test describe index interface
method: create collection, create partitions and add vectors in it, create index on partitions, call describe index
expected: return code 0, and index instructure
|
target: test describe index interface
method: create collection, create partitions and add vectors in it, create index on partitions, call describe index
expected: return code 0, and index instructure
| def test_get_index_info_partition_A(self, connect, ip_collection, get_simple_index):
'''
target: test describe index interface
method: create collection, create partitions and add vectors in it, create index on partitions, call describe index
expected: return code 0, and index instructur... | [
"def",
"test_get_index_info_partition_A",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"new_tag",
"=",
"\"new_tag\"",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"... | [
966,
4
] | [
985,
47
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_describe_and_drop_index_multi_collections | (self, connect, get_simple_index) |
target: test create, describe and drop index interface with multiple collections of IP
method: create collections and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
|
target: test create, describe and drop index interface with multiple collections of IP
method: create collections and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
| def test_describe_and_drop_index_multi_collections(self, connect, get_simple_index):
'''
target: test create, describe and drop index interface with multiple collections of IP
method: create collections and add vectors in it, create index, call describe index
expected: return code 0, and... | [
"def",
"test_describe_and_drop_index_multi_collections",
"(",
"self",
",",
"connect",
",",
"get_simple_index",
")",
":",
"nq",
"=",
"100",
"vectors",
"=",
"gen_vectors",
"(",
"nq",
",",
"dim",
")",
"collection_list",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
... | [
987,
4
] | [
1022,
55
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_get_index_info_not_create | (self, connect, ip_collection) |
target: test describe index interface when index not created
method: create collection and add vectors in it, create index
, make sure the collection name not in index
expected: return code not equals to 0, describe index failed
|
target: test describe index interface when index not created
method: create collection and add vectors in it, create index
, make sure the collection name not in index
expected: return code not equals to 0, describe index failed
| def test_get_index_info_not_create(self, connect, ip_collection):
'''
target: test describe index interface when index not created
method: create collection and add vectors in it, create index
, make sure the collection name not in index
expected: return code not equals to 0,... | [
"def",
"test_get_index_info_not_create",
"(",
"self",
",",
"connect",
",",
"ip_collection",
")",
":",
"status",
",",
"ids",
"=",
"connect",
".",
"insert",
"(",
"ip_collection",
",",
"vectors",
")",
"status",
",",
"result",
"=",
"connect",
".",
"get_index_info"... | [
1034,
4
] | [
1044,
26
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_drop_index | (self, connect, ip_collection, get_simple_index) |
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
|
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
| def test_drop_index(self, connect, ip_collection, get_simple_index):
'''
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
'''
index_param = get_simple_index["i... | [
"def",
"test_drop_index",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
"status",
",",
"... | [
1055,
4
] | [
1078,
51
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_drop_index_partition | (self, connect, ip_collection, get_simple_index) |
target: test drop index interface
method: create collection, create partition and add vectors in it, create index on collection, call drop collection index
expected: return code 0, and default index param
|
target: test drop index interface
method: create collection, create partition and add vectors in it, create index on collection, call drop collection index
expected: return code 0, and default index param
| def test_drop_index_partition(self, connect, ip_collection, get_simple_index):
'''
target: test drop index interface
method: create collection, create partition and add vectors in it, create index on collection, call drop collection index
expected: return code 0, and default index param
... | [
"def",
"test_drop_index_partition",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
"status",
... | [
1080,
4
] | [
1099,
51
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_drop_index_partition_C | (self, connect, ip_collection, get_simple_index) |
target: test drop index interface
method: create collection, create partitions and add vectors in it, create index on partitions, call drop partition index
expected: return code 0, and default index param
|
target: test drop index interface
method: create collection, create partitions and add vectors in it, create index on partitions, call drop partition index
expected: return code 0, and default index param
| def test_drop_index_partition_C(self, connect, ip_collection, get_simple_index):
'''
target: test drop index interface
method: create collection, create partitions and add vectors in it, create index on partitions, call drop partition index
expected: return code 0, and default index para... | [
"def",
"test_drop_index_partition_C",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"new_tag",
"=",
"\"new_tag\"",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
... | [
1101,
4
] | [
1120,
51
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_drop_index_repeatly | (self, connect, ip_collection, get_simple_index) |
target: test drop index repeatly
method: create index, call drop index, and drop again
expected: return code 0
|
target: test drop index repeatly
method: create index, call drop index, and drop again
expected: return code 0
| def test_drop_index_repeatly(self, connect, ip_collection, get_simple_index):
'''
target: test drop index repeatly
method: create index, call drop index, and drop again
expected: return code 0
'''
index_param = get_simple_index["index_param"]
index_type = get_simp... | [
"def",
"test_drop_index_repeatly",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
"# status, ... | [
1123,
4
] | [
1149,
51
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_drop_index_collection_not_create | (self, connect, ip_collection) |
target: test drop index interface when index not created
method: create collection and add vectors in it, create index
expected: return code not equals to 0, drop index failed
|
target: test drop index interface when index not created
method: create collection and add vectors in it, create index
expected: return code not equals to 0, drop index failed
| def test_drop_index_collection_not_create(self, connect, ip_collection):
'''
target: test drop index interface when index not created
method: create collection and add vectors in it, create index
expected: return code not equals to 0, drop index failed
'''
status, ids = c... | [
"def",
"test_drop_index_collection_not_create",
"(",
"self",
",",
"connect",
",",
"ip_collection",
")",
":",
"status",
",",
"ids",
"=",
"connect",
".",
"insert",
"(",
"ip_collection",
",",
"vectors",
")",
"status",
",",
"result",
"=",
"connect",
".",
"get_inde... | [
1164,
4
] | [
1176,
26
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_create_drop_index_repeatly | (self, connect, ip_collection, get_simple_index) |
target: test create / drop index repeatly, use the same index params
method: create index, drop index, four times
expected: return code 0
|
target: test create / drop index repeatly, use the same index params
method: create index, drop index, four times
expected: return code 0
| def test_create_drop_index_repeatly(self, connect, ip_collection, get_simple_index):
'''
target: test create / drop index repeatly, use the same index params
method: create index, drop index, four times
expected: return code 0
'''
index_param = get_simple_index["index_par... | [
"def",
"test_create_drop_index_repeatly",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
"sta... | [
1179,
4
] | [
1198,
55
] | python | en | ['en', 'error', 'th'] | False |
TestIndexIP.test_create_drop_index_repeatly_different_index_params | (self, connect, ip_collection) |
target: test create / drop index repeatly, use the different index params
method: create index, drop index, four times, each tme use different index_params to create index
expected: return code 0
|
target: test create / drop index repeatly, use the different index params
method: create index, drop index, four times, each tme use different index_params to create index
expected: return code 0
| def test_create_drop_index_repeatly_different_index_params(self, connect, ip_collection):
'''
target: test create / drop index repeatly, use the different index params
method: create index, drop index, four times, each tme use different index_params to create index
expected: return code ... | [
"def",
"test_create_drop_index_repeatly_different_index_params",
"(",
"self",
",",
"connect",
",",
"ip_collection",
")",
":",
"nlist",
"=",
"NLIST",
"indexs",
"=",
"[",
"{",
"\"index_type\"",
":",
"IndexType",
".",
"IVFLAT",
",",
"\"index_param\"",
":",
"{",
"\"nl... | [
1200,
4
] | [
1223,
55
] | python | en | ['en', 'error', 'th'] | False |
TestIndexJAC.test_create_index | (self, connect, jac_collection, get_jaccard_index) |
target: test create index interface
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
|
target: test create index interface
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
| def test_create_index(self, connect, jac_collection, get_jaccard_index):
'''
target: test create index interface
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
'''
index_param = get_jaccard_index["index_... | [
"def",
"test_create_index",
"(",
"self",
",",
"connect",
",",
"jac_collection",
",",
"get_jaccard_index",
")",
":",
"index_param",
"=",
"get_jaccard_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_jaccard_index",
"[",
"\"index_type\"",
"]",
"logging",
"... | [
1272,
4
] | [
1286,
30
] | python | en | ['en', 'error', 'th'] | False |
TestIndexJAC.test_create_index_partition | (self, connect, jac_collection, get_jaccard_index) |
target: test create index interface
method: create collection, create partition, and add vectors in it, create index
expected: return code equals to 0, and search success
|
target: test create index interface
method: create collection, create partition, and add vectors in it, create index
expected: return code equals to 0, and search success
| def test_create_index_partition(self, connect, jac_collection, get_jaccard_index):
'''
target: test create index interface
method: create collection, create partition, and add vectors in it, create index
expected: return code equals to 0, and search success
'''
index_para... | [
"def",
"test_create_index_partition",
"(",
"self",
",",
"connect",
",",
"jac_collection",
",",
"get_jaccard_index",
")",
":",
"index_param",
"=",
"get_jaccard_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_jaccard_index",
"[",
"\"index_type\"",
"]",
"log... | [
1289,
4
] | [
1301,
26
] | python | en | ['en', 'error', 'th'] | False |
TestIndexJAC.test_create_index_search_with_query_vectors | (self, connect, jac_collection, get_jaccard_index) |
target: test create index interface, search with more query vectors
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
|
target: test create index interface, search with more query vectors
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
| def test_create_index_search_with_query_vectors(self, connect, jac_collection, get_jaccard_index):
'''
target: test create index interface, search with more query vectors
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
... | [
"def",
"test_create_index_search_with_query_vectors",
"(",
"self",
",",
"connect",
",",
"jac_collection",
",",
"get_jaccard_index",
")",
":",
"index_param",
"=",
"get_jaccard_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_jaccard_index",
"[",
"\"index_type\"... | [
1316,
4
] | [
1334,
45
] | python | en | ['en', 'error', 'th'] | False |
TestIndexJAC.test_get_index_info | (self, connect, jac_collection, get_jaccard_index) |
target: test describe index interface
method: create collection and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
|
target: test describe index interface
method: create collection and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
| def test_get_index_info(self, connect, jac_collection, get_jaccard_index):
'''
target: test describe index interface
method: create collection and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
'''
index_param = get_jac... | [
"def",
"test_get_index_info",
"(",
"self",
",",
"connect",
",",
"jac_collection",
",",
"get_jaccard_index",
")",
":",
"index_param",
"=",
"get_jaccard_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_jaccard_index",
"[",
"\"index_type\"",
"]",
"logging",
... | [
1342,
4
] | [
1357,
44
] | python | en | ['en', 'error', 'th'] | False |
TestIndexJAC.test_get_index_info_partition | (self, connect, jac_collection, get_jaccard_index) |
target: test describe index interface
method: create collection, create partition and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
|
target: test describe index interface
method: create collection, create partition and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
| def test_get_index_info_partition(self, connect, jac_collection, get_jaccard_index):
'''
target: test describe index interface
method: create collection, create partition and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
'''
... | [
"def",
"test_get_index_info_partition",
"(",
"self",
",",
"connect",
",",
"jac_collection",
",",
"get_jaccard_index",
")",
":",
"index_param",
"=",
"get_jaccard_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_jaccard_index",
"[",
"\"index_type\"",
"]",
"l... | [
1359,
4
] | [
1375,
47
] | python | en | ['en', 'error', 'th'] | False |
TestIndexJAC.test_drop_index | (self, connect, jac_collection, get_jaccard_index) |
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
|
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
| def test_drop_index(self, connect, jac_collection, get_jaccard_index):
'''
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
'''
index_param = get_jaccard_index... | [
"def",
"test_drop_index",
"(",
"self",
",",
"connect",
",",
"jac_collection",
",",
"get_jaccard_index",
")",
":",
"index_param",
"=",
"get_jaccard_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_jaccard_index",
"[",
"\"index_type\"",
"]",
"status",
",",... | [
1383,
4
] | [
1403,
51
] | python | en | ['en', 'error', 'th'] | False |
TestIndexJAC.test_drop_index_partition | (self, connect, jac_collection, get_jaccard_index) |
target: test drop index interface
method: create collection, create partition and add vectors in it, create index on collection, call drop collection index
expected: return code 0, and default index param
|
target: test drop index interface
method: create collection, create partition and add vectors in it, create index on collection, call drop collection index
expected: return code 0, and default index param
| def test_drop_index_partition(self, connect, jac_collection, get_jaccard_index):
'''
target: test drop index interface
method: create collection, create partition and add vectors in it, create index on collection, call drop collection index
expected: return code 0, and default index para... | [
"def",
"test_drop_index_partition",
"(",
"self",
",",
"connect",
",",
"jac_collection",
",",
"get_jaccard_index",
")",
":",
"index_param",
"=",
"get_jaccard_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_jaccard_index",
"[",
"\"index_type\"",
"]",
"statu... | [
1405,
4
] | [
1424,
51
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBinary.test_create_index | (self, connect, ham_collection, get_hamming_index) |
target: test create index interface
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
|
target: test create index interface
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
| def test_create_index(self, connect, ham_collection, get_hamming_index):
'''
target: test create index interface
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
'''
index_param = get_hamming_index["index_... | [
"def",
"test_create_index",
"(",
"self",
",",
"connect",
",",
"ham_collection",
",",
"get_hamming_index",
")",
":",
"index_param",
"=",
"get_hamming_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_hamming_index",
"[",
"\"index_type\"",
"]",
"logging",
"... | [
1493,
4
] | [
1507,
30
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBinary.test_create_index_partition | (self, connect, ham_collection, get_hamming_index) |
target: test create index interface
method: create collection, create partition, and add vectors in it, create index
expected: return code equals to 0, and search success
|
target: test create index interface
method: create collection, create partition, and add vectors in it, create index
expected: return code equals to 0, and search success
| def test_create_index_partition(self, connect, ham_collection, get_hamming_index):
'''
target: test create index interface
method: create collection, create partition, and add vectors in it, create index
expected: return code equals to 0, and search success
'''
index_para... | [
"def",
"test_create_index_partition",
"(",
"self",
",",
"connect",
",",
"ham_collection",
",",
"get_hamming_index",
")",
":",
"index_param",
"=",
"get_hamming_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_hamming_index",
"[",
"\"index_type\"",
"]",
"log... | [
1510,
4
] | [
1524,
39
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBinary.test_create_index_partition_structure | (self, connect, substructure_collection, get_substructure_index) |
target: test create index interface
method: create collection, create partition, and add vectors in it, create index
expected: return code equals to 0, and search success
|
target: test create index interface
method: create collection, create partition, and add vectors in it, create index
expected: return code equals to 0, and search success
| def test_create_index_partition_structure(self, connect, substructure_collection, get_substructure_index):
'''
target: test create index interface
method: create collection, create partition, and add vectors in it, create index
expected: return code equals to 0, and search success
... | [
"def",
"test_create_index_partition_structure",
"(",
"self",
",",
"connect",
",",
"substructure_collection",
",",
"get_substructure_index",
")",
":",
"index_param",
"=",
"get_substructure_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_substructure_index",
"[",... | [
1527,
4
] | [
1541,
39
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBinary.test_create_index_search_with_query_vectors | (self, connect, ham_collection, get_hamming_index) |
target: test create index interface, search with more query vectors
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
|
target: test create index interface, search with more query vectors
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
| def test_create_index_search_with_query_vectors(self, connect, ham_collection, get_hamming_index):
'''
target: test create index interface, search with more query vectors
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
... | [
"def",
"test_create_index_search_with_query_vectors",
"(",
"self",
",",
"connect",
",",
"ham_collection",
",",
"get_hamming_index",
")",
":",
"index_param",
"=",
"get_hamming_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_hamming_index",
"[",
"\"index_type\"... | [
1556,
4
] | [
1574,
45
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBinary.test_create_index_search_with_query_vectors_superstructure | (self, connect, superstructure_collection, get_superstructure_index) |
target: test create index interface, search with more query vectors
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
|
target: test create index interface, search with more query vectors
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
| def test_create_index_search_with_query_vectors_superstructure(self, connect, superstructure_collection, get_superstructure_index):
'''
target: test create index interface, search with more query vectors
method: create collection and add vectors in it, create index
expected: return code ... | [
"def",
"test_create_index_search_with_query_vectors_superstructure",
"(",
"self",
",",
"connect",
",",
"superstructure_collection",
",",
"get_superstructure_index",
")",
":",
"index_param",
"=",
"get_superstructure_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_... | [
1577,
4
] | [
1595,
45
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBinary.test_get_index_info | (self, connect, ham_collection, get_hamming_index) |
target: test describe index interface
method: create collection and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
|
target: test describe index interface
method: create collection and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
| def test_get_index_info(self, connect, ham_collection, get_hamming_index):
'''
target: test describe index interface
method: create collection and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
'''
index_param = get_ham... | [
"def",
"test_get_index_info",
"(",
"self",
",",
"connect",
",",
"ham_collection",
",",
"get_hamming_index",
")",
":",
"index_param",
"=",
"get_hamming_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_hamming_index",
"[",
"\"index_type\"",
"]",
"logging",
... | [
1603,
4
] | [
1618,
44
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBinary.test_get_index_info_partition | (self, connect, ham_collection, get_hamming_index) |
target: test describe index interface
method: create collection, create partition and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
|
target: test describe index interface
method: create collection, create partition and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
| def test_get_index_info_partition(self, connect, ham_collection, get_hamming_index):
'''
target: test describe index interface
method: create collection, create partition and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
'''
... | [
"def",
"test_get_index_info_partition",
"(",
"self",
",",
"connect",
",",
"ham_collection",
",",
"get_hamming_index",
")",
":",
"index_param",
"=",
"get_hamming_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_hamming_index",
"[",
"\"index_type\"",
"]",
"l... | [
1620,
4
] | [
1636,
47
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBinary.test_get_index_info_partition_superstructrue | (self, connect, superstructure_collection, get_superstructure_index) |
target: test describe index interface
method: create collection, create partition and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
|
target: test describe index interface
method: create collection, create partition and add vectors in it, create index, call describe index
expected: return code 0, and index instructure
| def test_get_index_info_partition_superstructrue(self, connect, superstructure_collection, get_superstructure_index):
'''
target: test describe index interface
method: create collection, create partition and add vectors in it, create index, call describe index
expected: return code 0, an... | [
"def",
"test_get_index_info_partition_superstructrue",
"(",
"self",
",",
"connect",
",",
"superstructure_collection",
",",
"get_superstructure_index",
")",
":",
"index_param",
"=",
"get_superstructure_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_superstructure... | [
1638,
4
] | [
1654,
47
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBinary.test_drop_index | (self, connect, ham_collection, get_hamming_index) |
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
|
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
| def test_drop_index(self, connect, ham_collection, get_hamming_index):
'''
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
'''
index_param = get_hamming_index... | [
"def",
"test_drop_index",
"(",
"self",
",",
"connect",
",",
"ham_collection",
",",
"get_hamming_index",
")",
":",
"index_param",
"=",
"get_hamming_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_hamming_index",
"[",
"\"index_type\"",
"]",
"status",
",",... | [
1662,
4
] | [
1682,
51
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBinary.test_drop_index_substructure | (self, connect, substructure_collection, get_substructure_index) |
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
|
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
| def test_drop_index_substructure(self, connect, substructure_collection, get_substructure_index):
'''
target: test drop index interface
method: create collection and add vectors in it, create index, call drop index
expected: return code 0, and default index param
'''
inde... | [
"def",
"test_drop_index_substructure",
"(",
"self",
",",
"connect",
",",
"substructure_collection",
",",
"get_substructure_index",
")",
":",
"index_param",
"=",
"get_substructure_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_substructure_index",
"[",
"\"ind... | [
1684,
4
] | [
1703,
51
] | python | en | ['en', 'error', 'th'] | False |
TestIndexBinary.test_drop_index_partition | (self, connect, ham_collection, get_hamming_index) |
target: test drop index interface
method: create collection, create partition and add vectors in it, create index on collection, call drop collection index
expected: return code 0, and default index param
|
target: test drop index interface
method: create collection, create partition and add vectors in it, create index on collection, call drop collection index
expected: return code 0, and default index param
| def test_drop_index_partition(self, connect, ham_collection, get_hamming_index):
'''
target: test drop index interface
method: create collection, create partition and add vectors in it, create index on collection, call drop collection index
expected: return code 0, and default index para... | [
"def",
"test_drop_index_partition",
"(",
"self",
",",
"connect",
",",
"ham_collection",
",",
"get_hamming_index",
")",
":",
"index_param",
"=",
"get_hamming_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_hamming_index",
"[",
"\"index_type\"",
"]",
"statu... | [
1705,
4
] | [
1724,
51
] | python | en | ['en', 'error', 'th'] | False |
TestIndexAsync.test_create_index | (self, connect, collection, get_simple_index) |
target: test create index interface
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
|
target: test create index interface
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
| def test_create_index(self, connect, collection, get_simple_index):
'''
target: test create index interface
method: create collection and add vectors in it, create index
expected: return code equals to 0, and search success
'''
index_param = get_simple_index["index_param"... | [
"def",
"test_create_index",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
"logging",
".",
"... | [
1861,
4
] | [
1877,
26
] | python | en | ['en', 'error', 'th'] | False |
regression | (self, local, clickhouse_binary_path, stress=None, parallel=None) | ClickHouse Kerberos authentication test regression module.
| ClickHouse Kerberos authentication test regression module.
| def regression(self, local, clickhouse_binary_path, stress=None, parallel=None):
"""ClickHouse Kerberos authentication test regression module.
"""
top().terminating = False
nodes = {
"clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"),
"kerberos": ("kerberos", ),
}
if st... | [
"def",
"regression",
"(",
"self",
",",
"local",
",",
"clickhouse_binary_path",
",",
"stress",
"=",
"None",
",",
"parallel",
"=",
"None",
")",
":",
"top",
"(",
")",
".",
"terminating",
"=",
"False",
"nodes",
"=",
"{",
"\"clickhouse\"",
":",
"(",
"\"clickh... | [
22,
0
] | [
42,
74
] | python | en | ['la', 'fr', 'en'] | False |
rate_limited_iter | (l) | a thread pre-processes the next element | a thread pre-processes the next element | def rate_limited_iter(l):
'a thread pre-processes the next element'
pool = ThreadPool(1)
res = None
def next_or_None():
try:
return next(l)
except StopIteration:
return None
while True:
res_next = pool.apply_async(next_or_None)
if res is not ... | [
"def",
"rate_limited_iter",
"(",
"l",
")",
":",
"pool",
"=",
"ThreadPool",
"(",
"1",
")",
"res",
"=",
"None",
"def",
"next_or_None",
"(",
")",
":",
"try",
":",
"return",
"next",
"(",
"l",
")",
"except",
"StopIteration",
":",
"return",
"None",
"while",
... | [
36,
0
] | [
54,
22
] | python | en | ['en', 'en', 'en'] | True |
ImpalaDatabase.create_table | (self, table_name, obj=None, **kwargs) |
Dispatch to ImpalaClient.create_table. See that function's docstring
for more
|
Dispatch to ImpalaClient.create_table. See that function's docstring
for more
| def create_table(self, table_name, obj=None, **kwargs):
"""
Dispatch to ImpalaClient.create_table. See that function's docstring
for more
"""
return self.client.create_table(table_name, obj=obj,
database=self.name, **kwargs) | [
"def",
"create_table",
"(",
"self",
",",
"table_name",
",",
"obj",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"client",
".",
"create_table",
"(",
"table_name",
",",
"obj",
"=",
"obj",
",",
"database",
"=",
"self",
".",
"na... | [
34,
4
] | [
40,
69
] | python | en | ['en', 'error', 'th'] | False |
ImpalaConnection.close | (self) |
Close all open Impyla sessions
|
Close all open Impyla sessions
| def close(self):
"""
Close all open Impyla sessions
"""
self._connections.clear()
self.connection_pool.clear()
for impyla_connection in self._connections:
impyla_connection.close() | [
"def",
"close",
"(",
"self",
")",
":",
"self",
".",
"_connections",
".",
"clear",
"(",
")",
"self",
".",
"connection_pool",
".",
"clear",
"(",
")",
"for",
"impyla_connection",
"in",
"self",
".",
"_connections",
":",
"impyla_connection",
".",
"close",
"(",
... | [
74,
4
] | [
82,
37
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.compute_stats | (self, incremental=False) |
Invoke Impala COMPUTE STATS command to compute column, table, and
partition statistics.
See also ImpalaClient.compute_stats
|
Invoke Impala COMPUTE STATS command to compute column, table, and
partition statistics. | def compute_stats(self, incremental=False):
"""
Invoke Impala COMPUTE STATS command to compute column, table, and
partition statistics.
See also ImpalaClient.compute_stats
"""
return self._client.compute_stats(self._qualified_name,
... | [
"def",
"compute_stats",
"(",
"self",
",",
"incremental",
"=",
"False",
")",
":",
"return",
"self",
".",
"_client",
".",
"compute_stats",
"(",
"self",
".",
"_qualified_name",
",",
"incremental",
"=",
"incremental",
")"
] | [
368,
4
] | [
376,
66
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.metadata | (self) |
Return parsed results of DESCRIBE FORMATTED statement
Returns
-------
meta : TableMetadata
|
Return parsed results of DESCRIBE FORMATTED statement | def metadata(self):
"""
Return parsed results of DESCRIBE FORMATTED statement
Returns
-------
meta : TableMetadata
"""
return self._client.describe_formatted(self._qualified_name) | [
"def",
"metadata",
"(",
"self",
")",
":",
"return",
"self",
".",
"_client",
".",
"describe_formatted",
"(",
"self",
".",
"_qualified_name",
")"
] | [
384,
4
] | [
392,
68
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.files | (self) |
Return results of SHOW FILES statement
|
Return results of SHOW FILES statement
| def files(self):
"""
Return results of SHOW FILES statement
"""
return self._client.show_files(self._qualified_name) | [
"def",
"files",
"(",
"self",
")",
":",
"return",
"self",
".",
"_client",
".",
"show_files",
"(",
"self",
".",
"_qualified_name",
")"
] | [
396,
4
] | [
400,
60
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.drop | (self) |
Drop the table from the database
|
Drop the table from the database
| def drop(self):
"""
Drop the table from the database
"""
self._client.drop_table_or_view(self._qualified_name) | [
"def",
"drop",
"(",
"self",
")",
":",
"self",
".",
"_client",
".",
"drop_table_or_view",
"(",
"self",
".",
"_qualified_name",
")"
] | [
402,
4
] | [
406,
61
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.insert | (self, obj=None, overwrite=False, partition=None,
values=None, validate=True, results=False) |
Insert into Impala table. Wraps ImpalaClient.insert
Parameters
----------
obj : TableExpr or pandas DataFrame
overwrite : boolean, default False
If True, will replace existing contents of table
partition : list or dict, optional
For partitioned table... |
Insert into Impala table. Wraps ImpalaClient.insert | def insert(self, obj=None, overwrite=False, partition=None,
values=None, validate=True, results=False):
"""
Insert into Impala table. Wraps ImpalaClient.insert
Parameters
----------
obj : TableExpr or pandas DataFrame
overwrite : boolean, default False
... | [
"def",
"insert",
"(",
"self",
",",
"obj",
"=",
"None",
",",
"overwrite",
"=",
"False",
",",
"partition",
"=",
"None",
",",
"values",
"=",
"None",
",",
"validate",
"=",
"True",
",",
"results",
"=",
"False",
")",
":",
"if",
"isinstance",
"(",
"obj",
... | [
411,
4
] | [
473,
56
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.load_data | (self, path, overwrite=False, partition=None) |
Wraps the LOAD DATA DDL statement. Loads data into an Impala table by
physically moving data files.
Parameters
----------
path : string
overwrite : boolean, default False
Overwrite the existing data in the entire table or indicated
partition
... |
Wraps the LOAD DATA DDL statement. Loads data into an Impala table by
physically moving data files. | def load_data(self, path, overwrite=False, partition=None):
"""
Wraps the LOAD DATA DDL statement. Loads data into an Impala table by
physically moving data files.
Parameters
----------
path : string
overwrite : boolean, default False
Overwrite the exis... | [
"def",
"load_data",
"(",
"self",
",",
"path",
",",
"overwrite",
"=",
"False",
",",
"partition",
"=",
"None",
")",
":",
"if",
"partition",
"is",
"not",
"None",
":",
"partition_schema",
"=",
"self",
".",
"partition_schema",
"(",
")",
"else",
":",
"partitio... | [
475,
4
] | [
502,
34
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.rename | (self, new_name, database=None) |
Rename table inside Impala. References to the old table are no longer
valid.
Parameters
----------
new_name : string
database : string
Returns
-------
renamed : ImpalaTable
|
Rename table inside Impala. References to the old table are no longer
valid. | def rename(self, new_name, database=None):
"""
Rename table inside Impala. References to the old table are no longer
valid.
Parameters
----------
new_name : string
database : string
Returns
-------
renamed : ImpalaTable
"""
... | [
"def",
"rename",
"(",
"self",
",",
"new_name",
",",
"database",
"=",
"None",
")",
":",
"m",
"=",
"ddl",
".",
"fully_qualified_re",
".",
"match",
"(",
"new_name",
")",
"if",
"not",
"m",
"and",
"database",
"is",
"None",
":",
"database",
"=",
"self",
".... | [
508,
4
] | [
530,
29
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.is_partitioned | (self) |
True if the table is partitioned
|
True if the table is partitioned
| def is_partitioned(self):
"""
True if the table is partitioned
"""
return self.metadata().is_partitioned | [
"def",
"is_partitioned",
"(",
"self",
")",
":",
"return",
"self",
".",
"metadata",
"(",
")",
".",
"is_partitioned"
] | [
536,
4
] | [
540,
45
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.partition_schema | (self) |
For partitioned tables, return the schema (names and types) for the
partition columns
Returns
-------
partition_schema : ibis Schema
|
For partitioned tables, return the schema (names and types) for the
partition columns | def partition_schema(self):
"""
For partitioned tables, return the schema (names and types) for the
partition columns
Returns
-------
partition_schema : ibis Schema
"""
schema = self.schema()
name_to_type = dict(zip(schema.names, schema.types))
... | [
"def",
"partition_schema",
"(",
"self",
")",
":",
"schema",
"=",
"self",
".",
"schema",
"(",
")",
"name_to_type",
"=",
"dict",
"(",
"zip",
"(",
"schema",
".",
"names",
",",
"schema",
".",
"types",
")",
")",
"result",
"=",
"self",
".",
"partitions",
"... | [
542,
4
] | [
563,
41
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.add_partition | (self, spec, location=None) |
Add a new table partition, creating any new directories in HDFS if
necessary.
Partition parameters can be set in a single DDL statement, or you can
use alter_partition to set them after the fact.
Returns
-------
None (for now)
|
Add a new table partition, creating any new directories in HDFS if
necessary. | def add_partition(self, spec, location=None):
"""
Add a new table partition, creating any new directories in HDFS if
necessary.
Partition parameters can be set in a single DDL statement, or you can
use alter_partition to set them after the fact.
Returns
-------
... | [
"def",
"add_partition",
"(",
"self",
",",
"spec",
",",
"location",
"=",
"None",
")",
":",
"part_schema",
"=",
"self",
".",
"partition_schema",
"(",
")",
"stmt",
"=",
"ddl",
".",
"AddPartition",
"(",
"self",
".",
"_qualified_name",
",",
"spec",
",",
"part... | [
565,
4
] | [
580,
34
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.alter | (self, location=None, format=None, tbl_properties=None,
serde_properties=None) |
Change setting and parameters of the table.
Parameters
----------
location : string, optional
For partitioned tables, you may want the alter_partition function
format : string, optional
tbl_properties : dict, optional
serde_properties : dict, optional
... |
Change setting and parameters of the table. | def alter(self, location=None, format=None, tbl_properties=None,
serde_properties=None):
"""
Change setting and parameters of the table.
Parameters
----------
location : string, optional
For partitioned tables, you may want the alter_partition function
... | [
"def",
"alter",
"(",
"self",
",",
"location",
"=",
"None",
",",
"format",
"=",
"None",
",",
"tbl_properties",
"=",
"None",
",",
"serde_properties",
"=",
"None",
")",
":",
"def",
"_run_ddl",
"(",
"*",
"*",
"kwds",
")",
":",
"stmt",
"=",
"ddl",
".",
... | [
582,
4
] | [
606,
74
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.set_external | (self, is_external=True) |
Toggle EXTERNAL table property.
|
Toggle EXTERNAL table property.
| def set_external(self, is_external=True):
"""
Toggle EXTERNAL table property.
"""
self.alter(tbl_properties={'EXTERNAL': is_external}) | [
"def",
"set_external",
"(",
"self",
",",
"is_external",
"=",
"True",
")",
":",
"self",
".",
"alter",
"(",
"tbl_properties",
"=",
"{",
"'EXTERNAL'",
":",
"is_external",
"}",
")"
] | [
608,
4
] | [
612,
60
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.alter_partition | (self, spec, location=None, format=None,
tbl_properties=None,
serde_properties=None) |
Change setting and parameters of an existing partition
Parameters
----------
spec : dict or list
The partition keys for the partition being modified
location : string, optional
format : string, optional
tbl_properties : dict, optional
serde_pro... |
Change setting and parameters of an existing partition | def alter_partition(self, spec, location=None, format=None,
tbl_properties=None,
serde_properties=None):
"""
Change setting and parameters of an existing partition
Parameters
----------
spec : dict or list
The partition k... | [
"def",
"alter_partition",
"(",
"self",
",",
"spec",
",",
"location",
"=",
"None",
",",
"format",
"=",
"None",
",",
"tbl_properties",
"=",
"None",
",",
"serde_properties",
"=",
"None",
")",
":",
"part_schema",
"=",
"self",
".",
"partition_schema",
"(",
")",... | [
614,
4
] | [
643,
74
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.drop_partition | (self, spec) |
Drop an existing table partition
|
Drop an existing table partition
| def drop_partition(self, spec):
"""
Drop an existing table partition
"""
part_schema = self.partition_schema()
stmt = ddl.DropPartition(self._qualified_name, spec, part_schema)
return self._execute(stmt) | [
"def",
"drop_partition",
"(",
"self",
",",
"spec",
")",
":",
"part_schema",
"=",
"self",
".",
"partition_schema",
"(",
")",
"stmt",
"=",
"ddl",
".",
"DropPartition",
"(",
"self",
".",
"_qualified_name",
",",
"spec",
",",
"part_schema",
")",
"return",
"self... | [
654,
4
] | [
660,
34
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.partitions | (self) |
Return a pandas.DataFrame giving information about this table's
partitions. Raises an exception if the table is not partitioned.
Returns
-------
partitions : pandas.DataFrame
|
Return a pandas.DataFrame giving information about this table's
partitions. Raises an exception if the table is not partitioned. | def partitions(self):
"""
Return a pandas.DataFrame giving information about this table's
partitions. Raises an exception if the table is not partitioned.
Returns
-------
partitions : pandas.DataFrame
"""
return self._client.list_partitions(self._qualifie... | [
"def",
"partitions",
"(",
"self",
")",
":",
"return",
"self",
".",
"_client",
".",
"list_partitions",
"(",
"self",
".",
"_qualified_name",
")"
] | [
662,
4
] | [
671,
65
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.stats | (self) |
Return results of SHOW TABLE STATS as a DataFrame. If not partitioned,
contains only one row
Returns
-------
stats : pandas.DataFrame
|
Return results of SHOW TABLE STATS as a DataFrame. If not partitioned,
contains only one row | def stats(self):
"""
Return results of SHOW TABLE STATS as a DataFrame. If not partitioned,
contains only one row
Returns
-------
stats : pandas.DataFrame
"""
return self._client.table_stats(self._qualified_name) | [
"def",
"stats",
"(",
"self",
")",
":",
"return",
"self",
".",
"_client",
".",
"table_stats",
"(",
"self",
".",
"_qualified_name",
")"
] | [
673,
4
] | [
682,
61
] | python | en | ['en', 'error', 'th'] | False |
ImpalaTable.column_stats | (self) |
Return results of SHOW COLUMN STATS as a pandas DataFrame
Returns
-------
column_stats : pandas.DataFrame
|
Return results of SHOW COLUMN STATS as a pandas DataFrame | def column_stats(self):
"""
Return results of SHOW COLUMN STATS as a pandas DataFrame
Returns
-------
column_stats : pandas.DataFrame
"""
return self._client.column_stats(self._qualified_name) | [
"def",
"column_stats",
"(",
"self",
")",
":",
"return",
"self",
".",
"_client",
".",
"column_stats",
"(",
"self",
".",
"_qualified_name",
")"
] | [
684,
4
] | [
692,
62
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.close | (self) |
Close Impala connection and drop any temporary objects
|
Close Impala connection and drop any temporary objects
| def close(self):
"""
Close Impala connection and drop any temporary objects
"""
for k, v in self._temp_objects.items():
try:
v.drop()
except HS2Error:
pass
self.con.close() | [
"def",
"close",
"(",
"self",
")",
":",
"for",
"k",
",",
"v",
"in",
"self",
".",
"_temp_objects",
".",
"items",
"(",
")",
":",
"try",
":",
"v",
".",
"drop",
"(",
")",
"except",
"HS2Error",
":",
"pass",
"self",
".",
"con",
".",
"close",
"(",
")"
... | [
747,
4
] | [
757,
24
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.disable_codegen | (self, disabled=True) |
Turn off or on LLVM codegen in Impala query execution
Parameters
----------
disabled : boolean, default True
To disable codegen, pass with no argument or True. To enable codegen,
pass False
|
Turn off or on LLVM codegen in Impala query execution | def disable_codegen(self, disabled=True):
"""
Turn off or on LLVM codegen in Impala query execution
Parameters
----------
disabled : boolean, default True
To disable codegen, pass with no argument or True. To enable codegen,
pass False
"""
sel... | [
"def",
"disable_codegen",
"(",
"self",
",",
"disabled",
"=",
"True",
")",
":",
"self",
".",
"con",
".",
"disable_codegen",
"(",
"disabled",
")"
] | [
759,
4
] | [
769,
42
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.list_tables | (self, like=None, database=None) |
List tables in the current (or indicated) database. Like the SHOW
TABLES command in the impala-shell.
Parameters
----------
like : string, default None
e.g. 'foo*' to match all tables starting with 'foo'
database : string, default None
If not passed,... |
List tables in the current (or indicated) database. Like the SHOW
TABLES command in the impala-shell. | def list_tables(self, like=None, database=None):
"""
List tables in the current (or indicated) database. Like the SHOW
TABLES command in the impala-shell.
Parameters
----------
like : string, default None
e.g. 'foo*' to match all tables starting with 'foo'
... | [
"def",
"list_tables",
"(",
"self",
",",
"like",
"=",
"None",
",",
"database",
"=",
"None",
")",
":",
"statement",
"=",
"'SHOW TABLES'",
"if",
"database",
":",
"statement",
"+=",
"' IN {0}'",
".",
"format",
"(",
"database",
")",
"if",
"like",
":",
"m",
... | [
781,
4
] | [
811,
21
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.set_database | (self, name) |
Set the default database scope for client
|
Set the default database scope for client
| def set_database(self, name):
"""
Set the default database scope for client
"""
self.con.set_database(name) | [
"def",
"set_database",
"(",
"self",
",",
"name",
")",
":",
"self",
".",
"con",
".",
"set_database",
"(",
"name",
")"
] | [
820,
4
] | [
824,
35
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.exists_database | (self, name) |
Checks if a given database exists
Parameters
----------
name : string
Database name
Returns
-------
if_exists : boolean
|
Checks if a given database exists | def exists_database(self, name):
"""
Checks if a given database exists
Parameters
----------
name : string
Database name
Returns
-------
if_exists : boolean
"""
return len(self.list_databases(like=name)) > 0 | [
"def",
"exists_database",
"(",
"self",
",",
"name",
")",
":",
"return",
"len",
"(",
"self",
".",
"list_databases",
"(",
"like",
"=",
"name",
")",
")",
">",
"0"
] | [
826,
4
] | [
839,
54
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.create_database | (self, name, path=None, force=False) |
Create a new Impala database
Parameters
----------
name : string
Database name
path : string, default None
HDFS path where to store the database data; otherwise uses Impala
default
|
Create a new Impala database | def create_database(self, name, path=None, force=False):
"""
Create a new Impala database
Parameters
----------
name : string
Database name
path : string, default None
HDFS path where to store the database data; otherwise uses Impala
default... | [
"def",
"create_database",
"(",
"self",
",",
"name",
",",
"path",
"=",
"None",
",",
"force",
"=",
"False",
")",
":",
"if",
"path",
":",
"# explicit mkdir ensures the user own the dir rather than impala,",
"# which is easier for manual cleanup, if necessary",
"self",
".",
... | [
841,
4
] | [
858,
39
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.drop_database | (self, name, force=False) |
Drop an Impala database
Parameters
----------
name : string
Database name
force : boolean, default False
If False and there are any tables in this database, raises an
IntegrityError
|
Drop an Impala database | def drop_database(self, name, force=False):
"""
Drop an Impala database
Parameters
----------
name : string
Database name
force : boolean, default False
If False and there are any tables in this database, raises an
IntegrityError
"""... | [
"def",
"drop_database",
"(",
"self",
",",
"name",
",",
"force",
"=",
"False",
")",
":",
"if",
"not",
"force",
"or",
"self",
".",
"exists_database",
"(",
"name",
")",
":",
"tables",
"=",
"self",
".",
"list_tables",
"(",
"database",
"=",
"name",
")",
"... | [
860,
4
] | [
900,
39
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.list_databases | (self, like=None) |
List databases in the Impala cluster. Like the SHOW DATABASES command
in the impala-shell.
Parameters
----------
like : string, default None
e.g. 'foo*' to match all tables starting with 'foo'
Returns
-------
databases : list of strings
... |
List databases in the Impala cluster. Like the SHOW DATABASES command
in the impala-shell. | def list_databases(self, like=None):
"""
List databases in the Impala cluster. Like the SHOW DATABASES command
in the impala-shell.
Parameters
----------
like : string, default None
e.g. 'foo*' to match all tables starting with 'foo'
Returns
--... | [
"def",
"list_databases",
"(",
"self",
",",
"like",
"=",
"None",
")",
":",
"statement",
"=",
"'SHOW DATABASES'",
"if",
"like",
":",
"statement",
"+=",
"\" LIKE '{0}'\"",
".",
"format",
"(",
"like",
")",
"with",
"self",
".",
"_execute",
"(",
"statement",
","... | [
902,
4
] | [
923,
22
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.get_schema | (self, table_name, database=None) |
Return a Schema object for the indicated table and database
Parameters
----------
table_name : string
May be fully qualified
database : string, default None
Returns
-------
schema : ibis Schema
|
Return a Schema object for the indicated table and database | def get_schema(self, table_name, database=None):
"""
Return a Schema object for the indicated table and database
Parameters
----------
table_name : string
May be fully qualified
database : string, default None
Returns
-------
schema : i... | [
"def",
"get_schema",
"(",
"self",
",",
"table_name",
",",
"database",
"=",
"None",
")",
":",
"qualified_name",
"=",
"self",
".",
"_fully_qualified_name",
"(",
"table_name",
",",
"database",
")",
"query",
"=",
"'DESCRIBE {}'",
".",
"format",
"(",
"qualified_nam... | [
925,
4
] | [
949,
44
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.get_options | (self) |
Return current query options for the Impala session
|
Return current query options for the Impala session
| def get_options(self):
"""
Return current query options for the Impala session
"""
query = 'SET'
return dict(row[:2] for row in self.con.fetchall(query)) | [
"def",
"get_options",
"(",
"self",
")",
":",
"query",
"=",
"'SET'",
"return",
"dict",
"(",
"row",
"[",
":",
"2",
"]",
"for",
"row",
"in",
"self",
".",
"con",
".",
"fetchall",
"(",
"query",
")",
")"
] | [
963,
4
] | [
968,
64
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.set_compression_codec | (self, codec) |
Parameters
|
Parameters
| def set_compression_codec(self, codec):
"""
Parameters
"""
if codec is None:
codec = 'none'
else:
codec = codec.lower()
if codec not in ('none', 'gzip', 'snappy'):
raise ValueError('Unknown codec: {0}'.format(codec))
self.set_... | [
"def",
"set_compression_codec",
"(",
"self",
",",
"codec",
")",
":",
"if",
"codec",
"is",
"None",
":",
"codec",
"=",
"'none'",
"else",
":",
"codec",
"=",
"codec",
".",
"lower",
"(",
")",
"if",
"codec",
"not",
"in",
"(",
"'none'",
",",
"'gzip'",
",",
... | [
977,
4
] | [
989,
54
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.exists_table | (self, name, database=None) |
Determine if the indicated table or view exists
Parameters
----------
name : string
database : string, default None
Returns
-------
if_exists : boolean
|
Determine if the indicated table or view exists | def exists_table(self, name, database=None):
"""
Determine if the indicated table or view exists
Parameters
----------
name : string
database : string, default None
Returns
-------
if_exists : boolean
"""
return len(self.list_tabl... | [
"def",
"exists_table",
"(",
"self",
",",
"name",
",",
"database",
"=",
"None",
")",
":",
"return",
"len",
"(",
"self",
".",
"list_tables",
"(",
"like",
"=",
"name",
",",
"database",
"=",
"database",
")",
")",
">",
"0"
] | [
991,
4
] | [
1004,
70
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.create_view | (self, name, expr, database=None) |
Create an Impala view from a table expression
Parameters
----------
name : string
expr : ibis TableExpr
database : string, default None
|
Create an Impala view from a table expression | def create_view(self, name, expr, database=None):
"""
Create an Impala view from a table expression
Parameters
----------
name : string
expr : ibis TableExpr
database : string, default None
"""
ast = self._build_ast(expr, ImpalaDialect.make_contex... | [
"def",
"create_view",
"(",
"self",
",",
"name",
",",
"expr",
",",
"database",
"=",
"None",
")",
":",
"ast",
"=",
"self",
".",
"_build_ast",
"(",
"expr",
",",
"ImpalaDialect",
".",
"make_context",
"(",
")",
")",
"select",
"=",
"ast",
".",
"queries",
"... | [
1006,
4
] | [
1019,
39
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.drop_view | (self, name, database=None, force=False) |
Drop an Impala view
Parameters
----------
name : string
database : string, default None
force : boolean, default False
Database may throw exception if table does not exist
|
Drop an Impala view | def drop_view(self, name, database=None, force=False):
"""
Drop an Impala view
Parameters
----------
name : string
database : string, default None
force : boolean, default False
Database may throw exception if table does not exist
"""
st... | [
"def",
"drop_view",
"(",
"self",
",",
"name",
",",
"database",
"=",
"None",
",",
"force",
"=",
"False",
")",
":",
"statement",
"=",
"ddl",
".",
"DropView",
"(",
"name",
",",
"database",
"=",
"database",
",",
"must_exist",
"=",
"not",
"force",
")",
"r... | [
1021,
4
] | [
1034,
39
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.create_table | (self, table_name, obj=None, schema=None, database=None,
external=False, force=False,
# HDFS options
format='parquet', location=None,
partition=None, like_parquet=None) |
Create a new table in Impala using an Ibis table expression. This is
currently designed for tables whose data is stored in HDFS (or
eventually other filesystems).
Parameters
----------
table_name : string
obj : TableExpr or pandas.DataFrame, optional
I... |
Create a new table in Impala using an Ibis table expression. This is
currently designed for tables whose data is stored in HDFS (or
eventually other filesystems). | def create_table(self, table_name, obj=None, schema=None, database=None,
external=False, force=False,
# HDFS options
format='parquet', location=None,
partition=None, like_parquet=None):
"""
Create a new table in Impala u... | [
"def",
"create_table",
"(",
"self",
",",
"table_name",
",",
"obj",
"=",
"None",
",",
"schema",
"=",
"None",
",",
"database",
"=",
"None",
",",
"external",
"=",
"False",
",",
"force",
"=",
"False",
",",
"# HDFS options",
"format",
"=",
"'parquet'",
",",
... | [
1036,
4
] | [
1104,
39
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.avro_file | (self, hdfs_dir, avro_schema, name=None, database=None,
external=True, persist=False) |
Create a (possibly temporary) table to read a collection of Avro data.
Parameters
----------
hdfs_dir : string
Absolute HDFS path to directory containing avro files
avro_schema : dict
The Avro schema for the data as a Python dict
name : string, defau... |
Create a (possibly temporary) table to read a collection of Avro data. | def avro_file(self, hdfs_dir, avro_schema, name=None, database=None,
external=True, persist=False):
"""
Create a (possibly temporary) table to read a collection of Avro data.
Parameters
----------
hdfs_dir : string
Absolute HDFS path to directory cont... | [
"def",
"avro_file",
"(",
"self",
",",
"hdfs_dir",
",",
"avro_schema",
",",
"name",
"=",
"None",
",",
"database",
"=",
"None",
",",
"external",
"=",
"True",
",",
"persist",
"=",
"False",
")",
":",
"name",
",",
"database",
"=",
"self",
".",
"_get_concret... | [
1106,
4
] | [
1133,
60
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.delimited_file | (self, hdfs_dir, schema, name=None, database=None,
delimiter=',',
na_rep=None, escapechar=None, lineterminator=None,
external=True, persist=False) |
Interpret delimited text files (CSV / TSV / etc.) as an Ibis table. See
`parquet_file` for more exposition on what happens under the hood.
Parameters
----------
hdfs_dir : string
HDFS directory name containing delimited text files
schema : ibis Schema
... |
Interpret delimited text files (CSV / TSV / etc.) as an Ibis table. See
`parquet_file` for more exposition on what happens under the hood. | def delimited_file(self, hdfs_dir, schema, name=None, database=None,
delimiter=',',
na_rep=None, escapechar=None, lineterminator=None,
external=True, persist=False):
"""
Interpret delimited text files (CSV / TSV / etc.) as an Ibis tabl... | [
"def",
"delimited_file",
"(",
"self",
",",
"hdfs_dir",
",",
"schema",
",",
"name",
"=",
"None",
",",
"database",
"=",
"None",
",",
"delimiter",
"=",
"','",
",",
"na_rep",
"=",
"None",
",",
"escapechar",
"=",
"None",
",",
"lineterminator",
"=",
"None",
... | [
1135,
4
] | [
1182,
60
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.parquet_file | (self, hdfs_dir, schema=None, name=None, database=None,
external=True, like_file=None, like_table=None,
persist=False) |
Make indicated parquet file in HDFS available as an Ibis table.
The table created can be optionally named and persisted, otherwise a
unique name will be generated. Temporarily, for any non-persistent
external table created by Ibis we will attempt to drop it when the
underlying ... |
Make indicated parquet file in HDFS available as an Ibis table. | def parquet_file(self, hdfs_dir, schema=None, name=None, database=None,
external=True, like_file=None, like_table=None,
persist=False):
"""
Make indicated parquet file in HDFS available as an Ibis table.
The table created can be optionally named and per... | [
"def",
"parquet_file",
"(",
"self",
",",
"hdfs_dir",
",",
"schema",
"=",
"None",
",",
"name",
"=",
"None",
",",
"database",
"=",
"None",
",",
"external",
"=",
"True",
",",
"like_file",
"=",
"None",
",",
"like_table",
"=",
"None",
",",
"persist",
"=",
... | [
1184,
4
] | [
1242,
60
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.text_file | (self, hdfs_path, column_name='value') |
Interpret text data as a table with a single string column.
Parameters
----------
Returns
-------
text_table : TableExpr
|
Interpret text data as a table with a single string column. | def text_file(self, hdfs_path, column_name='value'):
"""
Interpret text data as a table with a single string column.
Parameters
----------
Returns
-------
text_table : TableExpr
"""
pass | [
"def",
"text_file",
"(",
"self",
",",
"hdfs_path",
",",
"column_name",
"=",
"'value'",
")",
":",
"pass"
] | [
1293,
4
] | [
1304,
12
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.insert | (self, table_name, obj=None, database=None, overwrite=False,
partition=None, values=None, validate=True, results=False) |
Insert into existing table.
See ImpalaTable.insert for other parameters.
Parameters
----------
table_name : string
database : string, default None
results : boolean, default False
Examples
--------
con.insert('my_table', table_expr)
... |
Insert into existing table. | def insert(self, table_name, obj=None, database=None, overwrite=False,
partition=None, values=None, validate=True, results=False):
"""
Insert into existing table.
See ImpalaTable.insert for other parameters.
Parameters
----------
table_name : string
... | [
"def",
"insert",
"(",
"self",
",",
"table_name",
",",
"obj",
"=",
"None",
",",
"database",
"=",
"None",
",",
"overwrite",
"=",
"False",
",",
"partition",
"=",
"None",
",",
"values",
"=",
"None",
",",
"validate",
"=",
"True",
",",
"results",
"=",
"Fal... | [
1306,
4
] | [
1328,
78
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.load_data | (self, table_name, path, database=None, overwrite=False,
partition=None) |
Wraps the LOAD DATA DDL statement. Loads data into an Impala table by
physically moving data files.
Parameters
----------
table_name : string
database : string, default None (optional)
|
Wraps the LOAD DATA DDL statement. Loads data into an Impala table by
physically moving data files. | def load_data(self, table_name, path, database=None, overwrite=False,
partition=None):
"""
Wraps the LOAD DATA DDL statement. Loads data into an Impala table by
physically moving data files.
Parameters
----------
table_name : string
database : s... | [
"def",
"load_data",
"(",
"self",
",",
"table_name",
",",
"path",
",",
"database",
"=",
"None",
",",
"overwrite",
"=",
"False",
",",
"partition",
"=",
"None",
")",
":",
"table",
"=",
"self",
".",
"table",
"(",
"table_name",
",",
"database",
"=",
"databa... | [
1330,
4
] | [
1343,
51
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.drop_table | (self, table_name, database=None, force=False) |
Drop an Impala table
Parameters
----------
table_name : string
database : string, default None (optional)
force : boolean, default False
Database may throw exception if table does not exist
Examples
--------
>>> table = 'my_table'
... |
Drop an Impala table | def drop_table(self, table_name, database=None, force=False):
"""
Drop an Impala table
Parameters
----------
table_name : string
database : string, default None (optional)
force : boolean, default False
Database may throw exception if table does not exi... | [
"def",
"drop_table",
"(",
"self",
",",
"table_name",
",",
"database",
"=",
"None",
",",
"force",
"=",
"False",
")",
":",
"statement",
"=",
"ddl",
".",
"DropTable",
"(",
"table_name",
",",
"database",
"=",
"database",
",",
"must_exist",
"=",
"not",
"force... | [
1345,
4
] | [
1364,
32
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.truncate_table | (self, table_name, database=None) |
Delete all rows from, but do not drop, an existing table
Parameters
----------
table_name : string
database : string, default None (optional)
|
Delete all rows from, but do not drop, an existing table | def truncate_table(self, table_name, database=None):
"""
Delete all rows from, but do not drop, an existing table
Parameters
----------
table_name : string
database : string, default None (optional)
"""
statement = ddl.TruncateTable(table_name, database=d... | [
"def",
"truncate_table",
"(",
"self",
",",
"table_name",
",",
"database",
"=",
"None",
")",
":",
"statement",
"=",
"ddl",
".",
"TruncateTable",
"(",
"table_name",
",",
"database",
"=",
"database",
")",
"self",
".",
"_execute",
"(",
"statement",
")"
] | [
1366,
4
] | [
1376,
32
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.drop_table_or_view | (self, name, database=None, force=False) |
Attempt to drop a relation that may be a view or table
|
Attempt to drop a relation that may be a view or table
| def drop_table_or_view(self, name, database=None, force=False):
"""
Attempt to drop a relation that may be a view or table
"""
try:
self.drop_table(name, database=database)
except Exception as e:
try:
self.drop_view(name, database=database)... | [
"def",
"drop_table_or_view",
"(",
"self",
",",
"name",
",",
"database",
"=",
"None",
",",
"force",
"=",
"False",
")",
":",
"try",
":",
"self",
".",
"drop_table",
"(",
"name",
",",
"database",
"=",
"database",
")",
"except",
"Exception",
"as",
"e",
":",... | [
1378,
4
] | [
1388,
23
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.cache_table | (self, table_name, database=None, pool='default') |
Caches a table in cluster memory in the given pool.
Parameters
----------
table_name : string
database : string default None (optional)
pool : string, default 'default'
The name of the pool in which to cache the table
Examples
--------
... |
Caches a table in cluster memory in the given pool. | def cache_table(self, table_name, database=None, pool='default'):
"""
Caches a table in cluster memory in the given pool.
Parameters
----------
table_name : string
database : string default None (optional)
pool : string, default 'default'
The name of t... | [
"def",
"cache_table",
"(",
"self",
",",
"table_name",
",",
"database",
"=",
"None",
",",
"pool",
"=",
"'default'",
")",
":",
"statement",
"=",
"ddl",
".",
"CacheTable",
"(",
"table_name",
",",
"database",
"=",
"database",
",",
"pool",
"=",
"pool",
")",
... | [
1390,
4
] | [
1409,
32
] | python | en | ['en', 'error', 'th'] | False |
ImpalaClient.create_function | (self, func, name=None, database=None) |
Creates a function within Impala
Parameters
----------
func : ImpalaUDF or ImpalaUDA
Created with wrap_udf or wrap_uda
name : string (optional)
database : string (optional)
|
Creates a function within Impala | def create_function(self, func, name=None, database=None):
"""
Creates a function within Impala
Parameters
----------
func : ImpalaUDF or ImpalaUDA
Created with wrap_udf or wrap_uda
name : string (optional)
database : string (optional)
"""
... | [
"def",
"create_function",
"(",
"self",
",",
"func",
",",
"name",
"=",
"None",
",",
"database",
"=",
"None",
")",
":",
"if",
"name",
"is",
"None",
":",
"name",
"=",
"func",
".",
"name",
"database",
"=",
"database",
"or",
"self",
".",
"current_database",... | [
1429,
4
] | [
1450,
27
] | python | en | ['en', 'error', 'th'] | False |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.