RajashekharChoukimath commented on a change in pull request #35: [LENS-1546] 
Prepared Query should come from DB after 10 minutes.
URL: https://github.com/apache/lens/pull/35#discussion_r311986618
 
 

 ##########
 File path: 
lens-server/src/main/java/org/apache/lens/server/query/LensServerDAO.java
 ##########
 @@ -868,4 +868,18 @@ public void insertPreparedQuery(PreparedQueryContext 
preparedQueryContext) throw
       DbUtils.closeQuietly(conn);
     }
   }
+
+  public PreparedLensQuery getPreparedQuery(String handle) {
+    ResultSetHandler<PreparedLensQuery> rsh = new 
BeanHandler<>(PreparedLensQuery.class,
+        new BasicRowProcessor(new FinishedLensQueryBeanProcessor()));
+    String sql = "select * from prepared_queries where handle=?";
+    QueryRunner runner = new QueryRunner(ds);
+    try {
+      PreparedLensQuery preparedLensQuery = runner.query(sql, rsh, handle);
+      return preparedLensQuery;
+    } catch (SQLException e) {
+      log.error("SQL exception while executing query.", e);
+    }
+    return null;
 
 Review comment:
   fixed it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Reply via email to