@@ -859,7 +859,7 @@ def _process_time_partitioning(
859859 partitioning_period = time_partitioning .type_
860860
861861 else :
862- # If no field is given, default to "_PARTITIONDATE" as the
862+ # If no field is given, default to "_PARTITIONDATE" as the
863863 # field to partition on. In addition, to normalize the processing in
864864 # the remainder of this function, set column_type and partitioning_period
865865 # as shown below.
@@ -871,16 +871,16 @@ def _process_time_partitioning(
871871 sqltypes_w_no_partitioning_period = {
872872 # Keys are columns, values are functions
873873 "_PARTITIONDATE" : None ,
874- "_PARTITIONTIME" : "DATE" , # <date function>
875- "DATE" : None , # 'DATE' is a <date_column> not a function
876- "DATETIME" : "DATE" , # <date function>
877- "TIMESTAMP" : "DATE" , # <date function>
874+ "_PARTITIONTIME" : "DATE" , # <date function>
875+ "DATE" : None , # 'DATE' is a <date_column> not a function
876+ "DATETIME" : "DATE" , # <date function>
877+ "TIMESTAMP" : "DATE" , # <date function>
878878 }
879879
880880 # TODO: move this dictionary outside the function or to top of function
881881 sqltypes_w_partitioning_period = {
882882 # Keys are columns, values are (functions, {allowed_partioning_periods})
883- #"_PARTITIONDATE": ("_PARTITIONDATE", {}),
883+ # "_PARTITIONDATE": ("_PARTITIONDATE", {}),
884884 "DATE" : ("DATE_TRUNC" , {"MONTH" , "YEAR" }),
885885 "DATETIME" : ("DATETIME_TRUNC" , {"DAY" , "HOUR" , "MONTH" , "YEAR" }),
886886 "TIMESTAMP" : ("TIMESTAMP_TRUNC" , {"DAY" , "HOUR" , "MONTH" , "YEAR" }),
@@ -893,7 +893,7 @@ def _process_time_partitioning(
893893 if partitioning_period is None :
894894 function = sqltypes_w_no_partitioning_period [column_type ]
895895 else :
896- function , allowed_partitions = sqltypes_w_partitioning_period [column_type ]
896+ function , allowed_partitions = sqltypes_w_partitioning_period [column_type ]
897897
898898 # Create output:
899899 # Special Case 1: _PARTITIONDATE does NOT use a function or partitioning_period
0 commit comments