vvysotskyi commented on a change in pull request #1549: DRILL-6834: Introduce
option to disable result set on CTAS, create vi…
URL: https://github.com/apache/drill/pull/1549#discussion_r236069097
##########
File path:
exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
##########
@@ -403,4 +407,147 @@ public void testConvertFromInEmptyInputSql() throws
Exception {
.sql("SELECT CONVERT_FROM(columns[1], 'JSON') as col1 from
cp.`empty.csv`")
.returns("");
}
+
+ @Test
+ public void testResultSetIsNotReturnedSet() throws Exception {
+ Statement s = null;
+ try (Connection conn = connect()) {
+ s = conn.createStatement();
+ boolean hasResult = s.execute(String.format("alter session set `%s` =
false", ExecConstants.RETURN_RESULT_SET_FOR_DDL));
+
+ assertFalse("SET query should not return result set", hasResult);
+ assertNull("No result", s.getResultSet());
+ assertNotEquals("Update count should be >= 0", -1, s.getUpdateCount());
Review comment:
Not sure that we should also verify `updateCount` value. It is required to
check that there is no result set.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services