This repository was archived by the owner on Nov 22, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
third_party/3/pyspark/sql Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class DataFrameReader(OptionUtils):
2828 def json (
2929 self ,
3030 path : Union [str , List [str ], RDD [str ]],
31- schema : Optional [StructType ] = ...,
31+ schema : Optional [Union [ StructType , str ] ] = ...,
3232 primitivesAsString : Optional [Union [bool , str ]] = ...,
3333 prefersDecimal : Optional [Union [bool , str ]] = ...,
3434 allowComments : Optional [Union [bool , str ]] = ...,
@@ -55,7 +55,7 @@ class DataFrameReader(OptionUtils):
5555 def csv (
5656 self ,
5757 path : PathOrPaths ,
58- schema : Optional [StructType ] = ...,
58+ schema : Optional [Union [ StructType , str ] ] = ...,
5959 sep : Optional [str ] = ...,
6060 encoding : Optional [str ] = ...,
6161 quote : Optional [str ] = ...,
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ class DataStreamReader(OptionUtils):
5959 def json (
6060 self ,
6161 path : str ,
62- schema : Optional [str ] = ...,
62+ schema : Optional [Union [ StructType , str ] ] = ...,
6363 primitivesAsString : Optional [Union [bool , str ]] = ...,
6464 prefersDecimal : Optional [Union [bool , str ]] = ...,
6565 allowComments : Optional [Union [bool , str ]] = ...,
@@ -83,7 +83,7 @@ class DataStreamReader(OptionUtils):
8383 def csv (
8484 self ,
8585 path : str ,
86- schema : Optional [StructType ] = ...,
86+ schema : Optional [Union [ StructType , str ] ] = ...,
8787 sep : Optional [str ] = ...,
8888 encoding : Optional [str ] = ...,
8989 quote : Optional [str ] = ...,
You can’t perform that action at this time.
0 commit comments