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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
unpack | (archive, location, log = EmptyLogger()) |
Unpacks a mingw-builds archive
|
Unpacks a mingw-builds archive
| def unpack(archive, location, log = EmptyLogger()):
'''
Unpacks a mingw-builds archive
'''
sevenzip = find_7zip(log)
log.info('unpacking %s', os.path.basename(archive))
cmd = [sevenzip, 'x', archive, '-o' + location, '-y']
log.debug(' - %r', cmd)
with open(os.devnull, 'w') as devnull:
... | [
"def",
"unpack",
"(",
"archive",
",",
"location",
",",
"log",
"=",
"EmptyLogger",
"(",
")",
")",
":",
"sevenzip",
"=",
"find_7zip",
"(",
"log",
")",
"log",
".",
"info",
"(",
"'unpacking %s'",
",",
"os",
".",
"path",
".",
"basename",
"(",
"archive",
"... | [
113,
0
] | [
122,
52
] | python | en | ['en', 'error', 'th'] | False |
download | (url, location, log = EmptyLogger()) |
Downloads and unpacks a mingw-builds archive
|
Downloads and unpacks a mingw-builds archive
| def download(url, location, log = EmptyLogger()):
'''
Downloads and unpacks a mingw-builds archive
'''
log.info('downloading MinGW')
log.debug(' - url: %s', url)
log.debug(' - location: %s', location)
re_content = re.compile(r'attachment;[ \t]*filename=(")?([^"]*)(")?[\r\n]*')
stream =... | [
"def",
"download",
"(",
"url",
",",
"location",
",",
"log",
"=",
"EmptyLogger",
"(",
")",
")",
":",
"log",
".",
"info",
"(",
"'downloading MinGW'",
")",
"log",
".",
"debug",
"(",
"' - url: %s'",
",",
"url",
")",
"log",
".",
"debug",
"(",
"' - location:... | [
124,
0
] | [
169,
19
] | python | en | ['en', 'error', 'th'] | False |
root | (location = None, arch = None, version = None, threading = None,
exceptions = None, revision = None, log = EmptyLogger()) |
Returns the root folder of a specific version of the mingw-builds variant
of gcc. Will download the compiler if needed
|
Returns the root folder of a specific version of the mingw-builds variant
of gcc. Will download the compiler if needed
| def root(location = None, arch = None, version = None, threading = None,
exceptions = None, revision = None, log = EmptyLogger()):
'''
Returns the root folder of a specific version of the mingw-builds variant
of gcc. Will download the compiler if needed
'''
# Get the repository if we don't ... | [
"def",
"root",
"(",
"location",
"=",
"None",
",",
"arch",
"=",
"None",
",",
"version",
"=",
"None",
",",
"threading",
"=",
"None",
",",
"exceptions",
"=",
"None",
",",
"revision",
"=",
"None",
",",
"log",
"=",
"EmptyLogger",
"(",
")",
")",
":",
"# ... | [
171,
0
] | [
245,
19
] | python | en | ['en', 'error', 'th'] | False |
str2ver | (string) |
Converts a version string into a tuple
|
Converts a version string into a tuple
| def str2ver(string):
'''
Converts a version string into a tuple
'''
try:
version = tuple(int(v) for v in string.split('.'))
if len(version) is not 3:
raise ValueError()
except ValueError:
raise argparse.ArgumentTypeError(
'please provide a three digit ... | [
"def",
"str2ver",
"(",
"string",
")",
":",
"try",
":",
"version",
"=",
"tuple",
"(",
"int",
"(",
"v",
")",
"for",
"v",
"in",
"string",
".",
"split",
"(",
"'.'",
")",
")",
"if",
"len",
"(",
"version",
")",
"is",
"not",
"3",
":",
"raise",
"ValueE... | [
247,
0
] | [
258,
18
] | python | en | ['en', 'error', 'th'] | False |
main | () |
Invoked when the script is run directly by the python interpreter
|
Invoked when the script is run directly by the python interpreter
| def main():
'''
Invoked when the script is run directly by the python interpreter
'''
parser = argparse.ArgumentParser(
description = 'Downloads a specific version of MinGW',
formatter_class = argparse.ArgumentDefaultsHelpFormatter
)
parser.add_argument('--location',
help... | [
"def",
"main",
"(",
")",
":",
"parser",
"=",
"argparse",
".",
"ArgumentParser",
"(",
"description",
"=",
"'Downloads a specific version of MinGW'",
",",
"formatter_class",
"=",
"argparse",
".",
"ArgumentDefaultsHelpFormatter",
")",
"parser",
".",
"add_argument",
"(",
... | [
260,
0
] | [
306,
60
] | python | en | ['en', 'error', 'th'] | False |
single_window | (self) | Check defining a single named window using window clause.
| Check defining a single named window using window clause.
| def single_window(self):
"""Check defining a single named window using window clause.
"""
expected = convert_output("""
depname | empno | salary | sum
-----------+-------+--------+-------
develop | 7 | 4200 | 4200
develop | 8 | 6000 | 10200
develop | 9 | 450... | [
"def",
"single_window",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n depname | empno | salary | sum\n -----------+-------+--------+-------\n develop | 7 | 4200 | 4200\n develop | 8 | 6000 | 10200\n develop | 9 | 4500 | 147... | [
6,
0
] | [
27,
5
] | python | en | ['en', 'en', 'en'] | True |
unused_window | (self) | Check unused window.
| Check unused window.
| def unused_window(self):
"""Check unused window.
"""
expected = convert_output("""
four
-------
""")
execute_query(
"SELECT four FROM tenk1 WHERE 0 WINDOW w AS (PARTITION BY ten)",
expected=expected
) | [
"def",
"unused_window",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n four\n -------\n \"\"\"",
")",
"execute_query",
"(",
"\"SELECT four FROM tenk1 WHERE 0 WINDOW w AS (PARTITION BY ten)\"",
",",
"expected",
"=",
"expected",
")"
] | [
30,
0
] | [
41,
5
] | python | en | ['en', 'sr', 'en'] | True |
multiple_identical_windows | (self) | Check defining multiple windows using window clause.
| Check defining multiple windows using window clause.
| def multiple_identical_windows(self):
"""Check defining multiple windows using window clause.
"""
expected = convert_output("""
sum | count
-------+-------
3500 | 1
7400 | 2
11600 | 3
16100 | 4
25700 | 6
25700 | 6
30700 | 7
411... | [
"def",
"multiple_identical_windows",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n sum | count\n -------+-------\n 3500 | 1\n 7400 | 2\n 11600 | 3\n 16100 | 4\n 25700 | 6\n 25700 | 6\n 30700 | 7\n 4... | [
47,
0
] | [
69,
5
] | python | en | ['en', 'en', 'en'] | True |
multiple_windows | (self) | Check defining multiple windows using window clause.
| Check defining multiple windows using window clause.
| def multiple_windows(self):
"""Check defining multiple windows using window clause.
"""
expected = convert_output("""
empno | depname | salary | sum1 | sum2
--------+-----------+--------+-------+--------
1 | sales | 5000 | 5000 | 5000
2 | personnel | 3900 | 3900 | ... | [
"def",
"multiple_windows",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum1 | sum2\n --------+-----------+--------+-------+--------\n 1 | sales | 5000 | 5000 | 5000\n 2 | personnel | 3900 | 3900 | 8900... | [
75,
0
] | [
96,
5
] | python | en | ['en', 'en', 'en'] | True |
missing_window_spec | (self) | Check missing window spec in window clause.
| Check missing window spec in window clause.
| def missing_window_spec(self):
"""Check missing window spec in window clause.
"""
exitcode = 62
message = "Exception: Syntax error"
self.context.node.query("SELECT number,sum(number) OVER w1 FROM values('number Int8', (1),(1),(2),(3)) WINDOW w1",
exitcode=exitcode, message=message) | [
"def",
"missing_window_spec",
"(",
"self",
")",
":",
"exitcode",
"=",
"62",
"message",
"=",
"\"Exception: Syntax error\"",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER w1 FROM values('number Int8', (1),(1),(2),(3)) WINDOW w1\"",
... | [
102,
0
] | [
109,
43
] | python | en | ['en', 'en', 'en'] | True |
feature | (self) | Check defining frame clause.
| Check defining frame clause.
| def feature(self):
"""Check defining frame clause.
"""
for scenario in loads(current_module(), Scenario):
Scenario(run=scenario, flags=TE) | [
"def",
"feature",
"(",
"self",
")",
":",
"for",
"scenario",
"in",
"loads",
"(",
"current_module",
"(",
")",
",",
"Scenario",
")",
":",
"Scenario",
"(",
"run",
"=",
"scenario",
",",
"flags",
"=",
"TE",
")"
] | [
116,
0
] | [
120,
40
] | python | en | ['de', 'en', 'en'] | True |
missing_frame_extent | (self) | Check that when range frame has missing frame extent then an error is returned.
| Check that when range frame has missing frame extent then an error is returned.
| def missing_frame_extent(self):
"""Check that when range frame has missing frame extent then an error is returned.
"""
exitcode, message = syntax_error()
self.context.node.query("SELECT number,sum(number) OVER (ORDER BY number RANGE) FROM numbers(1,3)",
exitcode=exitcode, message=message) | [
"def",
"missing_frame_extent",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"syntax_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (ORDER BY number RANGE) FROM numbers(1,3)\"",
",",
"exitcode",
"=... | [
9,
0
] | [
15,
43
] | python | en | ['en', 'en', 'en'] | True |
invalid_frame_extent | (self) | Check that when range frame has invalid frame extent then an error is returned.
| Check that when range frame has invalid frame extent then an error is returned.
| def invalid_frame_extent(self):
"""Check that when range frame has invalid frame extent then an error is returned.
"""
exitcode, message = syntax_error()
self.context.node.query("SELECT number,sum(number) OVER (ORDER BY number RANGE '1') FROM numbers(1,3)",
exitcode=exitcode, message=message) | [
"def",
"invalid_frame_extent",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"syntax_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (ORDER BY number RANGE '1') FROM numbers(1,3)\"",
",",
"exitcode",
... | [
21,
0
] | [
27,
43
] | python | en | ['en', 'en', 'en'] | True |
start_current_row_without_order_by | (self) | Check range current row frame without order by and
that the peers of the current row are rows that have values in the same order bucket.
In this case without order by clause all rows are the peers of the current row.
| Check range current row frame without order by and
that the peers of the current row are rows that have values in the same order bucket.
In this case without order by clause all rows are the peers of the current row.
| def start_current_row_without_order_by(self):
"""Check range current row frame without order by and
that the peers of the current row are rows that have values in the same order bucket.
In this case without order by clause all rows are the peers of the current row.
"""
expected = convert_output("""
... | [
"def",
"start_current_row_without_order_by",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | salary | sum\n --------+--------+--------\n 1 | 5000 | 47100\n 2 | 3900 | 47100\n 3 | 4800 | 47100\n 4 | 4800 | 47100\... | [
34,
0
] | [
57,
5
] | python | en | ['en', 'en', 'en'] | True |
start_current_row_with_order_by | (self) | Check range current row frame with order by and that the peers of the current row
are rows that have values in the same order bucket.
| Check range current row frame with order by and that the peers of the current row
are rows that have values in the same order bucket.
| def start_current_row_with_order_by(self):
"""Check range current row frame with order by and that the peers of the current row
are rows that have values in the same order bucket.
"""
expected = convert_output("""
empno | depname | salary | sum
--------+-----------+--------+---------
... | [
"def",
"start_current_row_with_order_by",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum\n --------+-----------+--------+---------\n 1 | sales | 5000 | 14600\n 2 | personnel | 3900 | 7400\n 3 | ... | [
64,
0
] | [
86,
5
] | python | en | ['en', 'en', 'en'] | True |
start_unbounded_following_error | (self) | Check range current row frame with or without order by returns an error.
| Check range current row frame with or without order by returns an error.
| def start_unbounded_following_error(self):
"""Check range current row frame with or without order by returns an error.
"""
exitcode, message = frame_start_error()
with Example("without order by"):
self.context.node.query("SELECT empno, depname, salary, sum(salary) OVER (RANGE UNBOUNDED FOLLOWIN... | [
"def",
"start_unbounded_following_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_start_error",
"(",
")",
"with",
"Example",
"(",
"\"without order by\"",
")",
":",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT empno, de... | [
92,
0
] | [
103,
47
] | python | en | ['en', 'en', 'en'] | True |
start_unbounded_preceding_without_order_by | (self) | Check range unbounded preceding frame without order by.
| Check range unbounded preceding frame without order by.
| def start_unbounded_preceding_without_order_by(self):
"""Check range unbounded preceding frame without order by.
"""
expected = convert_output("""
empno | depname | salary | sum
--------+-----------+--------+---------
7 | develop | 4200 | 25100
8 | develop | 6000 | 25... | [
"def",
"start_unbounded_preceding_without_order_by",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum\n --------+-----------+--------+---------\n 7 | develop | 4200 | 25100\n 8 | develop | 6000 | 25100\n ... | [
109,
0
] | [
125,
5
] | python | en | ['en', 'en', 'en'] | True |
start_unbounded_preceding_with_order_by | (self) | Check range unbounded preceding frame with order by.
| Check range unbounded preceding frame with order by.
| def start_unbounded_preceding_with_order_by(self):
"""Check range unbounded preceding frame with order by.
"""
expected = convert_output("""
empno | depname | salary | sum
--------+-----------+--------+---------
1 | sales | 5000 | 47100
2 | personnel | 3900 | 32500
... | [
"def",
"start_unbounded_preceding_with_order_by",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum\n --------+-----------+--------+---------\n 1 | sales | 5000 | 47100\n 2 | personnel | 3900 | 32500\n ... | [
131,
0
] | [
152,
5
] | python | en | ['en', 'en', 'en'] | True |
start_expr_following_without_order_by_error | (self) | Check range expr following frame without order by returns an error.
| Check range expr following frame without order by returns an error.
| def start_expr_following_without_order_by_error(self):
"""Check range expr following frame without order by returns an error.
"""
exitcode, message = window_frame_error()
self.context.node.query("SELECT empno, depname, salary, sum(salary) OVER (RANGE 1 FOLLOWING) AS sum FROM empsalary",
exitcod... | [
"def",
"start_expr_following_without_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"window_frame_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT empno, depname, salary, sum(salary) OVER (RANGE 1 FOLLOWING) AS su... | [
158,
0
] | [
164,
43
] | python | en | ['en', 'en', 'en'] | True |
start_expr_following_with_order_by_error | (self) | Check range expr following frame with order by returns an error.
| Check range expr following frame with order by returns an error.
| def start_expr_following_with_order_by_error(self):
"""Check range expr following frame with order by returns an error.
"""
exitcode, message = window_frame_error()
self.context.node.query("SELECT empno, depname, salary, sum(salary) OVER (ORDER BY salary RANGE 1 FOLLOWING) AS sum FROM empsalary",
... | [
"def",
"start_expr_following_with_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"window_frame_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT empno, depname, salary, sum(salary) OVER (ORDER BY salary RANGE 1 FOL... | [
170,
0
] | [
176,
43
] | python | en | ['en', 'en', 'en'] | True |
start_expr_preceding_with_order_by | (self) | Check range expr preceding frame with order by.
| Check range expr preceding frame with order by.
| def start_expr_preceding_with_order_by(self):
"""Check range expr preceding frame with order by.
"""
expected = convert_output("""
empno | depname | salary | sum
--------+-----------+--------+---------
1 | sales | 5000 | 5000
2 | personnel | 3900 | 3900
3 | ... | [
"def",
"start_expr_preceding_with_order_by",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum\n --------+-----------+--------+---------\n 1 | sales | 5000 | 5000\n 2 | personnel | 3900 | 3900\n 3 ... | [
182,
0
] | [
203,
5
] | python | en | ['en', 'en', 'en'] | True |
start_expr_preceding_order_by_non_numerical_column_error | (self) | Check range expr preceding frame with order by non-numerical column returns an error.
| Check range expr preceding frame with order by non-numerical column returns an error.
| def start_expr_preceding_order_by_non_numerical_column_error(self):
"""Check range expr preceding frame with order by non-numerical column returns an error.
"""
exitcode, message = frame_range_offset_error()
self.context.node.query("SELECT empno, depname, salary, sum(salary) OVER (ORDER BY depname RANG... | [
"def",
"start_expr_preceding_order_by_non_numerical_column_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_range_offset_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT empno, depname, salary, sum(salary) OVER (ORDER... | [
209,
0
] | [
215,
43
] | python | en | ['en', 'gl', 'en'] | True |
start_expr_preceding_without_order_by_error | (self) | Check range expr preceding frame without order by returns an error.
| Check range expr preceding frame without order by returns an error.
| def start_expr_preceding_without_order_by_error(self):
"""Check range expr preceding frame without order by returns an error.
"""
exitcode, message = frame_requires_order_by_error()
self.context.node.query("SELECT empno, depname, salary, sum(salary) OVER (RANGE 1 PRECEDING) AS sum FROM empsalary",
... | [
"def",
"start_expr_preceding_without_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_requires_order_by_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT empno, depname, salary, sum(salary) OVER (RANGE 1 PRECE... | [
221,
0
] | [
227,
43
] | python | en | ['en', 'en', 'en'] | True |
between_current_row_and_current_row | (self) | Check range between current row and current row frame with or without order by.
| Check range between current row and current row frame with or without order by.
| def between_current_row_and_current_row(self):
"""Check range between current row and current row frame with or without order by.
"""
with Example("without order by"):
expected = convert_output("""
empno | depname | salary | sum
--------+-----------+--------+---------
... | [
"def",
"between_current_row_and_current_row",
"(",
"self",
")",
":",
"with",
"Example",
"(",
"\"without order by\"",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum\n --------+-----------+--------+---------\n 7 ... | [
233,
0
] | [
266,
9
] | python | en | ['en', 'en', 'en'] | True |
between_current_row_and_unbounded_preceding_error | (self) | Check range between current row and unbounded preceding frame with or without order by returns an error.
| Check range between current row and unbounded preceding frame with or without order by returns an error.
| def between_current_row_and_unbounded_preceding_error(self):
"""Check range between current row and unbounded preceding frame with or without order by returns an error.
"""
exitcode, message = frame_end_error()
with Example("without order by"):
self.context.node.query("SELECT empno, depname, sa... | [
"def",
"between_current_row_and_unbounded_preceding_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_end_error",
"(",
")",
"with",
"Example",
"(",
"\"without order by\"",
")",
":",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"... | [
272,
0
] | [
283,
47
] | python | en | ['en', 'en', 'en'] | True |
between_current_row_and_unbounded_following | (self) | Check range between current row and unbounded following frame with or without order by.
| Check range between current row and unbounded following frame with or without order by.
| def between_current_row_and_unbounded_following(self):
"""Check range between current row and unbounded following frame with or without order by.
"""
with Example("without order by"):
expected = convert_output("""
empno | depname | salary | sum
--------+-----------+--------+-----... | [
"def",
"between_current_row_and_unbounded_following",
"(",
"self",
")",
":",
"with",
"Example",
"(",
"\"without order by\"",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum\n --------+-----------+--------+---------\n ... | [
289,
0
] | [
345,
9
] | python | en | ['en', 'en', 'en'] | True |
between_current_row_and_expr_following_without_order_by_error | (self) | Check range between current row and expr following frame without order by returns an error.
| Check range between current row and expr following frame without order by returns an error.
| def between_current_row_and_expr_following_without_order_by_error(self):
"""Check range between current row and expr following frame without order by returns an error.
"""
exitcode, message = frame_requires_order_by_error()
self.context.node.query("SELECT number,sum(number) OVER (RANGE BETWEEN CURRENT ... | [
"def",
"between_current_row_and_expr_following_without_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_requires_order_by_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (RANGE BETWEE... | [
351,
0
] | [
357,
43
] | python | en | ['en', 'en', 'en'] | True |
between_current_row_and_expr_following_with_order_by | (self) | Check range between current row and expr following frame with order by.
| Check range between current row and expr following frame with order by.
| def between_current_row_and_expr_following_with_order_by(self):
"""Check range between current row and expr following frame with order by.
"""
expected = convert_output("""
empno | depname | salary | sum
--------+-----------+--------+---------
1 | sales | 5000 | 8900
2 ... | [
"def",
"between_current_row_and_expr_following_with_order_by",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum\n --------+-----------+--------+---------\n 1 | sales | 5000 | 8900\n 2 | personnel | 3900 | ... | [
363,
0
] | [
384,
5
] | python | en | ['en', 'en', 'en'] | True |
between_current_row_and_expr_preceding_error | (self) | Check range between current row and expr preceding frame with or without order by returns an error.
| Check range between current row and expr preceding frame with or without order by returns an error.
| def between_current_row_and_expr_preceding_error(self):
"""Check range between current row and expr preceding frame with or without order by returns an error.
"""
exitcode, message = window_frame_error()
with Example("without order by"):
self.context.node.query("SELECT empno, depname, salary, s... | [
"def",
"between_current_row_and_expr_preceding_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"window_frame_error",
"(",
")",
"with",
"Example",
"(",
"\"without order by\"",
")",
":",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SE... | [
390,
0
] | [
401,
47
] | python | en | ['en', 'en', 'en'] | True |
between_unbounded_preceding_and_current_row | (self) | Check range between unbounded preceding and current row frame with and without order by.
| Check range between unbounded preceding and current row frame with and without order by.
| def between_unbounded_preceding_and_current_row(self):
"""Check range between unbounded preceding and current row frame with and without order by.
"""
with Example("with order by"):
expected = convert_output("""
four | ten | sum | last_value
------+-----+-----+------------
... | [
"def",
"between_unbounded_preceding_and_current_row",
"(",
"self",
")",
":",
"with",
"Example",
"(",
"\"with order by\"",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n four | ten | sum | last_value\n ------+-----+-----+------------\n ... | [
407,
0
] | [
458,
9
] | python | en | ['en', 'en', 'en'] | True |
between_unbounded_preceding_and_unbounded_preceding_error | (self) | Check range between unbounded preceding and unbounded preceding frame with or without order by returns an error.
| Check range between unbounded preceding and unbounded preceding frame with or without order by returns an error.
| def between_unbounded_preceding_and_unbounded_preceding_error(self):
"""Check range between unbounded preceding and unbounded preceding frame with or without order by returns an error.
"""
exitcode, message = frame_end_error()
with Example("without order by"):
self.context.node.query("SELECT em... | [
"def",
"between_unbounded_preceding_and_unbounded_preceding_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_end_error",
"(",
")",
"with",
"Example",
"(",
"\"without order by\"",
")",
":",
"self",
".",
"context",
".",
"node",
".",
"query",
"(... | [
464,
0
] | [
475,
47
] | python | en | ['en', 'en', 'en'] | True |
between_unbounded_preceding_and_unbounded_following | (self) | Check range between unbounded preceding and unbounded following range with and without order by.
| Check range between unbounded preceding and unbounded following range with and without order by.
| def between_unbounded_preceding_and_unbounded_following(self):
"""Check range between unbounded preceding and unbounded following range with and without order by.
"""
with Example("with order by"):
expected = convert_output("""
four | ten | sum | last_value
------+-----+-----+------... | [
"def",
"between_unbounded_preceding_and_unbounded_following",
"(",
"self",
")",
":",
"with",
"Example",
"(",
"\"with order by\"",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n four | ten | sum | last_value\n ------+-----+-----+------------\n 0 ... | [
481,
0
] | [
537,
9
] | python | en | ['en', 'en', 'en'] | True |
between_unbounded_preceding_and_expr_following_without_order_by_error | (self) | Check range between unbounded preceding and expr following frame without order by returns an error.
| Check range between unbounded preceding and expr following frame without order by returns an error.
| def between_unbounded_preceding_and_expr_following_without_order_by_error(self):
"""Check range between unbounded preceding and expr following frame without order by returns an error.
"""
exitcode, message = frame_requires_order_by_error()
self.context.node.query("SELECT number,sum(number) OVER (RANGE ... | [
"def",
"between_unbounded_preceding_and_expr_following_without_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_requires_order_by_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (RANG... | [
543,
0
] | [
549,
43
] | python | en | ['en', 'en', 'en'] | True |
between_unbounded_preceding_and_expr_preceding_without_order_by_error | (self) | Check range between unbounded preceding and expr preceding frame without order by returns an error.
| Check range between unbounded preceding and expr preceding frame without order by returns an error.
| def between_unbounded_preceding_and_expr_preceding_without_order_by_error(self):
"""Check range between unbounded preceding and expr preceding frame without order by returns an error.
"""
exitcode, message = frame_requires_order_by_error()
self.context.node.query("SELECT number,sum(number) OVER (RANGE ... | [
"def",
"between_unbounded_preceding_and_expr_preceding_without_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_requires_order_by_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (RANG... | [
555,
0
] | [
561,
43
] | python | en | ['en', 'en', 'en'] | True |
between_unbounded_preceding_and_expr_following_with_order_by | (self) | Check range between unbounded preceding and expr following frame with order by.
| Check range between unbounded preceding and expr following frame with order by.
| def between_unbounded_preceding_and_expr_following_with_order_by(self):
"""Check range between unbounded preceding and expr following frame with order by.
"""
expected = convert_output("""
empno | depname | salary | sum
--------+-----------+--------+---------
1 | sales | 5000 | 4... | [
"def",
"between_unbounded_preceding_and_expr_following_with_order_by",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum\n --------+-----------+--------+---------\n 1 | sales | 5000 | 41100\n 2 | personnel | ... | [
567,
0
] | [
588,
5
] | python | en | ['en', 'en', 'en'] | True |
between_unbounded_preceding_and_expr_preceding_with_order_by | (self) | Check range between unbounded preceding and expr preceding frame with order by.
| Check range between unbounded preceding and expr preceding frame with order by.
| def between_unbounded_preceding_and_expr_preceding_with_order_by(self):
"""Check range between unbounded preceding and expr preceding frame with order by.
"""
expected = convert_output("""
empno | depname | salary | sum
--------+-----------+--------+---------
1 | sales | 5000 | 1... | [
"def",
"between_unbounded_preceding_and_expr_preceding_with_order_by",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum\n --------+-----------+--------+---------\n 1 | sales | 5000 | 16100\n 2 | personnel | ... | [
594,
0
] | [
615,
5
] | python | en | ['en', 'en', 'en'] | True |
between_unbounded_following_and_current_row_error | (self) | Check range between unbounded following and current row frame with or without order by returns an error.
| Check range between unbounded following and current row frame with or without order by returns an error.
| def between_unbounded_following_and_current_row_error(self):
"""Check range between unbounded following and current row frame with or without order by returns an error.
"""
exitcode, message = frame_start_error()
with Example("without order by"):
self.context.node.query("SELECT empno, depname, ... | [
"def",
"between_unbounded_following_and_current_row_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_start_error",
"(",
")",
"with",
"Example",
"(",
"\"without order by\"",
")",
":",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"... | [
621,
0
] | [
632,
47
] | python | en | ['en', 'en', 'en'] | True |
between_unbounded_following_and_unbounded_following_error | (self) | Check range between unbounded following and unbounded following frame with or without order by returns an error.
| Check range between unbounded following and unbounded following frame with or without order by returns an error.
| def between_unbounded_following_and_unbounded_following_error(self):
"""Check range between unbounded following and unbounded following frame with or without order by returns an error.
"""
exitcode, message = frame_start_error()
with Example("without order by"):
self.context.node.query("SELECT ... | [
"def",
"between_unbounded_following_and_unbounded_following_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_start_error",
"(",
")",
"with",
"Example",
"(",
"\"without order by\"",
")",
":",
"self",
".",
"context",
".",
"node",
".",
"query",
... | [
638,
0
] | [
649,
47
] | python | en | ['en', 'en', 'en'] | True |
between_unbounded_following_and_unbounded_preceding_error | (self) | Check range between unbounded following and unbounded preceding frame with or without order by returns an error.
| Check range between unbounded following and unbounded preceding frame with or without order by returns an error.
| def between_unbounded_following_and_unbounded_preceding_error(self):
"""Check range between unbounded following and unbounded preceding frame with or without order by returns an error.
"""
exitcode, message = frame_start_error()
with Example("without order by"):
self.context.node.query("SELECT ... | [
"def",
"between_unbounded_following_and_unbounded_preceding_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_start_error",
"(",
")",
"with",
"Example",
"(",
"\"without order by\"",
")",
":",
"self",
".",
"context",
".",
"node",
".",
"query",
... | [
655,
0
] | [
666,
47
] | python | en | ['en', 'en', 'en'] | True |
between_unbounded_following_and_expr_preceding_error | (self) | Check range between unbounded following and expr preceding frame with or without order by returns an error.
| Check range between unbounded following and expr preceding frame with or without order by returns an error.
| def between_unbounded_following_and_expr_preceding_error(self):
"""Check range between unbounded following and expr preceding frame with or without order by returns an error.
"""
exitcode, message = frame_start_error()
with Example("without order by"):
self.context.node.query("SELECT empno, dep... | [
"def",
"between_unbounded_following_and_expr_preceding_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_start_error",
"(",
")",
"with",
"Example",
"(",
"\"without order by\"",
")",
":",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
... | [
672,
0
] | [
683,
47
] | python | en | ['en', 'en', 'en'] | True |
between_unbounded_following_and_expr_following_error | (self) | Check range between unbounded following and expr following frame with or without order by returns an error.
| Check range between unbounded following and expr following frame with or without order by returns an error.
| def between_unbounded_following_and_expr_following_error(self):
"""Check range between unbounded following and expr following frame with or without order by returns an error.
"""
exitcode, message = frame_start_error()
with Example("without order by"):
self.context.node.query("SELECT empno, dep... | [
"def",
"between_unbounded_following_and_expr_following_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_start_error",
"(",
")",
"with",
"Example",
"(",
"\"without order by\"",
")",
":",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
... | [
689,
0
] | [
700,
47
] | python | en | ['en', 'en', 'en'] | True |
between_expr_preceding_and_current_row_without_order_by_error | (self) | Check range between expr preceding and current row frame without order by returns an error.
| Check range between expr preceding and current row frame without order by returns an error.
| def between_expr_preceding_and_current_row_without_order_by_error(self):
"""Check range between expr preceding and current row frame without order by returns an error.
"""
exitcode, message = frame_requires_order_by_error()
self.context.node.query("SELECT number,sum(number) OVER (RANGE BETWEEN 1 PRECED... | [
"def",
"between_expr_preceding_and_current_row_without_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_requires_order_by_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (RANGE BETWEE... | [
706,
0
] | [
712,
43
] | python | en | ['en', 'en', 'en'] | True |
between_expr_preceding_and_unbounded_following_without_order_by_error | (self) | Check range between expr preceding and unbounded following frame without order by returns an error.
| Check range between expr preceding and unbounded following frame without order by returns an error.
| def between_expr_preceding_and_unbounded_following_without_order_by_error(self):
"""Check range between expr preceding and unbounded following frame without order by returns an error.
"""
exitcode, message = frame_requires_order_by_error()
self.context.node.query("SELECT number,sum(number) OVER (RANGE ... | [
"def",
"between_expr_preceding_and_unbounded_following_without_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_requires_order_by_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (RANG... | [
718,
0
] | [
724,
43
] | python | en | ['en', 'en', 'en'] | True |
between_expr_preceding_and_expr_following_without_order_by_error | (self) | Check range between expr preceding and expr following frame without order by returns an error.
| Check range between expr preceding and expr following frame without order by returns an error.
| def between_expr_preceding_and_expr_following_without_order_by_error(self):
"""Check range between expr preceding and expr following frame without order by returns an error.
"""
exitcode, message = frame_requires_order_by_error()
self.context.node.query("SELECT number,sum(number) OVER (RANGE BETWEEN 1 ... | [
"def",
"between_expr_preceding_and_expr_following_without_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_requires_order_by_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (RANGE BET... | [
730,
0
] | [
736,
43
] | python | en | ['en', 'en', 'en'] | True |
between_expr_preceding_and_expr_preceding_without_order_by_error | (self) | Check range between expr preceding and expr preceding frame without order by returns an error.
| Check range between expr preceding and expr preceding frame without order by returns an error.
| def between_expr_preceding_and_expr_preceding_without_order_by_error(self):
"""Check range between expr preceding and expr preceding frame without order by returns an error.
"""
exitcode, message = frame_requires_order_by_error()
self.context.node.query("SELECT number,sum(number) OVER (RANGE BETWEEN 1 ... | [
"def",
"between_expr_preceding_and_expr_preceding_without_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_requires_order_by_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (RANGE BET... | [
742,
0
] | [
748,
43
] | python | en | ['en', 'en', 'en'] | True |
between_expr_preceding_and_unbounded_preceding_error | (self) | Check range between expr preceding and unbounded preceding frame with or without order by returns an error.
| Check range between expr preceding and unbounded preceding frame with or without order by returns an error.
| def between_expr_preceding_and_unbounded_preceding_error(self):
"""Check range between expr preceding and unbounded preceding frame with or without order by returns an error.
"""
exitcode, message = frame_end_unbounded_preceding_error()
with Example("without order by"):
self.context.node.query(... | [
"def",
"between_expr_preceding_and_unbounded_preceding_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_end_unbounded_preceding_error",
"(",
")",
"with",
"Example",
"(",
"\"without order by\"",
")",
":",
"self",
".",
"context",
".",
"node",
".",
... | [
754,
0
] | [
765,
47
] | python | en | ['en', 'en', 'en'] | True |
between_expr_preceding_and_current_row_with_order_by | (self) | Check range between expr preceding and current row frame with order by.
| Check range between expr preceding and current row frame with order by.
| def between_expr_preceding_and_current_row_with_order_by(self):
"""Check range between expr preceding and current row frame with order by.
"""
expected = convert_output("""
empno | depname | salary | sum
--------+-----------+--------+---------
1 | sales | 5000 | 5000
2 ... | [
"def",
"between_expr_preceding_and_current_row_with_order_by",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum\n --------+-----------+--------+---------\n 1 | sales | 5000 | 5000\n 2 | personnel | 3900 | ... | [
771,
0
] | [
792,
5
] | python | en | ['en', 'en', 'en'] | True |
between_expr_preceding_and_unbounded_following_with_order_by | (self) | Check range between expr preceding and unbounded following frame with order by.
| Check range between expr preceding and unbounded following frame with order by.
| def between_expr_preceding_and_unbounded_following_with_order_by(self):
"""Check range between expr preceding and unbounded following frame with order by.
"""
expected = convert_output("""
empno | depname | salary | sum
--------+-----------+--------+---------
1 | sales | 5000 | 3... | [
"def",
"between_expr_preceding_and_unbounded_following_with_order_by",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum\n --------+-----------+--------+---------\n 1 | sales | 5000 | 35500\n 2 | personnel | ... | [
798,
0
] | [
819,
5
] | python | en | ['en', 'en', 'en'] | True |
between_expr_preceding_and_expr_following_with_order_by | (self) | Check range between expr preceding and expr following frame with order by.
| Check range between expr preceding and expr following frame with order by.
| def between_expr_preceding_and_expr_following_with_order_by(self):
"""Check range between expr preceding and expr following frame with order by.
"""
with Example("empsalary"):
expected = convert_output("""
empno | depname | salary | sum
--------+-----------+--------+---------
... | [
"def",
"between_expr_preceding_and_expr_following_with_order_by",
"(",
"self",
")",
":",
"with",
"Example",
"(",
"\"empsalary\"",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum\n --------+-----------+--------+---------\n ... | [
825,
0
] | [
870,
9
] | python | en | ['en', 'en', 'en'] | True |
between_expr_preceding_and_expr_preceding_with_order_by | (self) | Check range between expr preceding and expr preceding range with order by.
| Check range between expr preceding and expr preceding range with order by.
| def between_expr_preceding_and_expr_preceding_with_order_by(self):
"""Check range between expr preceding and expr preceding range with order by.
"""
with Example("order by asc"):
expected = convert_output("""
sum | unique1 | four
-----+---------+------
0 | 0 | 0
... | [
"def",
"between_expr_preceding_and_expr_preceding_with_order_by",
"(",
"self",
")",
":",
"with",
"Example",
"(",
"\"order by asc\"",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n sum | unique1 | four\n -----+---------+------\n 0 | 0 | 0\n... | [
876,
0
] | [
923,
9
] | python | en | ['en', 'en', 'en'] | True |
between_expr_preceding_and_expr_preceding_with_order_by_error | (self) | Check range between expr preceding and expr preceding range with order by returns error
when end frame is before of start frame.
| Check range between expr preceding and expr preceding range with order by returns error
when end frame is before of start frame.
| def between_expr_preceding_and_expr_preceding_with_order_by_error(self):
"""Check range between expr preceding and expr preceding range with order by returns error
when end frame is before of start frame.
"""
exitcode, message = frame_start_error()
self.context.node.query("SELECT number,sum(number)... | [
"def",
"between_expr_preceding_and_expr_preceding_with_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_start_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (RANGE BETWEEN 1 PRECEDIN... | [
929,
0
] | [
936,
43
] | python | en | ['en', 'en', 'en'] | True |
between_expr_following_and_current_row_without_order_by_error | (self) | Check range between expr following and current row frame without order by returns an error.
| Check range between expr following and current row frame without order by returns an error.
| def between_expr_following_and_current_row_without_order_by_error(self):
"""Check range between expr following and current row frame without order by returns an error.
"""
exitcode, message = window_frame_error()
self.context.node.query("SELECT number,sum(number) OVER (RANGE BETWEEN 0 FOLLOWING AND CUR... | [
"def",
"between_expr_following_and_current_row_without_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"window_frame_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (RANGE BETWEEN 0 FOLLOWI... | [
942,
0
] | [
948,
43
] | python | en | ['en', 'en', 'en'] | True |
between_expr_following_and_unbounded_following_without_order_by_error | (self) | Check range between expr following and unbounded following frame without order by returns an error.
| Check range between expr following and unbounded following frame without order by returns an error.
| def between_expr_following_and_unbounded_following_without_order_by_error(self):
"""Check range between expr following and unbounded following frame without order by returns an error.
"""
exitcode, message = frame_requires_order_by_error()
self.context.node.query("SELECT number,sum(number) OVER (RANGE ... | [
"def",
"between_expr_following_and_unbounded_following_without_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_requires_order_by_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (RANG... | [
954,
0
] | [
960,
43
] | python | en | ['en', 'en', 'en'] | True |
between_expr_following_and_expr_following_without_order_by_error | (self) | Check range between expr following and expr following frame without order by returns an error.
| Check range between expr following and expr following frame without order by returns an error.
| def between_expr_following_and_expr_following_without_order_by_error(self):
"""Check range between expr following and expr following frame without order by returns an error.
"""
exitcode, message = window_frame_error()
self.context.node.query("SELECT number,sum(number) OVER (RANGE BETWEEN 1 FOLLOWING A... | [
"def",
"between_expr_following_and_expr_following_without_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"window_frame_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (RANGE BETWEEN 1 FOLL... | [
966,
0
] | [
972,
43
] | python | en | ['en', 'en', 'en'] | True |
between_expr_following_and_expr_preceding_without_order_by_error | (self) | Check range between expr following and expr preceding frame without order by returns an error.
| Check range between expr following and expr preceding frame without order by returns an error.
| def between_expr_following_and_expr_preceding_without_order_by_error(self):
"""Check range between expr following and expr preceding frame without order by returns an error.
"""
exitcode, message = window_frame_error()
self.context.node.query("SELECT number,sum(number) OVER (RANGE BETWEEN 0 FOLLOWING A... | [
"def",
"between_expr_following_and_expr_preceding_without_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"window_frame_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (RANGE BETWEEN 0 FOLL... | [
978,
0
] | [
984,
43
] | python | en | ['en', 'en', 'en'] | True |
between_expr_following_and_unbounded_preceding_error | (self) | Check range between expr following and unbounded preceding frame with or without order by returns an error.
| Check range between expr following and unbounded preceding frame with or without order by returns an error.
| def between_expr_following_and_unbounded_preceding_error(self):
"""Check range between expr following and unbounded preceding frame with or without order by returns an error.
"""
exitcode, message = frame_end_unbounded_preceding_error()
with Example("without order by"):
self.context.node.query(... | [
"def",
"between_expr_following_and_unbounded_preceding_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_end_unbounded_preceding_error",
"(",
")",
"with",
"Example",
"(",
"\"without order by\"",
")",
":",
"self",
".",
"context",
".",
"node",
".",
... | [
990,
0
] | [
1001,
47
] | python | en | ['en', 'en', 'en'] | True |
between_expr_following_and_current_row_with_order_by_error | (self) | Check range between expr following and current row frame with order by returns an error
when expr if greater than 0.
| Check range between expr following and current row frame with order by returns an error
when expr if greater than 0.
| def between_expr_following_and_current_row_with_order_by_error(self):
"""Check range between expr following and current row frame with order by returns an error
when expr if greater than 0.
"""
exitcode, message = window_frame_error()
self.context.node.query("SELECT number,sum(number) OVER (ORDER B... | [
"def",
"between_expr_following_and_current_row_with_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"window_frame_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (ORDER BY number RANGE BETW... | [
1007,
0
] | [
1014,
43
] | python | en | ['en', 'en', 'en'] | True |
between_expr_following_and_expr_preceding_error | (self) | Check range between expr following and expr preceding frame with order by returns an error
when either expr is not 0.
| Check range between expr following and expr preceding frame with order by returns an error
when either expr is not 0.
| def between_expr_following_and_expr_preceding_error(self):
"""Check range between expr following and expr preceding frame with order by returns an error
when either expr is not 0.
"""
exitcode, message = frame_start_error()
with Example("1 following 0 preceding"):
self.context.node.query("S... | [
"def",
"between_expr_following_and_expr_preceding_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_start_error",
"(",
")",
"with",
"Example",
"(",
"\"1 following 0 preceding\"",
")",
":",
"self",
".",
"context",
".",
"node",
".",
"query",
"("... | [
1020,
0
] | [
1032,
47
] | python | en | ['en', 'en', 'en'] | True |
between_expr_following_and_expr_following_with_order_by_error | (self) | Check range between expr following and expr following frame with order by returns an error
when the expr for the frame end is less than the expr for the framevstart.
| Check range between expr following and expr following frame with order by returns an error
when the expr for the frame end is less than the expr for the framevstart.
| def between_expr_following_and_expr_following_with_order_by_error(self):
"""Check range between expr following and expr following frame with order by returns an error
when the expr for the frame end is less than the expr for the framevstart.
"""
exitcode, message = frame_start_error()
self.context.... | [
"def",
"between_expr_following_and_expr_following_with_order_by_error",
"(",
"self",
")",
":",
"exitcode",
",",
"message",
"=",
"frame_start_error",
"(",
")",
"self",
".",
"context",
".",
"node",
".",
"query",
"(",
"\"SELECT number,sum(number) OVER (ORDER BY number RANGE BE... | [
1038,
0
] | [
1045,
43
] | python | en | ['en', 'en', 'en'] | True |
between_expr_following_and_current_row_zero_special_case | (self) | Check range between expr following and current row frame for special case when exp is 0.
It is expected to work.
| Check range between expr following and current row frame for special case when exp is 0.
It is expected to work.
| def between_expr_following_and_current_row_zero_special_case(self):
"""Check range between expr following and current row frame for special case when exp is 0.
It is expected to work.
"""
with When("I use it with order by"):
expected = convert_output("""
number | sum
---------... | [
"def",
"between_expr_following_and_current_row_zero_special_case",
"(",
"self",
")",
":",
"with",
"When",
"(",
"\"I use it with order by\"",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n number | sum\n ---------+------\n 1 | 2\n ... | [
1051,
0
] | [
1082,
13
] | python | en | ['en', 'en', 'en'] | True |
between_expr_following_and_unbounded_following_with_order_by | (self) | Check range between expr following and unbounded following range with order by.
| Check range between expr following and unbounded following range with order by.
| def between_expr_following_and_unbounded_following_with_order_by(self):
"""Check range between expr following and unbounded following range with order by.
"""
expected = convert_output("""
number | sum
---------+------
1 | 5
1 | 5
2 | 3
... | [
"def",
"between_expr_following_and_unbounded_following_with_order_by",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n number | sum\n ---------+------\n 1 | 5\n 1 | 5\n 2 | 3\n 3 | 0\n ... | [
1088,
0
] | [
1104,
5
] | python | en | ['en', 'en', 'en'] | True |
between_expr_following_and_expr_preceding_with_order_by_zero_special_case | (self) | Check range between expr following and expr preceding frame for special case when exp is 0.
It is expected to work.
| Check range between expr following and expr preceding frame for special case when exp is 0.
It is expected to work.
| def between_expr_following_and_expr_preceding_with_order_by_zero_special_case(self):
"""Check range between expr following and expr preceding frame for special case when exp is 0.
It is expected to work.
"""
expected = convert_output("""
number | sum
---------+------
1 | 2
... | [
"def",
"between_expr_following_and_expr_preceding_with_order_by_zero_special_case",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n number | sum\n ---------+------\n 1 | 2\n 1 | 2\n 2 | 2\n 3 | 3\n \"\"\"",
")... | [
1110,
0
] | [
1125,
5
] | python | en | ['en', 'en', 'en'] | True |
between_expr_following_and_expr_following_with_order_by | (self) | Check range between expr following and expr following frame with order by when frame start
is before frame end.
| Check range between expr following and expr following frame with order by when frame start
is before frame end.
| def between_expr_following_and_expr_following_with_order_by(self):
"""Check range between expr following and expr following frame with order by when frame start
is before frame end.
"""
expected = convert_output("""
empno | depname | salary | sum
--------+-----------+--------+---------
... | [
"def",
"between_expr_following_and_expr_following_with_order_by",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n empno | depname | salary | sum\n --------+-----------+--------+---------\n 1 | sales | 5000 | 6000\n 2 | personnel | 3900 ... | [
1131,
0
] | [
1153,
5
] | python | en | ['en', 'en', 'en'] | True |
between_unbounded_preceding_and_current_row_with_expressions_in_order_by_and_aggregate | (self) | Check range between unbounded prceding and current row with
expression used in the order by clause and aggregate functions.
| Check range between unbounded prceding and current row with
expression used in the order by clause and aggregate functions.
| def between_unbounded_preceding_and_current_row_with_expressions_in_order_by_and_aggregate(self):
"""Check range between unbounded prceding and current row with
expression used in the order by clause and aggregate functions.
"""
expected = convert_output("""
four | two | sum | last_value
------... | [
"def",
"between_unbounded_preceding_and_current_row_with_expressions_in_order_by_and_aggregate",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n four | two | sum | last_value\n ------+-----+-----+------------\n 0 | 0 | 0 | 0\n 0 | 0 | ... | [
1156,
0
] | [
1191,
5
] | python | en | ['en', 'en', 'en'] | True |
between_current_row_and_unbounded_following_modifying_named_window | (self) | Check range between current row and unbounded following when
modifying named window.
| Check range between current row and unbounded following when
modifying named window.
| def between_current_row_and_unbounded_following_modifying_named_window(self):
"""Check range between current row and unbounded following when
modifying named window.
"""
expected = convert_output("""
sum | unique1 | four
-----+---------+------
45 | 0 | 0
45 | 8 | 0... | [
"def",
"between_current_row_and_unbounded_following_modifying_named_window",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n sum | unique1 | four\n -----+---------+------\n 45 | 0 | 0\n 45 | 8 | 0\n 45 | 4 | 0\n 33 | ... | [
1194,
0
] | [
1218,
5
] | python | en | ['en', 'en', 'en'] | True |
between_current_row_and_unbounded_following_in_named_window | (self) | Check range between current row and unbounded following in named window.
| Check range between current row and unbounded following in named window.
| def between_current_row_and_unbounded_following_in_named_window(self):
"""Check range between current row and unbounded following in named window.
"""
expected = convert_output("""
first_value | last_value | unique1 | four
-------------+------------+---------+------
0 | 9 | ... | [
"def",
"between_current_row_and_unbounded_following_in_named_window",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n first_value | last_value | unique1 | four\n -------------+------------+---------+------\n 0 | 9 | 0 | 0\n 1... | [
1221,
0
] | [
1245,
5
] | python | en | ['en', 'en', 'en'] | True |
between_expr_preceding_and_expr_following_with_partition_by_two_columns | (self) | Check range between n preceding and n following frame with partition
by two int value columns.
| Check range between n preceding and n following frame with partition
by two int value columns.
| def between_expr_preceding_and_expr_following_with_partition_by_two_columns(self):
"""Check range between n preceding and n following frame with partition
by two int value columns.
"""
expected = convert_output("""
f1 | sum
----+-----
1 | 0
2 | 0
""")
execute_query(
... | [
"def",
"between_expr_preceding_and_expr_following_with_partition_by_two_columns",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n f1 | sum\n ----+-----\n 1 | 0\n 2 | 0\n \"\"\"",
")",
"execute_query",
"(",
"\"\"\"\n select f1, sum(f... | [
1248,
0
] | [
1266,
5
] | python | en | ['en', 'en', 'en'] | True |
between_expr_preceding_and_expr_following_with_partition_by_same_column_twice | (self) | Check range between n preceding and n folowing with partition
by the same column twice.
| Check range between n preceding and n folowing with partition
by the same column twice.
| def between_expr_preceding_and_expr_following_with_partition_by_same_column_twice(self):
"""Check range between n preceding and n folowing with partition
by the same column twice.
"""
expected = convert_output("""
f1 | sum
----+-----
1 | 0
2 | 0
""")
execute_query(
... | [
"def",
"between_expr_preceding_and_expr_following_with_partition_by_same_column_twice",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n f1 | sum\n ----+-----\n 1 | 0\n 2 | 0\n \"\"\"",
")",
"execute_query",
"(",
"\"\"\"\n select * f... | [
1269,
0
] | [
1287,
5
] | python | en | ['en', 'en', 'en'] | True |
between_expr_preceding_and_expr_following_with_partition_and_order_by | (self) | Check range between expr preceding and expr following frame used
with partition by and order by clauses.
| Check range between expr preceding and expr following frame used
with partition by and order by clauses.
| def between_expr_preceding_and_expr_following_with_partition_and_order_by(self):
"""Check range between expr preceding and expr following frame used
with partition by and order by clauses.
"""
expected = convert_output("""
f1 | sum
----+-----
1 | 1
2 | 2
""")
execute_qu... | [
"def",
"between_expr_preceding_and_expr_following_with_partition_and_order_by",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n f1 | sum\n ----+-----\n 1 | 1\n 2 | 2\n \"\"\"",
")",
"execute_query",
"(",
"\"\"\"\n select f1, sum(f1)... | [
1290,
0
] | [
1308,
5
] | python | en | ['en', 'en', 'en'] | True |
order_by_decimal | (self) | Check using range with order by decimal column.
| Check using range with order by decimal column.
| def order_by_decimal(self):
"""Check using range with order by decimal column.
"""
expected = convert_output("""
id | f_numeric | first_value | last_value
----+-----------+-------------+------------
0 | -1000 | 0 | 0
1 | -3 | 1 | 1
... | [
"def",
"order_by_decimal",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n id | f_numeric | first_value | last_value\n ----+-----------+-------------+------------\n 0 | -1000 | 0 | 0\n 1 | -3 | 1 | 1\n ... | [
1311,
0
] | [
1337,
5
] | python | en | ['en', 'en', 'en'] | True |
order_by_float | (self) | Check using range with order by float column.
| Check using range with order by float column.
| def order_by_float(self):
"""Check using range with order by float column.
"""
expected = convert_output("""
id | f_float4 | first_value | last_value
----+-----------+-------------+------------
0 | -inf | 0 | 0
1 | -3 | 1 | 1
2 | ... | [
"def",
"order_by_float",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n id | f_float4 | first_value | last_value\n ----+-----------+-------------+------------\n 0 | -inf | 0 | 0\n 1 | -3 | 1 | 1\n ... | [
1340,
0
] | [
1366,
5
] | python | en | ['en', 'en', 'en'] | True |
with_nulls | (self) | Check using range frame over window with nulls.
| Check using range frame over window with nulls.
| def with_nulls(self):
"""Check using range frame over window with nulls.
"""
expected = convert_output("""
x | y | first_value | last_value
---+----+-------------+------------
\\N | 42 | 42 | 43
\\N | 43 | 42 | 43
1 | 1 | 1 | 3
... | [
"def",
"with_nulls",
"(",
"self",
")",
":",
"expected",
"=",
"convert_output",
"(",
"\"\"\"\n x | y | first_value | last_value\n ---+----+-------------+------------\n \\\\N | 42 | 42 | 43\n \\\\N | 43 | 42 | 43\n 1 | 1 | 1 | 3... | [
1369,
0
] | [
1397,
5
] | python | en | ['en', 'en', 'en'] | True |
feature | (self) | Check defining range frame.
| Check defining range frame.
| def feature(self):
"""Check defining range frame.
"""
for scenario in loads(current_module(), Scenario):
Scenario(run=scenario, flags=TE) | [
"def",
"feature",
"(",
"self",
")",
":",
"for",
"scenario",
"in",
"loads",
"(",
"current_module",
"(",
")",
",",
"Scenario",
")",
":",
"Scenario",
"(",
"run",
"=",
"scenario",
",",
"flags",
"=",
"TE",
")"
] | [
1405,
0
] | [
1409,
40
] | python | en | ['es', 'no', 'en'] | False |
connect | (dictionary) | Construct a pandas client from a dictionary of DataFrames.
Parameters
----------
dictionary : dict
Returns
-------
PandasClient
| Construct a pandas client from a dictionary of DataFrames. | def connect(dictionary):
"""Construct a pandas client from a dictionary of DataFrames.
Parameters
----------
dictionary : dict
Returns
-------
PandasClient
"""
return PandasClient(dictionary) | [
"def",
"connect",
"(",
"dictionary",
")",
":",
"return",
"PandasClient",
"(",
"dictionary",
")"
] | [
12,
0
] | [
23,
35
] | python | en | ['en', 'en', 'en'] | True |
from_dataframe | (df, name='df', client=None) |
convenience function to construct an ibis table
from a DataFrame
EXPERIMENTAL API
Parameters
----------
df : DataFrame
name : str, default 'df'
client : Client, default new PandasClient
client dictionary will be mutated with the
name of the DataFrame
Returns
-... |
convenience function to construct an ibis table
from a DataFrame | def from_dataframe(df, name='df', client=None):
"""
convenience function to construct an ibis table
from a DataFrame
EXPERIMENTAL API
Parameters
----------
df : DataFrame
name : str, default 'df'
client : Client, default new PandasClient
client dictionary will be mutated wi... | [
"def",
"from_dataframe",
"(",
"df",
",",
"name",
"=",
"'df'",
",",
"client",
"=",
"None",
")",
":",
"if",
"client",
"is",
"None",
":",
"return",
"connect",
"(",
"{",
"name",
":",
"df",
"}",
")",
".",
"table",
"(",
"name",
")",
"client",
".",
"dic... | [
26,
0
] | [
49,
29
] | python | en | ['en', 'error', 'th'] | False |
_flatten_subclass_tree | (cls) | Return the set of all child classes of `cls`.
Parameters
----------
cls : Type
Returns
-------
frozenset[Type]
| Return the set of all child classes of `cls`. | def _flatten_subclass_tree(cls):
"""Return the set of all child classes of `cls`.
Parameters
----------
cls : Type
Returns
-------
frozenset[Type]
"""
subclasses = frozenset(cls.__subclasses__())
children = frozenset(toolz.concat(map(_flatten_subclass_tree, subclasses)))
re... | [
"def",
"_flatten_subclass_tree",
"(",
"cls",
")",
":",
"subclasses",
"=",
"frozenset",
"(",
"cls",
".",
"__subclasses__",
"(",
")",
")",
"children",
"=",
"frozenset",
"(",
"toolz",
".",
"concat",
"(",
"map",
"(",
"_flatten_subclass_tree",
",",
"subclasses",
... | [
52,
0
] | [
65,
51
] | python | en | ['en', 'en', 'en'] | True |
TestSearchBase.init_data | (self, connect, collection, nb=6000, partition_tags=None) |
Generate vectors and add it in collection, before search vectors
|
Generate vectors and add it in collection, before search vectors
| def init_data(self, connect, collection, nb=6000, partition_tags=None):
'''
Generate vectors and add it in collection, before search vectors
'''
global vectors
if nb == 6000:
add_vectors = vectors
else:
add_vectors = gen_vectors(nb, dim)
... | [
"def",
"init_data",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"nb",
"=",
"6000",
",",
"partition_tags",
"=",
"None",
")",
":",
"global",
"vectors",
"if",
"nb",
"==",
"6000",
":",
"add_vectors",
"=",
"vectors",
"else",
":",
"add_vectors",
"=",
... | [
29,
4
] | [
47,
31
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.init_binary_data | (self, connect, collection, nb=6000, insert=True, partition_tags=None) |
Generate vectors and add it in collection, before search vectors
|
Generate vectors and add it in collection, before search vectors
| def init_binary_data(self, connect, collection, nb=6000, insert=True, partition_tags=None):
'''
Generate vectors and add it in collection, before search vectors
'''
ids = []
global binary_vectors
global raw_vectors
if nb == 6000:
add_vectors = binary_v... | [
"def",
"init_binary_data",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"nb",
"=",
"6000",
",",
"insert",
"=",
"True",
",",
"partition_tags",
"=",
"None",
")",
":",
"ids",
"=",
"[",
"]",
"global",
"binary_vectors",
"global",
"raw_vectors",
"if",
... | [
49,
4
] | [
69,
48
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_top_k_flat_index | (self, connect, collection, get_top_k) |
target: test basic search fuction, all the search params is corrent, change top-k value
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
|
target: test basic search fuction, all the search params is corrent, change top-k value
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
| def test_search_top_k_flat_index(self, connect, collection, get_top_k):
'''
target: test basic search fuction, all the search params is corrent, change top-k value
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
... | [
"def",
"test_search_top_k_flat_index",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_top_k",
")",
":",
"vectors",
",",
"ids",
"=",
"self",
".",
"init_data",
"(",
"connect",
",",
"collection",
")",
"query_vec",
"=",
"[",
"vectors",
"[",
"0",
"]"... | [
141,
4
] | [
157,
34
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_l2_index_params | (self, connect, collection, get_simple_index) |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
|
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
| def test_search_l2_index_params(self, connect, collection, get_simple_index):
'''
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of th... | [
"def",
"test_search_l2_index_params",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"top_k",
"=",
"10",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_typ... | [
159,
4
] | [
184,
34
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_l2_large_nq_index_params | (self, connect, collection, get_simple_index) |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
|
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
| def test_search_l2_large_nq_index_params(self, connect, collection, get_simple_index):
'''
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the len... | [
"def",
"test_search_l2_large_nq_index_params",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"top_k",
"=",
"10",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"... | [
186,
4
] | [
208,
47
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_l2_index_params_partition | (self, connect, collection, get_simple_index) |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: add vectors into collection, search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k, search collection with partition tag retu... |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: add vectors into collection, search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k, search collection with partition tag retu... | def test_search_l2_index_params_partition(self, connect, collection, get_simple_index):
'''
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: add vectors into collection, search with the given vectors, check the result
expected:... | [
"def",
"test_search_l2_index_params_partition",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"top_k",
"=",
"10",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\... | [
210,
4
] | [
236,
31
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_l2_index_params_partition_A | (self, connect, collection, get_simple_index) |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search partition with the given vectors, check the result
expected: search status ok, and the length of the result is 0
|
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search partition with the given vectors, check the result
expected: search status ok, and the length of the result is 0
| def test_search_l2_index_params_partition_A(self, connect, collection, get_simple_index):
'''
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search partition with the given vectors, check the result
expected: search status ok... | [
"def",
"test_search_l2_index_params_partition_A",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"top_k",
"=",
"10",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
... | [
238,
4
] | [
259,
31
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_l2_index_params_partition_B | (self, connect, collection, get_simple_index) |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
|
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
| def test_search_l2_index_params_partition_B(self, connect, collection, get_simple_index):
'''
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the ... | [
"def",
"test_search_l2_index_params_partition_B",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"top_k",
"=",
"10",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
... | [
261,
4
] | [
289,
47
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_l2_index_params_partition_C | (self, connect, collection, get_simple_index) |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors and tags (one of the tags not existed in collection), check the result
expected: search status ok, and the length of the result is top_k
|
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors and tags (one of the tags not existed in collection), check the result
expected: search status ok, and the length of the result is top_k
| def test_search_l2_index_params_partition_C(self, connect, collection, get_simple_index):
'''
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors and tags (one of the tags not existed in collection), check th... | [
"def",
"test_search_l2_index_params_partition_C",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
... | [
291,
4
] | [
313,
47
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_l2_index_params_partition_D | (self, connect, collection, get_simple_index) |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors and tag (tag name not existed in collection), check the result
expected: search status ok, and the length of the result is top_k
|
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors and tag (tag name not existed in collection), check the result
expected: search status ok, and the length of the result is top_k
| def test_search_l2_index_params_partition_D(self, connect, collection, get_simple_index):
'''
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors and tag (tag name not existed in collection), check the result... | [
"def",
"test_search_l2_index_params_partition_D",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
... | [
316,
4
] | [
333,
30
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_l2_index_params_partition_E | (self, connect, collection, get_simple_index) |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search collection with the given vectors and tags, check the result
expected: search status ok, and the length of the result is top_k
|
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search collection with the given vectors and tags, check the result
expected: search status ok, and the length of the result is top_k
| def test_search_l2_index_params_partition_E(self, connect, collection, get_simple_index):
'''
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search collection with the given vectors and tags, check the result
expected: search... | [
"def",
"test_search_l2_index_params_partition_E",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"top_k",
"=",
"10",
"new_tag",
"=",
"\"new_tag\"",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
"index_param",
... | [
336,
4
] | [
369,
47
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_l2_index_params_partition_F | (self, connect, collection, get_simple_index) |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search collection with the given vectors and tags with "re" expr, check the result
expected: search status ok, and the length of the result is top_k
|
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search collection with the given vectors and tags with "re" expr, check the result
expected: search status ok, and the length of the result is top_k
| def test_search_l2_index_params_partition_F(self, connect, collection, get_simple_index):
'''
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search collection with the given vectors and tags with "re" expr, check the result
e... | [
"def",
"test_search_l2_index_params_partition_F",
"(",
"self",
",",
"connect",
",",
"collection",
",",
"get_simple_index",
")",
":",
"tag",
"=",
"\"atag\"",
"new_tag",
"=",
"\"new_tag\"",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type... | [
371,
4
] | [
401,
47
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_ip_index_params | (self, connect, ip_collection, get_simple_index) |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
|
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
| def test_search_ip_index_params(self, connect, ip_collection, get_simple_index):
'''
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of... | [
"def",
"test_search_ip_index_params",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"top_k",
"=",
"10",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_... | [
404,
4
] | [
426,
81
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_ip_large_nq_index_params | (self, connect, ip_collection, get_simple_index) |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
|
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
| def test_search_ip_large_nq_index_params(self, connect, ip_collection, get_simple_index):
'''
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the ... | [
"def",
"test_search_ip_large_nq_index_params",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
"\"index_type\"",
"]",
... | [
428,
4
] | [
451,
81
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_ip_index_params_partition | (self, connect, ip_collection, get_simple_index) |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
|
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the length of the result is top_k
| def test_search_ip_index_params_partition(self, connect, ip_collection, get_simple_index):
'''
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors, check the result
expected: search status ok, and the... | [
"def",
"test_search_ip_index_params_partition",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"top_k",
"=",
"10",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",
... | [
454,
4
] | [
481,
31
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_ip_index_params_partition_A | (self, connect, ip_collection, get_simple_index) |
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors and tag, check the result
expected: search status ok, and the length of the result is top_k
|
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors and tag, check the result
expected: search status ok, and the length of the result is top_k
| def test_search_ip_index_params_partition_A(self, connect, ip_collection, get_simple_index):
'''
target: test basic search fuction, all the search params is corrent, test all index params, and build
method: search with the given vectors and tag, check the result
expected: search status o... | [
"def",
"test_search_ip_index_params_partition_A",
"(",
"self",
",",
"connect",
",",
"ip_collection",
",",
"get_simple_index",
")",
":",
"top_k",
"=",
"10",
"index_param",
"=",
"get_simple_index",
"[",
"\"index_param\"",
"]",
"index_type",
"=",
"get_simple_index",
"[",... | [
484,
4
] | [
507,
81
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_vectors_without_connect | (self, dis_connect, collection) |
target: test search vectors without connection
method: use dis connected instance, call search method and check if search successfully
expected: raise exception
|
target: test search vectors without connection
method: use dis connected instance, call search method and check if search successfully
expected: raise exception
| def test_search_vectors_without_connect(self, dis_connect, collection):
'''
target: test search vectors without connection
method: use dis connected instance, call search method and check if search successfully
expected: raise exception
'''
query_vectors = [vectors[0]]
... | [
"def",
"test_search_vectors_without_connect",
"(",
"self",
",",
"dis_connect",
",",
"collection",
")",
":",
"query_vectors",
"=",
"[",
"vectors",
"[",
"0",
"]",
"]",
"nprobe",
"=",
"1",
"with",
"pytest",
".",
"raises",
"(",
"Exception",
")",
"as",
"e",
":"... | [
510,
4
] | [
519,
78
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_collection_name_not_existed | (self, connect, collection) |
target: search collection not existed
method: search with the random collection_name, which is not in db
expected: status not ok
|
target: search collection not existed
method: search with the random collection_name, which is not in db
expected: status not ok
| def test_search_collection_name_not_existed(self, connect, collection):
'''
target: search collection not existed
method: search with the random collection_name, which is not in db
expected: status not ok
'''
collection_name = gen_unique_str("not_existed_collection")
... | [
"def",
"test_search_collection_name_not_existed",
"(",
"self",
",",
"connect",
",",
"collection",
")",
":",
"collection_name",
"=",
"gen_unique_str",
"(",
"\"not_existed_collection\"",
")",
"nprobe",
"=",
"1",
"query_vecs",
"=",
"[",
"vectors",
"[",
"0",
"]",
"]",... | [
521,
4
] | [
531,
30
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_collection_name_None | (self, connect, collection) |
target: search collection that collection name is None
method: search with the collection_name: None
expected: status not ok
|
target: search collection that collection name is None
method: search with the collection_name: None
expected: status not ok
| def test_search_collection_name_None(self, connect, collection):
'''
target: search collection that collection name is None
method: search with the collection_name: None
expected: status not ok
'''
collection_name = None
nprobe = 1
query_vecs = [vectors[0]... | [
"def",
"test_search_collection_name_None",
"(",
"self",
",",
"connect",
",",
"collection",
")",
":",
"collection_name",
"=",
"None",
"nprobe",
"=",
"1",
"query_vecs",
"=",
"[",
"vectors",
"[",
"0",
"]",
"]",
"with",
"pytest",
".",
"raises",
"(",
"Exception",... | [
533,
4
] | [
543,
79
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_top_k_query_records | (self, connect, collection) |
target: test search fuction, with search params: query_records
method: search with the given query_records, which are subarrays of the inserted vectors
expected: status ok and the returned vectors should be query_records
|
target: test search fuction, with search params: query_records
method: search with the given query_records, which are subarrays of the inserted vectors
expected: status ok and the returned vectors should be query_records
| def test_search_top_k_query_records(self, connect, collection):
'''
target: test search fuction, with search params: query_records
method: search with the given query_records, which are subarrays of the inserted vectors
expected: status ok and the returned vectors should be query_records... | [
"def",
"test_search_top_k_query_records",
"(",
"self",
",",
"connect",
",",
"collection",
")",
":",
"top_k",
"=",
"10",
"vectors",
",",
"ids",
"=",
"self",
".",
"init_data",
"(",
"connect",
",",
"collection",
")",
"query_vecs",
"=",
"[",
"vectors",
"[",
"0... | [
545,
4
] | [
559,
51
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_distance_l2_flat_index | (self, connect, collection) |
target: search collection, and check the result: distance
method: compare the return distance value with value computed with Euclidean
expected: the return distance equals to the computed value
|
target: search collection, and check the result: distance
method: compare the return distance value with value computed with Euclidean
expected: the return distance equals to the computed value
| def test_search_distance_l2_flat_index(self, connect, collection):
'''
target: search collection, and check the result: distance
method: compare the return distance value with value computed with Euclidean
expected: the return distance equals to the computed value
'''
nb ... | [
"def",
"test_search_distance_l2_flat_index",
"(",
"self",
",",
"connect",
",",
"collection",
")",
":",
"nb",
"=",
"2",
"vectors",
",",
"ids",
"=",
"self",
".",
"init_data",
"(",
"connect",
",",
"collection",
",",
"nb",
"=",
"nb",
")",
"query_vecs",
"=",
... | [
561,
4
] | [
573,
124
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_distance_ip_flat_index | (self, connect, ip_collection) |
target: search ip_collection, and check the result: distance
method: compare the return distance value with value computed with Inner product
expected: the return distance equals to the computed value
|
target: search ip_collection, and check the result: distance
method: compare the return distance value with value computed with Inner product
expected: the return distance equals to the computed value
| def test_search_distance_ip_flat_index(self, connect, ip_collection):
'''
target: search ip_collection, and check the result: distance
method: compare the return distance value with value computed with Inner product
expected: the return distance equals to the computed value
'''
... | [
"def",
"test_search_distance_ip_flat_index",
"(",
"self",
",",
"connect",
",",
"ip_collection",
")",
":",
"nb",
"=",
"2",
"nprobe",
"=",
"1",
"vectors",
",",
"ids",
"=",
"self",
".",
"init_data",
"(",
"connect",
",",
"ip_collection",
",",
"nb",
"=",
"nb",
... | [
575,
4
] | [
595,
112
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_distance_jaccard_flat_index | (self, connect, jac_collection) |
target: search ip_collection, and check the result: distance
method: compare the return distance value with value computed with Inner product
expected: the return distance equals to the computed value
|
target: search ip_collection, and check the result: distance
method: compare the return distance value with value computed with Inner product
expected: the return distance equals to the computed value
| def test_search_distance_jaccard_flat_index(self, connect, jac_collection):
'''
target: search ip_collection, and check the result: distance
method: compare the return distance value with value computed with Inner product
expected: the return distance equals to the computed value
... | [
"def",
"test_search_distance_jaccard_flat_index",
"(",
"self",
",",
"connect",
",",
"jac_collection",
")",
":",
"# from scipy.spatial import distance",
"nprobe",
"=",
"512",
"int_vectors",
",",
"vectors",
",",
"ids",
"=",
"self",
".",
"init_binary_data",
"(",
"connect... | [
597,
4
] | [
620,
82
] | python | en | ['en', 'error', 'th'] | False |
TestSearchBase.test_search_distance_hamming_flat_index | (self, connect, ham_collection) |
target: search ip_collection, and check the result: distance
method: compare the return distance value with value computed with Inner product
expected: the return distance equals to the computed value
|
target: search ip_collection, and check the result: distance
method: compare the return distance value with value computed with Inner product
expected: the return distance equals to the computed value
| def test_search_distance_hamming_flat_index(self, connect, ham_collection):
'''
target: search ip_collection, and check the result: distance
method: compare the return distance value with value computed with Inner product
expected: the return distance equals to the computed value
... | [
"def",
"test_search_distance_hamming_flat_index",
"(",
"self",
",",
"connect",
",",
"ham_collection",
")",
":",
"# from scipy.spatial import distance",
"nprobe",
"=",
"512",
"int_vectors",
",",
"vectors",
",",
"ids",
"=",
"self",
".",
"init_binary_data",
"(",
"connect... | [
622,
4
] | [
645,
96
] | 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.