tuhaihe commented on code in PR #627:
URL: https://github.com/apache/madlib/pull/627#discussion_r2592197695


##########
src/ports/postgres/modules/pmml/table_to_pmml.sql_in:
##########
@@ -307,6 +307,14 @@ File table_to_pmml.sql_in documenting the PMML export 
functions.
 CREATE OR REPLACE FUNCTION MADLIB_SCHEMA.pmml(
     model_table varchar
 ) RETURNS xml AS $$
+
+import collections
+import collections.abc
+if not hasattr(collections, 'MutableSequence'):
+    collections.MutableSequence = collections.abc.MutableSequence
+    collections.MutableMapping = collections.abc.MutableMapping
+    collections.MutableSet = collections.abc.MutableSet
+

Review Comment:
   Maybe we can move the Python3 compatibility code into 
`src/ports/postgres/modules/pmml/__init__.py_in` to avoid the SQL-side code 
interfering with M4 macro expansion?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to