Remove unneeded variable
This commit is contained in:
parent
09ad550de3
commit
ef43623f77
@ -549,7 +549,6 @@ DECLARE
|
|||||||
has_counter_column BOOLEAN;
|
has_counter_column BOOLEAN;
|
||||||
feature_count TEXT;
|
feature_count TEXT;
|
||||||
total_feature_count TEXT;
|
total_feature_count TEXT;
|
||||||
unlimited_text BOOLEAN;
|
|
||||||
BEGIN
|
BEGIN
|
||||||
IF table_alias <> '' THEN
|
IF table_alias <> '' THEN
|
||||||
qualified_column := Format('%I.%I', table_alias, column_name);
|
qualified_column := Format('%I.%I', table_alias, column_name);
|
||||||
@ -578,8 +577,7 @@ BEGIN
|
|||||||
RETURN Format('SUM(%s*%s)/%s::' || column_type, qualified_column, feature_count, total_feature_count);
|
RETURN Format('SUM(%s*%s)/%s::' || column_type, qualified_column, feature_count, total_feature_count);
|
||||||
END IF;
|
END IF;
|
||||||
WHEN 'text', 'character varying', 'character' THEN
|
WHEN 'text', 'character varying', 'character' THEN
|
||||||
SELECT _cdb_unlimited_text_column(reloid, column_name) INTO unlimited_text;
|
IF _cdb_unlimited_text_column(reloid, column_name) THEN
|
||||||
IF unlimited_text THEN
|
|
||||||
-- TODO: this should not be applied to columns containing largish text;
|
-- TODO: this should not be applied to columns containing largish text;
|
||||||
-- it is intended only to short names/identifiers
|
-- it is intended only to short names/identifiers
|
||||||
RETURN 'CASE WHEN count(distinct ' || qualified_column || ') = 1 THEN MIN(' || qualified_column || ') WHEN ' || total_feature_count || ' < 5 THEN string_agg(distinct ' || qualified_column || ','' / '') ELSE ''*'' END::' || column_type;
|
RETURN 'CASE WHEN count(distinct ' || qualified_column || ') = 1 THEN MIN(' || qualified_column || ') WHEN ' || total_feature_count || ' < 5 THEN string_agg(distinct ' || qualified_column || ','' / '') ELSE ''*'' END::' || column_type;
|
||||||
|
Loading…
Reference in New Issue
Block a user