[ 
https://issues.apache.org/jira/browse/FLINK-4248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15507023#comment-15507023
 ] 

ASF GitHub Bot commented on FLINK-4248:
---------------------------------------

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

    https://github.com/apache/flink/pull/2303#discussion_r79652535
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/types/parser/SqlDateParser.java ---
    @@ -0,0 +1,134 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +
    +package org.apache.flink.types.parser;
    +
    +import java.sql.Date;
    +import org.apache.flink.annotation.PublicEvolving;
    +
    +/**
    + * Parses a text field into a {@link java.sql.Date}.
    + */
    +@PublicEvolving
    +public class SqlDateParser extends FieldParser<Date> {
    +
    +   private static final Date DATE_INSTANCE = new Date(0L);
    +
    +   private Date result;
    +
    +   @Override
    +   public int parseField(byte[] bytes, int startPos, int limit, byte[] 
delimiter, Date reusable) {
    +           int i = startPos;
    +
    +           final int delimLimit = limit - delimiter.length + 1;
    --- End diff --
    
    I will try to generalize it a bit.


> CsvTableSource does not support reading SqlTimeTypeInfo types
> -------------------------------------------------------------
>
>                 Key: FLINK-4248
>                 URL: https://issues.apache.org/jira/browse/FLINK-4248
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>    Affects Versions: 1.1.0
>            Reporter: Till Rohrmann
>            Assignee: Timo Walther
>
> The Table API's {{CsvTableSource}} does not support to read all Table API 
> supported data types. For example, it is not possible to read 
> {{SqlTimeTypeInfo}} types via the {{CsvTableSource}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to