Github user jihoonson commented on the pull request:

    https://github.com/apache/tajo/pull/503#issuecomment-101492752
  
    Thanks @charsyam. The above bug looks fixed.
    Additionally, I have three comments as follows.
    * Please follow our convention for indent.
    * TestInsertQuery is a class to test Tajo's insert function rather than 
select result. I think that TestStorages looks a good place to test the 
character type for several types of storage.
    * Please consider the following case. I think that 
```ValueTooLongForTypeCharactersException``` should be thrown instead of 
```java.lang.ArrayIndexOutOfBoundsException```.
    
    ```
    default> \dfs -cat hdfs://localhost:7020/test
    cat: `hdfs://localhost:7020/test': Is a directory
    default> \dfs -cat hdfs://localhost:7020/test/test.csv
    1|a|1
    2|bb|2
    3|ccc|3
    4|dddd|4
    5|eeeee|5
    
    default> create external table test ( id int, name char(3), score int ) 
using text with ('text.delimiter'='|') location 'hdfs://localhost:7020/test';
    OK
    
    default> \d test
    
    table name: default.test
    table path: hdfs://localhost:7020/test
    store type: text
    number of rows: unknown
    volume: 40 B
    Options: 
        'text.delimiter'='|'
    
    schema: 
    id  INT4
    name        CHAR(3)
    score       INT4
    
    default> select * from test;
    id,  name,  score
    -------------------------------
    ERROR: java.lang.ArrayIndexOutOfBoundsException
    java.sql.SQLException: java.lang.ArrayIndexOutOfBoundsException
        at 
org.apache.tajo.jdbc.TajoResultSetBase.next(TajoResultSetBase.java:786)
        at 
org.apache.tajo.cli.tsql.DefaultTajoCliOutputFormatter.printResult(DefaultTajoCliOutputFormatter.java:105)
        at 
org.apache.tajo.cli.tsql.TajoCli.localQueryCompleted(TajoCli.java:558)
        at org.apache.tajo.cli.tsql.TajoCli.executeQuery(TajoCli.java:532)
        at 
org.apache.tajo.cli.tsql.TajoCli.executeParsedResults(TajoCli.java:447)
        at org.apache.tajo.cli.tsql.TajoCli.runShell(TajoCli.java:419)
        at org.apache.tajo.cli.tsql.TajoCli.main(TajoCli.java:692)
    Caused by: java.io.IOException: java.lang.ArrayIndexOutOfBoundsException
        at org.apache.tajo.jdbc.FetchResultSet.nextTuple(FetchResultSet.java:87)
        at 
org.apache.tajo.jdbc.TajoResultSetBase.next(TajoResultSetBase.java:780)
        ... 6 more
    Caused by: com.google.protobuf.ServiceException: 
java.lang.ArrayIndexOutOfBoundsException
        at 
org.apache.tajo.client.QueryClientImpl.fetchNextQueryResult(QueryClientImpl.java:370)
        at 
org.apache.tajo.client.TajoClientImpl.fetchNextQueryResult(TajoClientImpl.java:134)
        at org.apache.tajo.jdbc.FetchResultSet.nextTuple(FetchResultSet.java:69)
        ... 7 more
    ```
    
    ---
    
    
    
    
    
    
    
    Comments from the [review on 
Reviewable.io](https://reviewable.io:443/reviews/apache/tajo/503)
    <!-- Sent from Reviewable.io -->



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to