use of io.crate.sql.tree.Literal in project crate by crate.
the class SetAnalyzerTest method testObjectValue.
@Test
public void testObjectValue() throws Exception {
SetAnalyzedStatement analysis = analyze("SET GLOBAL PERSISTENT cluster.graceful_stop = {timeout='1h'}");
Multimap<String, Expression> map = LinkedListMultimap.create();
map.put("timeout", Literal.fromObject("1h"));
Literal expected = new ObjectLiteral(map);
assertThat(analysis.settings().get("cluster.graceful_stop").get(0), Matchers.<Expression>is(expected));
}
Aggregations