> On Dec. 8, 2015, 7:22 a.m., Puneet Gupta wrote:
> > lens-client/src/main/java/org/apache/lens/client/LensClient.java, line 61
> > <https://reviews.apache.org/r/41033/diff/1/?file=1155058#file1155058line61>
> >
> >     Some methods are not updating this variable. 
> >     
> >     Example, if we execute  query1 followed by query2 and then call get 
> > status on query1, what will lastLesnStatement point to ? 
> >     
> >     Should get status / get details /etc also update the last statement ?

The statement variable is once set and never updated. `statement.query` is the 
one that's updated on each `statement.getQuery` call. I checked the methods and 
all the methods of `LensQueryCommand` which are changed to pick default value 
are leading to `statement.getQuery`, hence updating the `statement.query` 
variable for next use. So any of the methods can set the `last executed query` 
for next use. 

Another place where `statement.query` is being updated is in `execute` call, 
which again, suits us well. 

So the description I've put: `"If not provided, takes last query handle 
interacted with."`, is precise.


- Rajat


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41033/#review109248
-----------------------------------------------------------


On Dec. 7, 2015, 4:43 p.m., Rajat Khandelwal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41033/
> -----------------------------------------------------------
> 
> (Updated Dec. 7, 2015, 4:43 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-836
>     https://issues.apache.org/jira/browse/LENS-836
> 
> 
> Repository: lens
> 
> 
> Description
> -------
> 
> 
> Diffs
> -----
> 
>   lens-cli/src/main/java/org/apache/lens/cli/commands/LensQueryCommands.java 
> fe9b84dd5574b922c6b8a16a1b8c5b7518aa400a 
>   lens-client/src/main/java/org/apache/lens/client/LensClient.java 
> 5fd04c4591264ac2e5082f1a602877771b15fac9 
> 
> Diff: https://reviews.apache.org/r/41033/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Rajat Khandelwal
> 
>

Reply via email to