use of com.datastax.oss.dsbulk.mapping.FunctionCall in project dsbulk by datastax.
the class QueryInspectorTest method should_detect_function_select.
@Test
void should_detect_function_select() {
QueryInspector inspector = new QueryInspector("SELECT myFunction(col1) as f1, \"MyFunction\"(\"My Col 2\") FROM ks.table1");
CQLWord name1 = CQLWord.fromInternal("myfunction");
CQLWord name2 = CQLWord.fromInternal("MyFunction");
FunctionCall f1 = new FunctionCall(null, name1, COL_1);
FunctionCall f2 = new FunctionCall(null, name2, MY_COL_2);
assertThat(inspector.getResultSetVariables()).hasSize(2).containsKeys(f1, f2).containsValues(CQLWord.fromInternal("f1"), f2);
}
Aggregations