Github user sansanichfb commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1261#discussion_r124894489
  
    --- Diff: 
pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DummyResolver.java 
---
    @@ -0,0 +1,29 @@
    +package org.apache.hawq.pxf.api.examples;
    +
    +import org.apache.hawq.pxf.api.OneField;
    +import org.apache.hawq.pxf.api.OneRow;
    +import org.apache.hawq.pxf.api.ReadResolver;
    +import org.apache.hawq.pxf.api.utilities.InputData;
    +import org.apache.hawq.pxf.api.utilities.Plugin;
    +import java.util.LinkedList;
    +import java.util.List;
    +import static org.apache.hawq.pxf.api.io.DataType.INTEGER;
    +import static org.apache.hawq.pxf.api.io.DataType.VARCHAR;
    +
    +public class DummyResolver extends Plugin implements ReadResolver {
    +    private int rowNumber;
    +    public DummyResolver(InputData metaData) {
    +        super(metaData);
    +        rowNumber = 0;
    +    }
    +    @Override
    +    public List<OneField> getFields(OneRow row) throws Exception {
    --- End diff --
    
    This resolver returns static schema with two columns, let's return dynamic 
schema, which comes as a BridgeApi parameters. Please refer to 
InputData#getColumn(int index) and InputData#getColumns() method to get 
requested column's metadata.


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

Reply via email to