Skip to content

Commit

Permalink
Merge pull request #23 from aliyun/feature/fix_ots_seq
Browse files Browse the repository at this point in the history
fix: handle empty playtime field in getting sequence features
  • Loading branch information
bruceding authored Jul 11, 2024
2 parents 5068426 + f14441e commit 60a437e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dao/feature_view_tablestore_dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ func (d *FeatureViewTableStoreDao) GetUserSequenceFeature(keys []interface{}, us
rangeRowQueryCriteria.StartPrimaryKey = startPK
rangeRowQueryCriteria.EndPrimaryKey = endPK
rangeRowQueryCriteria.Direction = tablestore.FORWARD
rangeRowQueryCriteria.ColumnsToGet = []string{sequenceConfig.ItemIdField, sequenceConfig.EventField, sequenceConfig.PlayTimeField, sequenceConfig.TimestampField}
if sequenceConfig.PlayTimeField == "" {
rangeRowQueryCriteria.ColumnsToGet = []string{sequenceConfig.ItemIdField, sequenceConfig.EventField, sequenceConfig.TimestampField}
} else {
rangeRowQueryCriteria.ColumnsToGet = []string{sequenceConfig.ItemIdField, sequenceConfig.EventField, sequenceConfig.PlayTimeField, sequenceConfig.TimestampField}
}
timeRange := new(tablestore.TimeRange)
timeRange.End = currTime * 1000
timeRange.Start = (currTime - 86400*5) * 1000
Expand Down

0 comments on commit 60a437e

Please sign in to comment.