Fixes dim time population select clause.

- Dim time fact column population had a bug where the time id was being rounded
  instead of being floored. This fixes it.
pull/1/head
Abhinav Sarkar 2016-01-19 01:05:20 +05:30
parent aede5d6fc6
commit 3b7603b311
1 changed files with 2 additions and 2 deletions

View File

@ -125,8 +125,8 @@ factTablePopulateSQL popMode fact = do
timeUnitColumnInsertSQL cName =
let colName = timeUnitColumnName dimIdColName cName settingTimeUnit
in ( colName
, "extract(epoch from " <> fullColumnName fTableName cName <> ")::bigint/"
<> Text.pack (show $ timeUnitToSeconds settingTimeUnit)
, "floor(extract(epoch from " <> fullColumnName fTableName cName <> ")/"
<> Text.pack (show $ timeUnitToSeconds settingTimeUnit) <> ")::bigint"
, True
)
dimIdColumnInsertSQL cName =