@@ -1113,7 +1113,7 @@ def open_writer(
1113
1113
1114
1114
if partition and not isinstance (partition , odps_types .PartitionSpec ):
1115
1115
partition = odps_types .PartitionSpec (partition )
1116
- if create_partition and not self .exist_partition (create_partition ):
1116
+ if create_partition and not self .exist_partition (partition ):
1117
1117
self .create_partition (partition , if_not_exists = True )
1118
1118
1119
1119
tunnel = self ._create_table_tunnel (endpoint = endpoint , quota_name = quota_name )
@@ -1269,7 +1269,7 @@ def partitions(self):
1269
1269
1270
1270
@utils .with_wait_argument
1271
1271
def create_partition (
1272
- self , partition_spec , if_not_exists = False , async_ = False , hints = None
1272
+ self , partition_spec , if_not_exists = False , async_ = False , hints = None , ** inst_kw
1273
1273
):
1274
1274
"""
1275
1275
Create a partition within the table.
@@ -1282,12 +1282,16 @@ def create_partition(
1282
1282
:rtype: odps.models.partition.Partition
1283
1283
"""
1284
1284
return self .partitions .create (
1285
- partition_spec , if_not_exists = if_not_exists , hints = hints , async_ = async_
1285
+ partition_spec ,
1286
+ if_not_exists = if_not_exists ,
1287
+ hints = hints ,
1288
+ async_ = async_ ,
1289
+ ** inst_kw
1286
1290
)
1287
1291
1288
1292
@utils .with_wait_argument
1289
1293
def delete_partition (
1290
- self , partition_spec , if_exists = False , async_ = False , hints = None
1294
+ self , partition_spec , if_exists = False , async_ = False , hints = None , ** inst_kw
1291
1295
):
1292
1296
"""
1293
1297
Delete a partition within the table.
@@ -1298,7 +1302,7 @@ def delete_partition(
1298
1302
:param async_:
1299
1303
"""
1300
1304
return self .partitions .delete (
1301
- partition_spec , if_exists = if_exists , hints = hints , async_ = async_
1305
+ partition_spec , if_exists = if_exists , hints = hints , async_ = async_ , ** inst_kw
1302
1306
)
1303
1307
1304
1308
def exist_partition (self , partition_spec ):
0 commit comments