Github user ericl commented on a diff in the pull request:
https://github.com/apache/spark/pull/14218#discussion_r73807474
--- Diff:
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala
---
@@ -91,6 +93,57 @@ class HiveThriftBinaryServerSuite extends
HiveThriftJdbcTest {
}
}
+ test("SPARK-16563 ThriftCLIService FetchResults repeat fetching result")
{
+ withCLIServiceClient { client =>
+ val user = System.getProperty("user.name")
+ val sessionHandle = client.openSession(user, "")
+
+ withJdbcStatement { statement =>
+ val queries = Seq(
+ "SET spark.sql.shuffle.partitions=3",
+ "DROP TABLE IF EXISTS test",
+ "CREATE TABLE test_16563(key INT, val STRING)",
+ s"LOAD DATA LOCAL INPATH '${TestData.smallKv}' OVERWRITE INTO
TABLE test_16563",
+ "CACHE TABLE test_16563")
+
+ queries.foreach(statement.execute)
+ val confOverlay = new java.util.HashMap[java.lang.String,
java.lang.String]
+ val operationHandle = client.executeStatement(
+ sessionHandle,
+ "SELECT * FROM test_16563",
+ confOverlay)
+
+ assertResult(0, "Repeat fetching result from next row") {
+
+ // Fetch first time
+ val rows = client.fetchResults(operationHandle)
--- End diff --
Can you assert this also returns 5?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]