File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1
1
""" orc compat """
2
2
3
+ import distutils
4
+
3
5
from pandas .compat ._optional import import_optional_dependency
4
6
from pandas .errors import AbstractMethodError
5
7
@@ -68,6 +70,13 @@ def __init__(self):
68
70
pyarrow = import_optional_dependency (
69
71
"pyarrow" , extra = "pyarrow is required for orc support."
70
72
)
73
+
74
+ # we require a newer version of pyarrow that we support for parquet
75
+ import pyarrow
76
+
77
+ if distutils .version .LooseVersion (pyarrow .__version__ ) < "0.13.0" :
78
+ raise ImportError ("pyarrow must be >= 0.13.0 for read_orc" )
79
+
71
80
import pyarrow .orc
72
81
73
82
self .api = pyarrow
Original file line number Diff line number Diff line change 1
1
""" test orc compat """
2
2
import datetime
3
+ import distutils
3
4
import os
4
5
5
6
import numpy as np
7
+ import pytest
8
+
6
9
import pandas as pd
7
10
import pandas .util .testing as tm
8
- import pytest
11
+
9
12
from pandas .io .orc import PyArrowImpl , get_engine , read_orc
10
13
11
14
try :
12
15
import pyarrow # noqa
13
16
17
+ if distutils .version .LooseVersion (pyarrow .__version__ ) < "0.13.0" :
18
+ raise ImportError ("pyarrow must be >= 0.13.0 for read_orc" )
19
+
14
20
_HAVE_PYARROW = True
15
21
except ImportError :
16
22
_HAVE_PYARROW = False
You can’t perform that action at this time.
0 commit comments