diff --git a/gpcontrib/gp_sparse_vector/SparseData.c b/gpcontrib/gp_sparse_vector/SparseData.c index 8f68fce61d06f0b41402dffba5c415a497e5ec96..d973446d4b793ca9fc2fc1f62f1a60b083f3cee5 100644 --- a/gpcontrib/gp_sparse_vector/SparseData.c +++ b/gpcontrib/gp_sparse_vector/SparseData.c @@ -236,8 +236,9 @@ double *sdata_to_float8arr(SparseData sdata) { if (sdata->type_of_data != FLOAT8OID) { - ereport(ERROR,(errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("data type of SparseData is not FLOAT64"))); + ereport(ERROR, + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("data type of SparseData is not FLOAT64"))); } array = (double *) palloc(sizeof(double) * sdata->total_value_count); diff --git a/gpcontrib/gp_sparse_vector/SparseData.h b/gpcontrib/gp_sparse_vector/SparseData.h index dbfe9fefcb6e78c3897e105e827a0ce8e0d7fa24..bd3f68b87cb587d1e55e728d18d05840efdbe3c7 100644 --- a/gpcontrib/gp_sparse_vector/SparseData.h +++ b/gpcontrib/gp_sparse_vector/SparseData.h @@ -506,8 +506,8 @@ check_sdata_dimensions(SparseData left, SparseData right) if (left->total_value_count != right->total_value_count) { ereport(ERROR, - (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Operation undefined when dimension of left and right vectors are not the same"))); + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("operation undefined when dimension of left and right vectors are not the same"))); } } @@ -718,8 +718,8 @@ static inline SparseData op_sdata_by_sdata(int operation,SparseData left, if ((operation > 3)|| (operation < 0)) ereport(ERROR, - (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Operation not in range 0-3"))); + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("operation not in range 0-3"))); while (1) { diff --git a/gpcontrib/gp_sparse_vector/gp_sfv.c b/gpcontrib/gp_sparse_vector/gp_sfv.c index c4670a4829e7fa522d5d5829b079f35a124d75ce..768531c3f7181bc5ad0bad79af5a570d03135abe 100644 --- a/gpcontrib/gp_sparse_vector/gp_sfv.c +++ b/gpcontrib/gp_sparse_vector/gp_sfv.c @@ -152,8 +152,8 @@ gp_extract_feature_histogram(PG_FUNCTION_ARGS) /* End of UDF wrapper =================================================== */ #ifdef VERBOSE - elog(NOTICE,"Number of text items in the feature array is: %d\n",num_features); - elog(NOTICE,"Number of text items in the document array is: %d\n",num_words); + elog(NOTICE,"Number of text items in the feature array is: %d",num_features); + elog(NOTICE,"Number of text items in the document array is: %d",num_words); #endif returnval = classify_document(features,num_features,document,num_words,gp_isnew_query()); @@ -198,7 +198,7 @@ classify_document(char **features, int num_features, char **document, int num_wo if (allocate) { int *ordinals; #ifdef VERBOSE - elog(NOTICE,"Classify_document allocating..., Number of features = %d\n",num_features); + elog(NOTICE,"Classify_document allocating..., Number of features = %d",num_features); #endif /* * Calling hdestroy() isn't guaranteed to free any memory allocated @@ -269,7 +269,7 @@ classify_document(char **features, int num_features, char **document, int num_wo histogram[*((int *)found_item->data)]++; //Increment the count at the appropriate ordinal } else { #ifdef VERBOSE - elog(NOTICE,"Item not found in feature list %s\n",(char *)item.key); + elog(NOTICE,"Item not found in feature list %s",(char *)item.key); #endif continue; } @@ -304,7 +304,7 @@ get_text_array_contents(ArrayType *array, int *numitems) if (ARR_ELEMTYPE(array) != TEXTOID) { *numitems = 0; - elog(WARNING,"attempt to use a non-text[][] variable with a function that uses text[][] argumenst.\n"); + elog(WARNING,"attempt to use a non-text[][] variable with a function that uses text[][] arguments"); return(NULL); } diff --git a/gpcontrib/gp_sparse_vector/operators.c b/gpcontrib/gp_sparse_vector/operators.c index 05fd7bf6e0ab64e2be05acecf9f448699afb808e..8f428b0c5f130c54c7e76dbed9f456d7a0327d3c 100644 --- a/gpcontrib/gp_sparse_vector/operators.c +++ b/gpcontrib/gp_sparse_vector/operators.c @@ -610,12 +610,10 @@ void check_dimension(SvecType *svec1, SvecType *svec2, char *msg) { if ((!IS_SCALAR(svec1)) && (!IS_SCALAR(svec2)) && (svec1->dimension != svec2->dimension)) { -// elog(NOTICE,"svec1: %s",svec_out_internal(svec1)); -// elog(NOTICE,"svec2: %s",svec_out_internal(svec2)); ereport(ERROR, - (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("%s: array dimension of inputs are not the same: dim1=%d, dim2=%d\n", - msg, svec1->dimension, svec2->dimension))); + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("%s: array dimension of inputs are not the same: dim1=%d, dim2=%d\n", + msg, svec1->dimension, svec2->dimension))); } } @@ -633,14 +631,12 @@ svec_cast_float8arr(PG_FUNCTION_ARGS) { if (ARR_NDIM(A_PG) != 1) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("svec_cast_float8arr only defined over 1 dimensional arrays")) - ); + errmsg("svec_cast_float8arr only defined over 1 dimensional arrays"))); if (ARR_NULLBITMAP(A_PG)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("svec_cast_float8arr does not allow null bitmaps on arrays")) - ); + errmsg("svec_cast_float8arr does not allow null bitmaps on arrays"))); /* Extract array */ @@ -1251,8 +1247,6 @@ partition_select (char **lists, size_t nlists, size_t *widths, (const char **)lists,nlists,widths); int nextRealIndex = realIndexCalc(MIN(maxlen,pivotNewIndex+1), (const char **)lists,nlists,widths); -// elog(NOTICE,"k,realIndex,nextRealIndex,pni=%d,%d,%d,%d",k,realIndex,nextRealIndex, -// pivotNewIndex); if ((realIndex <= k) && (k < nextRealIndex )) { break; diff --git a/gpcontrib/gp_sparse_vector/sparse_vector.c b/gpcontrib/gp_sparse_vector/sparse_vector.c index 27091bb1e3a282815e080ec5c9bc2d590e9ad9f2..f111e54cde5dc1b287760220d6246375de3bb54b 100644 --- a/gpcontrib/gp_sparse_vector/sparse_vector.c +++ b/gpcontrib/gp_sparse_vector/sparse_vector.c @@ -235,7 +235,7 @@ svec_in(PG_FUNCTION_ARGS) pgarray_vals = DatumGetArrayTypeP(OidFunctionCall3(F_ARRAY_IN,CStringGetDatum(values), ObjectIdGetDatum(FLOAT8OID),Int32GetDatum(-1))); - /* Make an empty StringInfo becase we have the data array already */ + /* Make an empty StringInfo because we have the data array already */ vals = (double *)ARR_DATA_PTR(pgarray_vals); num_values = *(ARR_DIMS(pgarray_vals));