Github user jingyimei commented on a diff in the pull request:
https://github.com/apache/madlib/pull/220#discussion_r158424408
--- Diff: src/ports/postgres/modules/summary/Summarizer.py_in ---
@@ -199,6 +200,22 @@ class Summarizer:
args['max_columns'] = ','.join([minmax_type('max', c) for c in
cols])
args['ntile_columns'] = "array_to_string(array[NULL], ',')"
+
+ args['positive_columns'] = ','.join(["sum(case when {0} > 0 \
+ then 1 else 0
end)".format(c['attname'])
+ if c['typname'] in numeric_types
+ else 'NULL' for c in cols])
+
+ args["negative_columns"] = ','.join(["sum(case when {0} < 0 \
+ then 1 else 0
end)".format(c['attname'])
+ if c['typname'] in numeric_types
+ else 'NULL' for c in cols])
+
+ args["zero_columns"] = ','.join(["sum(case when {0} = 0 \
--- End diff --
If we are using float, maybe this will be more accurate.
---