Skip to content

Commit

Permalink
fixed bug where grouped data transform didn't work if group-by column
Browse files Browse the repository at this point in the history
was numeric
  • Loading branch information
adufilie committed Aug 6, 2015
1 parent 8ed841c commit 7b52ad7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions WeaveData/src/weave/data/Transforms/GroupedDataTransform.as
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,14 @@ package weave.data.Transforms
var stringLookup:Object = {};
var keyType:String = groupKeyType.value || groupByColumn.getMetadata(ColumnMetadata.DATA_TYPE);
for each (var key:IQualifiedKey in groupByColumn.keys)
{
var localName:String = groupByColumn.getValueFromKey(key, String);
{
var localName:String;
// if the foreign key column is numeric, avoid using the formatted strings as keys
if (groupByColumn.getMetadata(ColumnMetadata.DATA_TYPE) == DataType.NUMBER)
localName = groupByColumn.getValueFromKey(key, Number);
else
localName = groupByColumn.getValueFromKey(key, String);

if (!stringLookup[localName])
{
stringLookup[localName] = true;
Expand Down

0 comments on commit 7b52ad7

Please sign in to comment.