@@ -1445,14 +1445,12 @@ class RunEndEncodeOptions(_RunEndEncodeOptions):
14451445
14461446
14471447cdef class _InversePermutationOptions(FunctionOptions):
1448- def _set_options (self , max_index , output_type ):
1449- if output_type is None :
1450- self .wrapped.reset(new CInversePermutationOptions(max_index))
1451- else :
1452- output_ty = ensure_type(output_type)
1453- self .wrapped.reset(
1454- new CInversePermutationOptions(max_index,
1455- pyarrow_unwrap_data_type(output_ty)))
1448+ def _set_options (self , max_index = - 1 , output_type = None ):
1449+ cdef optional[shared_ptr[CDataType]] c_output_type = nullopt
1450+ if output_type is not None :
1451+ c_output_type = pyarrow_unwrap_data_type(ensure_type(output_type))
1452+ self .wrapped.reset(
1453+ new CInversePermutationOptions(max_index, c_output_type))
14561454
14571455
14581456class InversePermutationOptions (_InversePermutationOptions ):
@@ -1467,7 +1465,7 @@ class InversePermutationOptions(_InversePermutationOptions):
14671465 If negative, this value will be set to the length of the input indices
14681466 minus 1 and the length of the function’s output will be the length
14691467 of the input indices.
1470- output_type : Optional[ DataType] , default None
1468+ output_type : DataType, default None
14711469 The type of the output inverse permutation.
14721470 If None, the output will be of the same type as the input indices, otherwise
14731471 must be signed integer type. An invalid error will be reported if this type
0 commit comments