Github user Quikling commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/1261#discussion_r124920725 --- 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 { + /* break up the row into fields */ + List<OneField> output = new LinkedList<OneField>(); + String[] fields = ((String) row.getData()).split(","); --- End diff -- row can never be null here as the ReadBridge specifically check for null. None of the other resolvers have this check as well. Will add validation for other things you mentioned
--- 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. ---