greenplum-db / PivotalR-archive

An convenient R tool for manipulating tables in PostgreSQL type databases and a wrapper of Apache MADlib.
https://pivotalsoftware.github.io/gp-r/
125 stars 53 forks source link

arraydb.to.arrayr function takes a parameter (n) and doesn't use it #44

Closed orhankislal closed 7 years ago

orhankislal commented 8 years ago

The arraydb.to.arrayr function from the utility-generic.R file has an erroneous parameter list or implementation. The parameter "n" is not used in the code at all. The document claims the following:

n: An integer, default is 1. If the input has ‘NA’ instead of a string as one element of a string array, how many ‘NA’'s should be returned so that a valid array can be returned. There should be as many ‘NA’ as the number of elements in other output rows without ‘NA’.

But this does not reflect the implementation.