Ninja: fix test for js return type under rhino engine

This commit is contained in:
Robert Stupp 2014-11-18 14:31:47 -06:00 committed by Tyler Hobbs
parent 2c3f9ba048
commit 2877bc235a
1 changed files with 2 additions and 2 deletions

View File

@ -698,9 +698,9 @@ public class UFTest extends CQLTester
// declared rtype = decimal , return type = int
execute("CREATE OR REPLACE FUNCTION "+KEYSPACE+".js(val double) RETURNS decimal LANGUAGE javascript\n" +
"AS '100;';");
"AS 'parseInt(\"100\");';");
assertRows(execute("SELECT key, val, js(val) FROM %s"),
row(1, 1d, BigDecimal.valueOf(100L)));
row(1, 1d, BigDecimal.valueOf(100d)));
execute("DROP FUNCTION "+KEYSPACE+".js(double)");
// declared rtype = decimal , return type = double