Github user snaga commented on a diff in the pull request:

    https://github.com/apache/incubator-madlib/pull/57#discussion_r71476210
  
    --- Diff: methods/array_ops/src/pg_gp/array_ops.sql_in ---
    @@ -602,11 +602,22 @@ m4_ifdef(`__HAS_FUNCTION_PROPERTIES__', `NO SQL', `');
      *        in later GPDB and Postgres versions.
      */
     DROP AGGREGATE IF EXISTS MADLIB_SCHEMA.array_agg(anyelement) CASCADE;
    -CREATE AGGREGATE MADLIB_SCHEMA.array_agg( anyelement) (
    -   SFUNC     = array_append,
    -   STYPE     = anyarray
    -   m4_ifdef( `__POSTGRESQL__', `', `, PREFUNC   = array_cat')
    -);
    +DO $$
    +BEGIN
    +  --
    +  -- array_agg() compatibility function is only needed PostgreSQL 9.4 or 
earlier
    +  -- because 9.5 or later has pg_catalog.array_agg(anyarray).
    +  --
    +  IF regexp_replace(version(), '.*PostgreSQL (\d+\.\d+).*', '\1')::float8 
< 9.5 THEN
    --- End diff --
    
    If we can drop this function at all, it would make things simpler. Does the 
latest GPDB have array_agg(anyarray) function? I'm not familiar with GPDB.
    
    I'm not sure MADlib could work with 9.4 without this function, but at 
least, we need to drop this function for 9.5 or later because the function 
signature causes a conflict error with the built-in one.
    
    BTW, is there any MADlib docs mentioning "current supported platform"? I 
could not find it...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to