huaxingao commented on a change in pull request #26370:
[SPARK-29727][ML][PYTHON] Use UnaryTransformer as parent class for single input
column transformers in PySpark
URL: https://github.com/apache/spark/pull/26370#discussion_r341820500
##########
File path: python/pyspark/ml/feature.py
##########
@@ -1014,10 +1015,21 @@ def setOutputCol(self, value):
"""
return self._set(outputCol=value)
+ def createTransformFunc(self):
+ self._transfer_params_to_java()
+ return self._java_obj.createTransformFunc()
+
+ def outputDataType(self):
+ self._transfer_params_to_java()
+ return self._java_obj.outputDataType()
+
+ def validateInputType(self, inputType):
+ self._transfer_params_to_java()
+ self._java_obj.validateInputType(inputType)
+
Review comment:
Do we still need to support Python 2.7? I have to implement the above three
methods to make Python 2.7 pass. I tried to put _ in front of these method
names, but 2.7 failed with ```TypeError: Can't instantiate abstract class DCT
with abstract methods createTransformFunc, outputDataType, validateInputType```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]