> On Sept. 7, 2015, 9:33 p.m., Xuefu Zhang wrote:
> > beeline/src/java/org/apache/hive/beeline/BeeLine.java, line 1094
> > <https://reviews.apache.org/r/38044/diff/1/?file=1062103#file1062103line1094>
> >
> >     I meant if it's possible to have multiple matches (cmdMap.size() > 1). 
> > I asked this because in line 1080-1084 we detect if there is a match when 
> > putting a match into the map and if so throw an error. Therefore, when we 
> > reach line 1091, cmdMap.size() should be less than or equal to 1. Did I 
> > miss anything?

I got your point. Line 1080-1084 handles the following case.
```java
      new ReflectiveCommandHandler(this, new String[] {"A","B"},
          new Completer[] {new TableNameCompletor(this)}),
      new ReflectiveCommandHandler(this, new String[] {"A"},
          new Completer[] {new TableNameCompletor(this)}),    
```    
If the line is "!A B;" then the error will be thrown. It's more like a internal 
check for programmer to avoid them use the same keywords for a command hander.
Remove Line 1080-1084 since it's not reasonable to have single line match the 
multiple ReflectiveCommandHandler.


- cheng


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


On Sept. 8, 2015, 9:45 a.m., cheng xu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38044/
> -----------------------------------------------------------
> 
> (Updated Sept. 8, 2015, 9:45 a.m.)
> 
> 
> Review request for hive and Xuefu Zhang.
> 
> 
> Bugs: HIVE-11640
>     https://issues.apache.org/jira/browse/HIVE-11640
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Fixed issues includes:
> * Support the case that one line contains multi-commands with ";" seperated
> * Fix the nullempty string for new cli mode
> * Resolve command doesn't support issue when executing files
> 
> 
> Diffs
> -----
> 
>   beeline/src/java/org/apache/hive/beeline/BeeLine.java 1e4759b 
>   beeline/src/java/org/apache/hive/beeline/Commands.java 5e5cfec 
>   beeline/src/test/org/apache/hive/beeline/cli/TestHiveCli.java e06d2ea 
> 
> Diff: https://reviews.apache.org/r/38044/diff/
> 
> 
> Testing
> -------
> 
> Local smoke test passed and unit test passed locally
> 
> 
> Thanks,
> 
> cheng xu
> 
>

Reply via email to