[ 
https://issues.apache.org/jira/browse/HBASE-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102840#comment-13102840
 ] 

Todd Lipcon commented on HBASE-4361:
------------------------------------

bq.  I don't see how I would parse the filterString if the entire filterString 
is enclosed in double quotes and some of the arguments are enclosed in double 
quotes too?

Yep, that was my mistake :) But the shell didn't do a good job of showing me my 
error. Dynamic typing FTL :) My patch here at least changes the shell to say: 
"Invalid filter: false" instead of the strange exception I got before.

bq. Better error messages? - I can try and improve this. Are there any specific 
points I can address to improve what is already there

In general, all of the exceptions thrown should tell you which text caused them 
to throw. For example, "Invalid quoted string" is useless, but "Invalid quoted 
string: foo" is useful. "Mismatched parenthesis" should include the offset in 
the string at which it was found. "Incorrect Filter String" if the stack is 
non-empty at the end of parseFilterString should probably say something like 
"Incorrect filter string: unmatched LPAREN at offset <n>". Pretty much all of 
the places where IllegalArgumentException are thrown in ParseFilter could be 
improved to have (a) the offset at which the error occurred, and (b) details 
about what was incorrect.


All of the above aside, it's a nice feature once you get it to work :) Thanks 
for the hard work implementing it.

> Certain filter expressions fail in the shell
> --------------------------------------------
>
>                 Key: HBASE-4361
>                 URL: https://issues.apache.org/jira/browse/HBASE-4361
>             Project: HBase
>          Issue Type: Bug
>          Components: filters, shell
>    Affects Versions: 0.92.0
>            Reporter: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.92.0
>
>         Attachments: Filter Language.docx, small-improvements.txt
>
>
> Running the following in the shell hangs and then fails:
> {noformat}
> scan 't1', { FILTER => "SingleColumnValueFilter(">", '1', 'f1', 'col_a')" }
> {noformat}
> The error seems to be: org.jruby.exceptions.RaiseException: (NoMethodError) 
> undefined method `write' for true:TrueClass

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to