Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ pyarrow
neo4j
xgt
pandas
arrow_odbc==0.2.0
arrow_odbc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Unpinning a dependency completely can lead to unexpected build failures if a future version introduces breaking changes. It's better to specify a minimum version to ensure a baseline of compatibility while still allowing newer, non-breaking versions.

arrow_odbc>=0.2.0

antlr4-python3-runtime
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ install_requires =
where = src

[options.extras_require]
odbc = arrow_odbc==0.2.0
odbc = arrow_odbc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better dependency management and to prevent potential issues for users installing this extra, it's advisable to specify a minimum version for arrow_odbc rather than leaving it unpinned. This ensures compatibility while allowing for updates.

odbc = arrow_odbc>=0.2.0

pandas
18 changes: 9 additions & 9 deletions test/test_odbc_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_transfer(self):
result = [[1, 32, 5000, 1.7, 1.98, 'vdxs', 'String', 1.78976, date(year = 1989, month = 5, day = 6),
datetime(year = 1986, month = 5, day = 6, hour = 12, minute = 56, second = 34),
datetime(year = 1989, month = 5, day = 6, hour = 12, minute = 56, second = 34),
'12:56:34', 1999], [None, None, None, None, None, None, None, None, None, None, None, None, None]]
time(12, 56, 34), 1999], [None, None, None, None, None, None, None, None, None, None, None, None, None]]
cursor = self.odbc_driver.cursor()
cursor.execute("CREATE TABLE test (TestBool BOOL, TestInt INT, TestBigInt BIGINT, TestFloat FLOAT(24), TestDouble FLOAT(53), "
"TestFixedString char(5), TestString varchar(255), TestDecimal DECIMAL(10, 6), TestDate DATE, "
Expand Down Expand Up @@ -357,8 +357,8 @@ def test_transfer_to_odbc(self):
result = [[1, 32, 5000, 1.7, 1.98, 'vdxs', 'String', 1.78976, date(year = 1989, month = 5, day = 6),
datetime(year = 1986, month = 5, day = 6, hour = 12, minute = 56, second = 34),
datetime(year = 1989, month = 5, day = 6, hour = 12, minute = 56, second = 34),
'12:56:34', 1999]]
#'12:56:34', 1999], [None, None, None, None, None, None, None, None, None, None, None, None, None]]
time(12, 56, 34), 1999]]
#time(12, 56, 34), 1999], [None, None, None, None, None, None, None, None, None, None, None, None, None]]
cursor = self.odbc_driver.cursor()
create_statement = """CREATE TABLE test (TestBool BOOL, TestInt INT, TestBigInt BIGINT, TestFloat FLOAT(24), TestDouble FLOAT(53),
TestFixedString char(5), TestString varchar(255), TestDecimal DECIMAL(10, 6), TestDate DATE,
Expand All @@ -381,7 +381,7 @@ def test_transfer_to_odbc_rename(self):
result = [[1, 32, 5000, 1.7, 1.98, 'vdxs', 'String', 1.78976, date(year = 1989, month = 5, day = 6),
datetime(year = 1986, month = 5, day = 6, hour = 12, minute = 56, second = 34),
datetime(year = 1989, month = 5, day = 6, hour = 12, minute = 56, second = 34),
'12:56:34', 1999]]
time(12, 56, 34), 1999]]
cursor = self.odbc_driver.cursor()
create_statement = """CREATE TABLE test (TestBool BOOL, TestInt INT, TestBigInt BIGINT, TestFloat FLOAT(24), TestDouble FLOAT(53),
TestFixedString char(5), TestString varchar(255), TestDecimal DECIMAL(10, 6), TestDate DATE,
Expand All @@ -403,7 +403,7 @@ def test_transfer_to_odbc_vertex(self):
result = [[1, 32, 5000, 1.7, 1.98, 'vdxs', 'String', 1.78976, date(year = 1989, month = 5, day = 6),
datetime(year = 1986, month = 5, day = 6, hour = 12, minute = 56, second = 34),
datetime(year = 1989, month = 5, day = 6, hour = 12, minute = 56, second = 34),
'12:56:34', 1999]]
time(12, 56, 34), 1999]]
cursor = self.odbc_driver.cursor()
create_statement = """CREATE TABLE test (TestBool BOOL, TestInt INT, TestBigInt BIGINT, TestFloat FLOAT(24), TestDouble FLOAT(53),
TestFixedString char(5), TestString varchar(255), TestDecimal DECIMAL(10, 6), TestDate DATE,
Expand All @@ -425,7 +425,7 @@ def test_transfer_to_odbc_vertex_rename(self):
result = [[1, 32, 5000, 1.7, 1.98, 'vdxs', 'String', 1.78976, date(year = 1989, month = 5, day = 6),
datetime(year = 1986, month = 5, day = 6, hour = 12, minute = 56, second = 34),
datetime(year = 1989, month = 5, day = 6, hour = 12, minute = 56, second = 34),
'12:56:34', 1999]]
time(12, 56, 34), 1999]]
cursor = self.odbc_driver.cursor()
create_statement = """CREATE TABLE test (TestBool BOOL, TestInt INT, TestBigInt BIGINT, TestFloat FLOAT(24), TestDouble FLOAT(53),
TestFixedString char(5), TestString varchar(255), TestDecimal DECIMAL(10, 6), TestDate DATE,
Expand All @@ -447,7 +447,7 @@ def test_transfer_to_odbc_edges(self):
result = [[1, 32, 5000, 1.7, 1.98, 'vdxs', 'String', 1.78976, date(year = 1989, month = 5, day = 6),
datetime(year = 1986, month = 5, day = 6, hour = 12, minute = 56, second = 34),
datetime(year = 1989, month = 5, day = 6, hour = 12, minute = 56, second = 34),
'12:56:34', 1999]]
time(12, 56, 34), 1999]]
cursor = self.odbc_driver.cursor()
create_statement = """CREATE TABLE test (TestBool BOOL, TestInt INT, TestBigInt BIGINT, TestFloat FLOAT(24), TestDouble FLOAT(53),
TestFixedString char(5), TestString varchar(255), TestDecimal DECIMAL(10, 6), TestDate DATE,
Expand All @@ -469,7 +469,7 @@ def test_transfer_to_odbc_edges_rename(self):
result = [[1, 32, 5000, 1.7, 1.98, 'vdxs', 'String', 1.78976, date(year = 1989, month = 5, day = 6),
datetime(year = 1986, month = 5, day = 6, hour = 12, minute = 56, second = 34),
datetime(year = 1989, month = 5, day = 6, hour = 12, minute = 56, second = 34),
'12:56:34', 1999]]
time(12, 56, 34), 1999]]
cursor = self.odbc_driver.cursor()
create_statement = """CREATE TABLE test (TestBool BOOL, TestInt INT, TestBigInt BIGINT, TestFloat FLOAT(24), TestDouble FLOAT(53),
TestFixedString char(5), TestString varchar(255), TestDecimal DECIMAL(10, 6), TestDate DATE,
Expand All @@ -491,7 +491,7 @@ def test_transfer_query(self):
result = [[1, 32, 5000, 1.7, 1.98, 'vdxs', 'String', 1.78976, date(year = 1989, month = 5, day = 6),
datetime(year = 1986, month = 5, day = 6, hour = 12, minute = 56, second = 34),
datetime(year = 1989, month = 5, day = 6, hour = 12, minute = 56, second = 34),
'12:56:34', 1999], [None, None, None, None, None, None, None, None, None, None, None, None, None]]
time(12, 56, 34), 1999], [None, None, None, None, None, None, None, None, None, None, None, None, None]]
cursor = self.odbc_driver.cursor()
cursor.execute("CREATE TABLE test (TestBool BOOL, TestInt INT, TestBigInt BIGINT, TestFloat FLOAT(24), TestDouble FLOAT(53), "
"TestFixedString char(5), TestString varchar(255), TestDecimal DECIMAL(10, 6), TestDate DATE, "
Expand Down