File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 22
33import platform
44import sys
5+ from importlib .metadata import version
56from typing import TYPE_CHECKING
67from typing import Any
78from typing import Iterable
@@ -1138,12 +1139,12 @@ def _scan_parquet_impl(
11381139 if (session := kwargs .pop ("session" , None )) is None :
11391140 msg = "Spark like backends require a session object to be passed in `kwargs`."
11401141 raise ValueError (msg )
1141-
11421142 native_frame = (
11431143 session .read .format ("parquet" ).load (source )
1144- # passing `options` currently not possible in SQLFrame: see
1145- # https://github.com/eakmanrq/sqlframe/issues/341
1146- if implementation is Implementation .SQLFRAME
1144+ if (
1145+ implementation is Implementation .SQLFRAME
1146+ and (parse_version (version ("sqlframe" ))) < (3 , 27 , 0 )
1147+ )
11471148 else session .read .format ("parquet" ).options (** kwargs ).load (source )
11481149 )
11491150
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ def test_scan_parquet(
158158 if "sqlframe" in str (constructor ):
159159 from sqlframe .duckdb import DuckDBSession
160160
161- kwargs = {"session" : DuckDBSession ()}
161+ kwargs = {"session" : DuckDBSession (), "inferSchema" : True }
162162 elif "pyspark" in str (constructor ):
163163 from pyspark .sql import SparkSession
164164
You can’t perform that action at this time.
0 commit comments