[jira] [Commented] (FLINK-10127) Add TypeInformation and serializers for JDK8 Instant

2018-08-21 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-10127:


asfgit closed pull request #6549: [FLINK-10127] Add Instant to basic types
URL: https://github.com/apache/flink/pull/6549
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/flink-core/src/main/java/org/apache/flink/api/common/typeinfo/BasicTypeInfo.java
 
b/flink-core/src/main/java/org/apache/flink/api/common/typeinfo/BasicTypeInfo.java
index f19865ea0f0..00c4c311fc9 100644
--- 
a/flink-core/src/main/java/org/apache/flink/api/common/typeinfo/BasicTypeInfo.java
+++ 
b/flink-core/src/main/java/org/apache/flink/api/common/typeinfo/BasicTypeInfo.java
@@ -40,6 +40,8 @@
 import org.apache.flink.api.common.typeutils.base.DoubleSerializer;
 import org.apache.flink.api.common.typeutils.base.FloatComparator;
 import org.apache.flink.api.common.typeutils.base.FloatSerializer;
+import org.apache.flink.api.common.typeutils.base.InstantComparator;
+import org.apache.flink.api.common.typeutils.base.InstantSerializer;
 import org.apache.flink.api.common.typeutils.base.IntComparator;
 import org.apache.flink.api.common.typeutils.base.IntSerializer;
 import org.apache.flink.api.common.typeutils.base.LongComparator;
@@ -53,6 +55,7 @@
 import java.lang.reflect.Constructor;
 import java.math.BigDecimal;
 import java.math.BigInteger;
+import java.time.Instant;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.HashMap;
@@ -83,6 +86,8 @@
public static final BasicTypeInfo VOID_TYPE_INFO = new 
BasicTypeInfo<>(Void.class, new Class[]{}, VoidSerializer.INSTANCE, null);
public static final BasicTypeInfo BIG_INT_TYPE_INFO = new 
BasicTypeInfo<>(BigInteger.class, new Class[]{}, BigIntSerializer.INSTANCE, 
BigIntComparator.class);
public static final BasicTypeInfo BIG_DEC_TYPE_INFO = new 
BasicTypeInfo<>(BigDecimal.class, new Class[]{}, BigDecSerializer.INSTANCE, 
BigDecComparator.class);
+   public static final BasicTypeInfo INSTANT_TYPE_INFO = new 
BasicTypeInfo<>(Instant.class, new Class[]{}, InstantSerializer.INSTANCE, 
InstantComparator.class);
+
 
// 

 
@@ -250,5 +255,6 @@ public String toString() {
TYPES.put(void.class, VOID_TYPE_INFO);
TYPES.put(BigInteger.class, BIG_INT_TYPE_INFO);
TYPES.put(BigDecimal.class, BIG_DEC_TYPE_INFO);
+   TYPES.put(Instant.class, INSTANT_TYPE_INFO);
}
 }
diff --git 
a/flink-core/src/main/java/org/apache/flink/api/common/typeinfo/Types.java 
b/flink-core/src/main/java/org/apache/flink/api/common/typeinfo/Types.java
index 0140e9c8049..8e7538a97ed 100644
--- a/flink-core/src/main/java/org/apache/flink/api/common/typeinfo/Types.java
+++ b/flink-core/src/main/java/org/apache/flink/api/common/typeinfo/Types.java
@@ -43,6 +43,7 @@
 import java.sql.Date;
 import java.sql.Time;
 import java.sql.Timestamp;
+import java.time.Instant;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -150,6 +151,12 @@
 */
public static final TypeInformation SQL_TIMESTAMP = 
SqlTimeTypeInfo.TIMESTAMP;
 
+
+   /**
+* Returns type infomation for {@link java.time.Instant}. Supports a 
null value.
+*/
+   public static final TypeInformation INSTANT = 
BasicTypeInfo.INSTANT_TYPE_INFO;
+
//CHECKSTYLE.OFF: MethodName
 
