-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathtest_varbinary_tbl.py
More file actions
31 lines (25 loc) · 1011 Bytes
/
Copy pathtest_varbinary_tbl.py
File metadata and controls
31 lines (25 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from .aggtst_base import TstTable
class aggtst_varbinary_table(TstTable):
"""Define the table used by the varbinary tests"""
def __init__(self):
self.sql = """CREATE TABLE varbinary_tbl(
id INT,
c1 VARBINARY,
c2 VARBINARY NULL)"""
self.data = [
{"id": 0, "c1": [12, 22, 32], "c2": None},
{"id": 0, "c1": [23, 56, 33, 21], "c2": [55, 66, 77, 88]},
{"id": 1, "c1": [23, 56, 33, 21], "c2": [99, 20, 31, 77]},
{"id": 1, "c1": [49, 43, 84, 29, 11], "c2": [32, 34]},
]
# Equivalent SQL for Postgres
# CREATE TABLE varbinary_tbl (
# id INT,
# c1 BYTEA,
# c2 BYTEA NULL
# );
# INSERT INTO varbinary_tbl (id, c1, c2) VALUES
# (0, '\x0c1620', NULL),
# (0, '\x17382115', '\x37424d58'),
# (1, '\x17382115', '\x63141f4d'),
# (1, '\x312b541d0b', '\x2022');