Skip to content

Commit 7073626

Browse files
jorisvandenbosschekszucs
authored andcommitted
ARROW-13525: [Python] Mention alternative deprecation message for ParquetDataset.partitions
Closes #11380 from jorisvandenbossche/ARROW-13525 Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com> Signed-off-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
1 parent 871d165 commit 7073626

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

python/pyarrow/parquet.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1529,7 +1529,11 @@ def pieces(self):
15291529
@property
15301530
def partitions(self):
15311531
warnings.warn(
1532-
_DEPR_MSG.format("ParquetDataset.partitions", ""),
1532+
_DEPR_MSG.format(
1533+
"ParquetDataset.partitions",
1534+
" Specify 'use_legacy_dataset=False' while constructing the "
1535+
"ParquetDataset, and then use the '.partitioning' attribute "
1536+
"instead."),
15331537
DeprecationWarning, stacklevel=2)
15341538
return self._partitions
15351539

@@ -1811,6 +1815,13 @@ def files(self):
18111815
def filesystem(self):
18121816
return self._dataset.filesystem
18131817

1818+
@property
1819+
def partitioning(self):
1820+
"""
1821+
The partitioning of the Dataset source, if discovered.
1822+
"""
1823+
return self._dataset.partitioning
1824+
18141825

18151826
_read_table_docstring = """
18161827
{0}

0 commit comments

Comments
 (0)