hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sansanichfb <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: HAWQ-615. Handle incomptible tables w...
Date Mon, 04 Apr 2016 22:54:52 GMT
Github user sansanichfb commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/551#discussion_r58462813
  
    --- Diff: pxf/pxf-hive/src/test/java/org/apache/hawq/pxf/plugins/hive/HiveMetadataFetcherTest.java
---
    @@ -154,6 +155,115 @@ public void getTableMetadata() throws Exception {
             assertEquals("int4", field.getType());
         }
     
    +    @Test
    +    public void getTableMetadataWithMultipleTables() throws Exception {
    +        prepareConstruction();
    +
    +        fetcher = new HiveMetadataFetcher(inputData);
    +
    +        String tablepattern = "*";
    +        String dbpattern = "*";
    +        String dbname = "default";
    +        String tablenamebase = "regulartable";
    +        String pattern = dbpattern + "." + tablepattern;
    +
    +        List<String> dbNames = new ArrayList<String>(Arrays.asList(dbname));
    +        List<String> tableNames = new ArrayList<String>();
    +
    +        // Prepare for tables
    +        List<FieldSchema> fields = new ArrayList<FieldSchema>();
    +        fields.add(new FieldSchema("field1", "string", null));
    +        fields.add(new FieldSchema("field2", "int", null));
    +        StorageDescriptor sd = new StorageDescriptor();
    +        sd.setCols(fields);
    +
    +        // Mock hive tables returned from hive client
    +        for(int index=1;index<=2;index++) {
    --- End diff --
    
    Add comment why starting from 1 not from 0?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message