/**
diff --git 
a/flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/InstantComparator.java
 
b/flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/InstantComparator.java
new file mode 100644
index 000..28a7be0eaca
--- /dev/null
+++ 
b/flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/InstantComparator.java
@@ -0,0 +1,106 @@
+/*
+ * 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 

[jira] [Commented] (FLINK-10127) Add TypeInformation and serializers for JDK8 Instant

2018-08-21 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-10127:


fhueske commented on issue #6549: [FLINK-10127] Add Instant to basic types
URL: https://github.com/apache/flink/pull/6549#issuecomment-414814460
 
 
   Thanks for the update @alexeyt820.
   
   Merging


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add TypeInformation  and serializers for JDK8 Instant
> -
>
> Key: FLINK-10127
> URL: https://issues.apache.org/jira/browse/FLINK-10127
> Project: Flink
>  Issue Type: Improvement
>Reporter: Alexey Trenikhin
>Priority: Minor
>  Labels: pull-request-available
>
> Currently Flink's basic types include all Java primitives and their boxed 
> form, plus {{void}}, {{String}}, {{Date}}, {{BigDecimal}}, and 
> {{BigInteger}}. New JDK8 Instance type should be added as well



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-10127) Add TypeInformation and serializers for JDK8 Instant

2018-08-21 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-10127:


alexeyt820 commented on issue #6549: [FLINK-10127] Add Instant to basic types
URL: https://github.com/apache/flink/pull/6549#issuecomment-414771907
 
 
   Thank you, added


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add TypeInformation  and serializers for JDK8 Instant
> -
>
> Key: FLINK-10127
> URL: https://issues.apache.org/jira/browse/FLINK-10127
> Project: Flink
>  Issue Type: Improvement
>Reporter: Alexey Trenikhin
>Priority: Minor
>  Labels: pull-request-available
>
> Currently Flink's basic types include all Java primitives and their boxed 
> form, plus {{void}}, {{String}}, {{Date}}, {{BigDecimal}}, and 
> {{BigInteger}}. New JDK8 Instance type should be added as well



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-10127) Add TypeInformation and serializers for JDK8 Instant

2018-08-20 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-10127:


fhueske commented on a change in pull request #6549: [FLINK-10127] Add Instant 
to basic types
URL: https://github.com/apache/flink/pull/6549#discussion_r211405853
 
 

 ##
 File path: 
flink-core/src/main/java/org/apache/flink/api/common/typeinfo/Types.java
 ##
 @@ -150,6 +151,12 @@
 */
public static final TypeInformation SQL_TIMESTAMP = 
SqlTimeTypeInfo.TIMESTAMP;
 
+
+   /**
+* Returns type infomation for {@link java.time.Instant}. Supports a 
null value.
+*/
+   public static final TypeInformation INSTANT = 
BasicTypeInfo.INSTANT_TYPE_INFO;
 
 Review comment:
   Add it to `org.apache.flink.api.scala.typeutils.Types` as well


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add TypeInformation  and serializers for JDK8 Instant
> -
>
> Key: FLINK-10127
> URL: https://issues.apache.org/jira/browse/FLINK-10127
> Project: Flink
>  Issue Type: Improvement
>Reporter: Alexey Trenikhin
>Priority: Minor
>  Labels: pull-request-available
>
> Currently Flink's basic types include all Java primitives and their boxed 
> form, plus {{void}}, {{String}}, {{Date}}, {{BigDecimal}}, and 
> {{BigInteger}}. New JDK8 Instance type should be added as well



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-10127) Add TypeInformation and serializers for JDK8 Instant

2018-08-13 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-10127:


alexeyt820 opened a new pull request #6549: [FLINK-10127] Add Instant to basic 
types
URL: https://github.com/apache/flink/pull/6549
 
 
   ## What is the purpose of the change
   This pull requests add JDK8 Instant type as basic type to Flink type system
   ## Brief change log
 - *InstantSerializer* added 
 - *InstantComparator* added
 - *BasicTypeInfo* modified to include *INSTANT_TYPE_INFO*
 - "Types" modified to include *INSTANT*
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   - *Added unit tests for InstantSerializer and InstantComparator*
   - *Modified BasicTypeInfoTest to include Instant*
   
   ## Does this pull request potentially affect one of the following parts:
   
 - Dependencies (does it add or upgrade a dependency): no
 - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: yes
 - The serializers: yes
 - The runtime per-record code paths (performance sensitive):  don't know
 - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: don't know
 - The S3 file system connector: no
   
   ## Documentation
   
 - Does this pull request introduce a new feature? no
 - 
https://ci.apache.org/projects/flink/flink-docs-release-1.6/dev/types_serialization.html#flinks-typeinformation-class
 should be modified to include Instant  
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add TypeInformation  and serializers for JDK8 Instant
> -
>
> Key: FLINK-10127
> URL: https://issues.apache.org/jira/browse/FLINK-10127
> Project: Flink
>  Issue Type: Improvement
>Reporter: Alexey Trenikhin
>Priority: Minor
>  Labels: pull-request-available
>
> Currently Flink's basic types include all Java primitives and their boxed 
> form, plus {{void}}, {{String}}, {{Date}}, {{BigDecimal}}, and 
> {{BigInteger}}. New JDK8 Instance type should be added as well



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)