Skip to content

Commit 6990a20

Browse files
committed
fix: update pyarrow import handling
1 parent 00ff8a4 commit 6990a20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/system_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import pathlib
1010
import numpy as np
1111
import decimal
12-
import pyarrow as pa
1312

1413
import patch_path
1514
PROJ_ROOT = patch_path.PROJ_ROOT
@@ -24,6 +23,7 @@
2423
import pyarrow
2524
except ImportError:
2625
pd = None
26+
pyarrow = None
2727

2828

2929
import questdb.ingress as qi
@@ -219,7 +219,7 @@ def test_http(self):
219219

220220
resp = self.qdb_plain.retry_check_table(table_name, min_rows=3)
221221

222-
exp_ts_type = 'TIMESTAMP' if self.qdb_plain.version <= (9, 1, 0) else 'TIMESTAMP_NS'
222+
exp_ts_type = 'TIMESTAMP' if self.qdb_plain.version < (9, 1, 0) else 'TIMESTAMP_NS'
223223

224224
exp_columns = [
225225
{'name': 'name_a', 'type': 'SYMBOL'},
@@ -291,7 +291,7 @@ def test_decimal_py_obj(self):
291291
scrubbed_data = [row[:-1] for row in resp['dataset']]
292292
self.assertEqual(scrubbed_data, expected_data)
293293

294-
@unittest.skipIf(not pa, 'pyarrow not installed')
294+
@unittest.skipIf(not pyarrow, 'pyarrow not installed')
295295
@unittest.skipIf(not pd, 'pandas not installed')
296296
def test_decimal_pyarrow(self):
297297
if self.qdb_plain.version < FIRST_DECIMAL_RELEASE:
@@ -303,7 +303,7 @@ def test_decimal_pyarrow(self):
303303
decimal.Decimal('-678'),
304304
None
305305
],
306-
dtype=pd.ArrowDtype(pa.decimal128(18, 2))
306+
dtype=pd.ArrowDtype(pyarrow.decimal128(18, 2))
307307
)
308308
})
309309

0 commit comments

Comments
 (0)