Permalink
Browse files

Madpack Upgrade Support: from v1.x to v1.6

Pivotal Tracker: #67685562

Additional authors:
- Shengwen Yang <syang@gopivotal.com>
- Qian, Hai <hqian@gopivotal.com>
- Preethi Jayaram <preethi.jayaram@gmail.com>
- Chuck Litzell <litzellc@gopivotal.com>

Changes:
- add upgrade support for user-defined operators (UDOs) and user-defined
  operator classes (UDOCs)
- add udo and udoc to changelist*.yaml
- use diff_udt.sql and diff_udf.sql to update changelist*.yaml
- revert coxph to use varchar
- update version numbers
- use DROP FUNCTION for arrray_sqrt() to support madpack reinstall in
  HAWQ (v1.6 over v1.5)
- fix error msg and relax install-check threshold for logregr CG
- doc fix for PMML
  • Loading branch information...
1 parent 73178bd commit d561cb89f54539c00d6a9cba3c15814251928780 @haying haying committed Jun 24, 2014
@@ -2,7 +2,7 @@
# Packaging for Greenplum's gppkg
# ------------------------------------------------------------------------------
-set(MADLIB_GPPKG_VERSION "1.9dev")
+set(MADLIB_GPPKG_VERSION "1.9.1")
set(MADLIB_GPPKG_RELEASE_NUMBER 1)
set(MADLIB_GPPKG_RPM_SOURCE_DIR
"${CMAKE_BINARY_DIR}/_CPack_Packages/Linux/RPM/${CPACK_PACKAGE_FILE_NAME}"
View
@@ -2,7 +2,7 @@
# $0 - Script Path, $1 - Package Path, $2 - Target Location, and $3 - Target Volumn
-MADLIB_VERSION=1.5dev
+MADLIB_VERSION=1.6
find $2/usr/local/madlib/bin -type d -exec cp -RPf {} $2/usr/local/madlib/old_bin \; 2>/dev/null
find $2/usr/local/madlib/bin -depth -type d -exec rm -r {} \; 2>/dev/null
@@ -456,7 +456,8 @@ m4_ifdef(`__HAS_FUNCTION_PROPERTIES__', `NO SQL', `');
* @returns Square root of all elements of x.
*
*/
-CREATE OR REPLACE FUNCTION MADLIB_SCHEMA.array_sqrt(x anyarray) RETURNS float8[]
+DROP FUNCTION IF EXISTS MADLIB_SCHEMA.array_sqrt(x anyarray) CASCADE;
+CREATE FUNCTION MADLIB_SCHEMA.array_sqrt(x anyarray) RETURNS float8[]
AS 'MODULE_PATHNAME', 'array_sqrt'
LANGUAGE C IMMUTABLE
m4_ifdef(`__HAS_FUNCTION_PROPERTIES__', `NO SQL', `');
View
@@ -1 +1 @@
-version: 1.5dev
+version: 1.6
View
@@ -1,4 +1,4 @@
-# Changelist for MADlib version 1.4.1 to 1.5
+# Changelist for MADlib version 1.5 to 1.6
# This file contains all changes that were introduced in a new version of
# MADlib. This changelist is used by the upgrade script to detect what objects
@@ -9,159 +9,132 @@
# file installed on the upgrade version. All other files (that don't have
# updates), are cleaned up to remove object replacements
new module:
- # ----------------- Changes from 1.4.1 to 1.5 ---------------
- svec_util:
+ # ----------------- Changes from 1.5 to 1.6 ---------------
+ table_to_pmml:
# Changes in the types (UDT) including removal and modification
udt:
- # ----------------- Changes from 1.4.1 to 1.5 ---------------
+ # ----------------- Changes from 1.5 to 1.6 ---------------
+ __logregr_result:
+ coxph_result:
+ linregr_result:
+ mlogregr_result:
-# List of the UDF changes that affect the user externally. This includes change
-# in function name, change in argument order or argument types, and removal of
+# List of the UDF changes that affect the user externally. This includes change
+# in function name, return type, argument order or types, or removal of
# the function. In each case, the original function is as good as removed and a
# new function is created. In such cases, we should abort the upgrade if there
# are user views dependent on this function, since the original function will
# not be present in the upgraded version.
udf:
- # ----------------- Changes from 1.4.1 to 1.5 ---------------
- - __cmsketch_final:
- rettype: bytea
- argument: bytea
- - __delete_traininginfo:
- rettype: void
- argument: text
- - __get_encode_table_name:
- rettype: text
- argument: text
- - __get_metatable_name:
- rettype: text
- argument: text
- - __get_routine_id:
- rettype: integer
- argument: text
- - __get_routine_name:
- rettype: text
- argument: text
- - __get_tree_table_name:
- rettype: text
- argument: text
- - __insert_into_traininginfo:
- rettype: void
- argument: text, text, text, text, text, text, text, text, double precision, integer, integer
- - __treemodel_clean:
+ # ----------------- Changes from 1.5 to 1.6 ---------------
+ # Removed functions
+ - array_contains_null:
rettype: boolean
- argument: text
- - compute_lincrf:
- rettype: integer
- argument: character varying, character varying, character varying, character varying, character varying, integer, integer
- - create_nb_classify_fn:
- rettype: void
- argument: character varying, character varying, integer, character varying
- - create_nb_classify_fn:
- rettype: void
+ argument: double precision[]
+ - array_sqrt:
+ rettype: anyarray
+ argument: anyarray
+ - coxph_step_final:
+ rettype: double precision[]
+ argument: double precision[]
+ - coxph_step_strata_final:
+ rettype: double precision[]
+ argument: double precision[]
+ - coxph_step_transition:
+ rettype: double precision[]
+ argument: double precision[], double precision[], double precision, boolean, double precision[]
+ - internal_coxph_result:
+ rettype: schema_madlib.coxph_result
+ argument: double precision[]
+ - internal_coxph_step_distance:
+ rettype: double precision
+ argument: double precision[], double precision[]
+ - normalize:
+ rettype: double precision[]
+ argument: double precision[]
+ # Changed functions (return type)
+ # These functions can be recreated correctly even if we don't add them here.
+ # But the view dependency checker needs the information.
+ - __internal_mlogregr_irls_result:
+ rettype: schema_madlib.mlogregr_result
+ argument: double precision[]
+ - __logregr_cg_result:
+ rettype: schema_madlib.__logregr_result
+ argument: double precision[]
+ - __logregr_igd_result:
+ rettype: schema_madlib.__logregr_result
+ argument: double precision[]
+ - __logregr_irls_result:
+ rettype: schema_madlib.__logregr_result
+ argument: double precision[]
+ - linregr_final:
+ rettype: schema_madlib.linregr_result
+ argument: schema_madlib.bytea8
+ - mlogregr:
+ rettype: schema_madlib.mlogregr_result
+ argument: character varying, character varying, character varying, integer, character varying, double precision, integer
+ - mlogregr:
+ rettype: schema_madlib.mlogregr_result
argument: character varying, character varying, character varying, integer, character varying
- - create_table_as:
- rettype: void
- argument: character varying, character varying
- - create_table_as:
- rettype: void
- argument: character varying, character varying, character varying
- - create_temp_table_as:
- rettype: void
- argument: character varying, character varying, character varying
- - create_temp_table_as:
- rettype: void
- argument: character varying, character varying
- - create_temporary_table_as:
- rettype: void
+ - mlogregr:
+ rettype: schema_madlib.mlogregr_result
+ argument: character varying, character varying, character varying, integer
+ - mlogregr:
+ rettype: schema_madlib.mlogregr_result
argument: character varying, character varying, character varying
- - create_temporary_table_as:
- rettype: void
- argument: character varying, character varying
- - crf_train_fgen:
- rettype: void
- argument: text, text, text, text, text
- - insert_into:
- rettype: void
- argument: character varying, character varying
- - internal_create_table_as:
- rettype: void
- argument: boolean, character varying, character varying, character varying
- - internal_execute_using_kmeans_args:
- rettype: void
- argument: character varying, double precision[], regproc, integer, double precision
- - internal_execute_using_kmeanspp_seeding_args:
- rettype: void
- argument: character varying, integer, regproc, double precision[]
- - internal_execute_using_silhouette_args:
- rettype: double precision
- argument: character varying, double precision[], regproc
- - lincrf:
- rettype: integer
- argument: character varying, character varying, character varying, character varying, character varying, integer, character varying, character varying, integer
- - lincrf:
- rettype: integer
- argument: character varying, character varying, character varying, character varying, character varying, integer, character varying, character varying
- - lsvm_predict:
- rettype: double precision
- argument: text, double precision[]
- - lsvm_predict_combo:
- rettype: SETOF schema_madlib.svm_model_pr
- argument: text, double precision[]
- - lsvm_sgd_update:
- rettype: schema_madlib.lsvm_sgd_model_rec
- argument: schema_madlib.lsvm_sgd_model_rec, double precision[], double precision, double precision, double precision
- - svm_cls_update:
- rettype: schema_madlib.svm_model_rec
- argument: schema_madlib.svm_model_rec, double precision[], double precision, text, double precision, double precision
- - svm_nd_update:
- rettype: schema_madlib.svm_model_rec
- argument: schema_madlib.svm_model_rec, double precision[], text, double precision, double precision
- - svm_predict:
- rettype: double precision
- argument: schema_madlib.svm_model_rec, double precision[], text
- - svm_predict:
- rettype: double precision
- argument: text, double precision[]
- - svm_predict_combo:
- rettype: SETOF schema_madlib.svm_model_pr
- argument: text, double precision[]
- - svm_predict_sub:
- rettype: double precision
- argument: integer, integer, double precision[], double precision[], double precision[], text
- - svm_reg_update:
- rettype: schema_madlib.svm_model_rec
- argument: schema_madlib.svm_model_rec, double precision[], double precision, text, double precision, double precision, double precision
- - utils_normalize_data:
- rettype: schema_madlib.__utils_scaled_data
- argument: double precision[], double precision[], double precision[]
- - vcrf_top1_label:
- rettype: integer[]
- argument: integer[], integer[], integer
- - vcrf_top1_view:
- rettype: text
- argument: text, text, text, text
# Changes to aggregates (UDA) including removal and modification
# Overloaded functions should be mentioned separately
uda:
- # ----------------- Changes from 1.4.1 to 1.5 ---------------
- - lsvm_sgd_agg:
- rettype: schema_madlib.lsvm_sgd_model_rec
- argument: double precision[], double precision, double precision, double precision
- - svm_cls_agg:
- rettype: schema_madlib.svm_model_rec
- argument: double precision[], double precision, text, double precision, double precision
- - svm_nd_agg:
- rettype: schema_madlib.svm_model_rec
- argument: double precision[], text, double precision, double precision
- - svm_reg_agg:
- rettype: schema_madlib.svm_model_rec
- argument: double precision[], double precision, text, double precision, double precision, double precision
+ # ----------------- Changes from 1.5 to 1.6 ---------------
+ - coxph_step:
+ rettype: double precision[]
+ argument: double precision[], double precision, boolean, double precision[]
+ - coxph_strata_step_inner:
+ rettype: double precision[]
+ argument: double precision[], double precision, boolean, double precision[]
+ - coxph_strata_step_outer:
+ rettype: double precision[]
+ argument: double precision[]
+ # return type change
+ - linregr:
+ rettype: schema_madlib.linregr_result
+ argument: double precision, double precision[]
+ # initcond change
+ - __mlogregr_irls_step:
+ rettype: double precision[]
+ argument: integer, integer, integer, double precision[], double precision[]
-# Cast operators (UDC) updated/added
+# Casts (UDC) updated/removed
udc:
- # ----------------- Changes from 1.4.1 to 1.5 ---------------
- bool2text:
- sourcetype: boolean
- targettype: text
+ # ----------------- Changes from 1.5 to 1.6 ---------------
+
+# Operators (UDO) removed/updated
+udo:
+ # ----------------- Changes from 1.5 to 1.6 ---------------
+ - '<':
+ leftarg: schema_madlib.svec
+ rightarg: schema_madlib.svec
+ - '<=':
+ leftarg: schema_madlib.svec
+ rightarg: schema_madlib.svec
+ - '<>':
+ leftarg: schema_madlib.svec
+ rightarg: schema_madlib.svec
+ - '==':
+ leftarg: schema_madlib.svec
+ rightarg: schema_madlib.svec
+ - '>=':
+ leftarg: schema_madlib.svec
+ rightarg: schema_madlib.svec
+ - '>':
+ leftarg: schema_madlib.svec
+ rightarg: schema_madlib.svec
+
+# Operator Classes (UDOC) removed/updated
+udoc:
+ # ----------------- Changes from 1.5 to 1.6 ---------------
+ # removed
+ - svec_l2_ops:
+ index: btree
Oops, something went wrong.

0 comments on commit d561cb8

Please sign in to comment.