From 5808dfecebc4131fa8bb84cb2f8c29c2c099c1cc Mon Sep 17 00:00:00 2001 From: AEscobarCruz Date: Mon, 26 Oct 2015 09:32:20 -0700 Subject: [PATCH] added default control field type and autop-generated value:true called columnStatistics. The new default ensures that we calculate cardinality on ingress. changed location where computeStatistics is set, since no need to set it if we are deleting. --- .../com/socrata/datasync/config/controlfile/ControlFile.java | 3 ++- .../socrata/datasync/config/controlfile/FileTypeControl.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/socrata/datasync/config/controlfile/ControlFile.java b/src/main/java/com/socrata/datasync/config/controlfile/ControlFile.java index ac5b8b26..0510464e 100644 --- a/src/main/java/com/socrata/datasync/config/controlfile/ControlFile.java +++ b/src/main/java/com/socrata/datasync/config/controlfile/ControlFile.java @@ -104,7 +104,8 @@ public static ControlFile generateControlFile(final String fileToPublish, .useSocrataGeocoding(useSocrataGeocoding) .trimWhitespace(true) .trimServerWhitespace(true) - .overrides(new HashMap()); + .overrides(new HashMap()) + .columnStatistics(true); } if (isCsv) { diff --git a/src/main/java/com/socrata/datasync/config/controlfile/FileTypeControl.java b/src/main/java/com/socrata/datasync/config/controlfile/FileTypeControl.java index 38330d98..6970a36f 100644 --- a/src/main/java/com/socrata/datasync/config/controlfile/FileTypeControl.java +++ b/src/main/java/com/socrata/datasync/config/controlfile/FileTypeControl.java @@ -40,6 +40,7 @@ public class FileTypeControl { public Map syntheticPoints; public Boolean useSocrataGeocoding; public String action; + public Boolean columnStatistics; public FileTypeControl() {} @@ -142,6 +143,7 @@ public Set lookupTimestampFormatting() { public FileTypeControl hasHeaderRow(boolean h) { hasHeaderRow = h; return this;} public FileTypeControl action(String a) { action = a; return this;} -} + + public FileTypeControl columnStatistics(boolean u) { columnStatistics = u; return this; }