ajantha-bhat commented on a change in pull request #3111: [HOTFIX] SDV framework for presto cluster test suite
URL:
https://github.com/apache/carbondata/pull/3111#discussion_r252127301
##########
File path: integration/spark-common-cluster-test/src/test/scala/org/apache/spark/sql/common/util/QueryTest.scala
##########
@@ -220,4 +218,74 @@ object QueryTest {
return None
}
+
+ /**
+ * execute the query by establishing the jdbc connection
+ *
+ * @param query
+ * @return
+ */
+ def executeQuery(dbName: String, query: String): List[Map[String, Any]] = {
+ Try {
+ val conn: Connection = if (System.getProperty("presto.jdbc.url") != null) {
+ createJdbcConnection(dbName, System.getProperty("presto.jdbc.url"))
+ } else {
+ createJdbcConnection(dbName, "localhost:8086")
+ }
+ val statement = conn.createStatement()
+ val result: ResultSet = statement.executeQuery(query)
+ convertResultSetToList(result)
Review comment:
ok. done
----------------------------------------------------------------
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:
[hidden email]
With regards,
Apache Git Services