I have tried using statement.setFetchSize(required number), but that works when I connect to Hive using JDBC and not when I try going through the spark thrift server. My query produces a large result set, causing a OOM on the thrift server.
Is there any setting which I can use for the same?