Issue 504 - add support for "sort" keyword in constraint

git-svn-id: http://google-refine.googlecode.com/svn/trunk@2403 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Tom Morris 2011-12-09 22:37:15 +00:00
parent ae771a7ccb
commit 4b582f366d

View File

@ -369,8 +369,19 @@ public class FreebaseDataExtensionJob {
name = "c:" + name; name = "c:" + name;
} }
} }
if (name.equals("sort")) {
String sortKey = (String) value;
if (sortKey.startsWith("-")) {
sortKey = sortKey.substring(1);
}
writer.key(sortKey);
writer.value(null);
writer.key(name); writer.key(name);
writer.value(value); writer.value(value);
} else {
writer.key(name);
writer.value(value);
}
} }
} }
if (!hasLimit) { if (!hasLimit) {