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

    https://github.com/apache/flink/pull/426#discussion_r27018151
  
    --- Diff: 
flink-scala/src/main/java/org/apache/flink/api/scala/operators/ScalaCsvInputFormat.java
 ---
    @@ -98,98 +123,66 @@ public void setFields(int[] sourceFieldIndices, 
Class<?>[] fieldTypes) {
                setFieldsGeneric(sourceFieldIndices, fieldTypes);
        }
     
    -   public byte[] getCommentPrefix() {
    -           return commentPrefix;
    -   }
    -
    -   public void setCommentPrefix(byte[] commentPrefix) {
    -           this.commentPrefix = commentPrefix;
    -   }
    -
    -   public void setCommentPrefix(char commentPrefix) {
    -           setCommentPrefix(String.valueOf(commentPrefix));
    -   }
    +   public void setFields(boolean[] sourceFieldMask, Class<?>[] fieldTypes) 
{
    +           Preconditions.checkNotNull(sourceFieldMask);
    +           Preconditions.checkNotNull(fieldTypes);
     
    -   public void setCommentPrefix(String commentPrefix) {
    -           setCommentPrefix(commentPrefix, Charsets.UTF_8);
    +           setFieldsGeneric(sourceFieldMask, fieldTypes);
        }
     
    -   public void setCommentPrefix(String commentPrefix, String charsetName) 
throws IllegalCharsetNameException, UnsupportedCharsetException {
    -           if (charsetName == null) {
    -                   throw new IllegalArgumentException("Charset name must 
not be null");
    -           }
    -
    -           if (commentPrefix != null) {
    -                   Charset charset = Charset.forName(charsetName);
    -                   setCommentPrefix(commentPrefix, charset);
    -           } else {
    -                   this.commentPrefix = null;
    -           }
    +   public Class<?>[] getFieldTypes() {
    +           return super.getGenericFieldTypes();
        }
     
    -   public void setCommentPrefix(String commentPrefix, Charset charset) {
    -           if (charset == null) {
    -                   throw new IllegalArgumentException("Charset must not be 
null");
    -           }
    -           if (commentPrefix != null) {
    -                   this.commentPrefix = commentPrefix.getBytes(charset);
    -           } else {
    -                   this.commentPrefix = null;
    -           }
    -   }
    -
    -   @Override
    -   public void close() throws IOException {
    --- End diff --
    
    Did the `close()` method got lost in the refactoring?


---
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