You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/19 05:41:22 UTC

[GitHub] [flink] JingsongLi opened a new pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

JingsongLi opened a new pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896
 
 
   
   ## What is the purpose of the change
   
   - equals for generic type not work
   - when close idle state, aggregation not work for generic type and timestamp type
   
   ## Brief change log
   
   - Fix equals code generation for raw type in ScalarOperatorGens
   - Fix raw and timestamp type in EqualiserCodeGenerator
   
   ## Verifying this change
   
   - ScalarFunctionsTest.testEquality
   - EqualiserCodeGeneratorTest
   - AggregateITCase.testGenericTypesWithoutStateClean
   
   ## 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)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no

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


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#discussion_r368291932
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala
 ##########
 @@ -4159,4 +4159,11 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
       "IS_ALPHA(f33)",
       "false")
   }
+
+  @Test
+  def testEquality(): Unit = {
 
 Review comment:
   `testRawTypeEquality`?

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


With regards,
Apache Git Services

[GitHub] [flink] wuchong merged pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
wuchong merged pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896
 
 
   

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


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#discussion_r368292017
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/codegen/EqualiserCodeGeneratorTest.java
 ##########
 @@ -0,0 +1,65 @@
+/*
+ * 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.table.planner.codegen;
+
+import org.apache.flink.api.common.typeinfo.Types;
+import org.apache.flink.table.dataformat.BinaryGeneric;
+import org.apache.flink.table.dataformat.GenericRow;
+import org.apache.flink.table.dataformat.SqlTimestamp;
+import org.apache.flink.table.runtime.generated.RecordEqualiser;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.TimestampType;
+import org.apache.flink.table.types.logical.TypeInformationRawType;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test for {@link EqualiserCodeGenerator}.
+ */
+public class EqualiserCodeGeneratorTest {
+
+	@Test
+	public void testRaw() {
+		RecordEqualiser equaliser = new EqualiserCodeGenerator(
+				new LogicalType[]{new TypeInformationRawType<>(Types.INT)})
+				.generateRecordEqualiser("RAW")
+				.newInstance(Thread.currentThread().getContextClassLoader());
+		Assert.assertTrue(equaliser.equalsWithoutHeader(
+				GenericRow.of(new BinaryGeneric<>(1)),
+				GenericRow.of(new BinaryGeneric<>(1))));
+		Assert.assertFalse(equaliser.equalsWithoutHeader(
+				GenericRow.of(new BinaryGeneric<>(1)),
+				GenericRow.of(new BinaryGeneric<>(2))));
+	}
+
+	@Test
+	public void testTimestamp() {
+		RecordEqualiser equaliser = new EqualiserCodeGenerator(
+				new LogicalType[]{new TimestampType()})
+				.generateRecordEqualiser("TIMESTAMP")
+				.newInstance(Thread.currentThread().getContextClassLoader());
+		Assert.assertTrue(equaliser.equalsWithoutHeader(
+				GenericRow.of(SqlTimestamp.fromEpochMillis(1024)),
+				GenericRow.of(SqlTimestamp.fromEpochMillis(1024))));
 
 Review comment:
   Add a test for `BinaryRow(BinaryGeneric(timestamp))` vs `GenericRow(BinaryGeneric(timestamp))`.

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


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#discussion_r368291969
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala
 ##########
 @@ -4159,4 +4159,11 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
       "IS_ALPHA(f33)",
       "false")
   }
+
+  @Test
+  def testEquality(): Unit = {
 
 Review comment:
   `testRawTypeEquality`?

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


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#discussion_r368292042
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/codegen/EqualiserCodeGeneratorTest.java
 ##########
 @@ -0,0 +1,65 @@
+/*
+ * 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.table.planner.codegen;
+
+import org.apache.flink.api.common.typeinfo.Types;
+import org.apache.flink.table.dataformat.BinaryGeneric;
+import org.apache.flink.table.dataformat.GenericRow;
+import org.apache.flink.table.dataformat.SqlTimestamp;
+import org.apache.flink.table.runtime.generated.RecordEqualiser;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.TimestampType;
+import org.apache.flink.table.types.logical.TypeInformationRawType;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test for {@link EqualiserCodeGenerator}.
+ */
+public class EqualiserCodeGeneratorTest {
+
+	@Test
+	public void testRaw() {
+		RecordEqualiser equaliser = new EqualiserCodeGenerator(
+				new LogicalType[]{new TypeInformationRawType<>(Types.INT)})
+				.generateRecordEqualiser("RAW")
+				.newInstance(Thread.currentThread().getContextClassLoader());
+		Assert.assertTrue(equaliser.equalsWithoutHeader(
+				GenericRow.of(new BinaryGeneric<>(1)),
+				GenericRow.of(new BinaryGeneric<>(1))));
 
 Review comment:
   Add a test for `BinaryRow(BinaryGeneric(1))` vs `GenericRow(BinaryGeneric(1))`.

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#issuecomment-575971337
 
 
   <!--
   Meta data
   Hash:f765a3816b97657b93895347980f6899a45e95b9 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/145096929 TriggerType:PUSH TriggerID:f765a3816b97657b93895347980f6899a45e95b9
   Hash:f765a3816b97657b93895347980f6899a45e95b9 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4463 TriggerType:PUSH TriggerID:f765a3816b97657b93895347980f6899a45e95b9
   Hash:9565df8604df038216c3fef48788be932c93a381 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:9565df8604df038216c3fef48788be932c93a381
   -->
   ## CI report:
   
   * f765a3816b97657b93895347980f6899a45e95b9 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/145096929) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4463) 
   * 9565df8604df038216c3fef48788be932c93a381 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

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


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#discussion_r368291918
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala
 ##########
 @@ -4159,4 +4159,11 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
       "IS_ALPHA(f33)",
       "false")
   }
+
+  @Test
+  def testEquality(): Unit = {
+    testSqlApi(
+      "f55=f56",
+      "false")
 
 Review comment:
   Add another test for equality?

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#issuecomment-575971337
 
 
   <!--
   Meta data
   Hash:f765a3816b97657b93895347980f6899a45e95b9 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/145096929 TriggerType:PUSH TriggerID:f765a3816b97657b93895347980f6899a45e95b9
   Hash:f765a3816b97657b93895347980f6899a45e95b9 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4463 TriggerType:PUSH TriggerID:f765a3816b97657b93895347980f6899a45e95b9
   -->
   ## CI report:
   
   * f765a3816b97657b93895347980f6899a45e95b9 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/145096929) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4463) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#issuecomment-575971337
 
 
   <!--
   Meta data
   Hash:f765a3816b97657b93895347980f6899a45e95b9 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/145096929 TriggerType:PUSH TriggerID:f765a3816b97657b93895347980f6899a45e95b9
   Hash:f765a3816b97657b93895347980f6899a45e95b9 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4463 TriggerType:PUSH TriggerID:f765a3816b97657b93895347980f6899a45e95b9
   Hash:9565df8604df038216c3fef48788be932c93a381 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4503 TriggerType:PUSH TriggerID:9565df8604df038216c3fef48788be932c93a381
   Hash:9565df8604df038216c3fef48788be932c93a381 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/145178863 TriggerType:PUSH TriggerID:9565df8604df038216c3fef48788be932c93a381
   -->
   ## CI report:
   
   * f765a3816b97657b93895347980f6899a45e95b9 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/145096929) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4463) 
   * 9565df8604df038216c3fef48788be932c93a381 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/145178863) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4503) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

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


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#discussion_r368278687
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/AggregateITCase.scala
 ##########
 @@ -1186,4 +1189,41 @@ class AggregateITCase(
     assertEquals(expected, sink.getRetractResults)
   }
 
+  @Test
+  def testGenericTypesWithoutStateClean(): Unit = {
+    tEnv.getConfig.setIdleStateRetentionTime(Time.days(0), Time.days(0))
+    val t = env.fromElements(1, 2, 3).toTable(tEnv, 'a)
 
 Review comment:
   Please use `failingDataSource` to cover more paths. 

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


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#discussion_r368292033
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/codegen/EqualiserCodeGeneratorTest.java
 ##########
 @@ -0,0 +1,65 @@
+/*
+ * 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.table.planner.codegen;
+
+import org.apache.flink.api.common.typeinfo.Types;
+import org.apache.flink.table.dataformat.BinaryGeneric;
+import org.apache.flink.table.dataformat.GenericRow;
+import org.apache.flink.table.dataformat.SqlTimestamp;
+import org.apache.flink.table.runtime.generated.RecordEqualiser;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.TimestampType;
+import org.apache.flink.table.types.logical.TypeInformationRawType;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test for {@link EqualiserCodeGenerator}.
+ */
+public class EqualiserCodeGeneratorTest {
+
+	@Test
+	public void testRaw() {
+		RecordEqualiser equaliser = new EqualiserCodeGenerator(
+				new LogicalType[]{new TypeInformationRawType<>(Types.INT)})
+				.generateRecordEqualiser("RAW")
+				.newInstance(Thread.currentThread().getContextClassLoader());
+		Assert.assertTrue(equaliser.equalsWithoutHeader(
+				GenericRow.of(new BinaryGeneric<>(1)),
+				GenericRow.of(new BinaryGeneric<>(1))));
 
 Review comment:
   Add a test for `BinaryRow(BinaryGeneric(1))` vs `GenericRow(BinaryGeneric(1))`.

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


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#discussion_r368292429
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/EqualiserCodeGenerator.scala
 ##########
 @@ -29,6 +30,10 @@ import scala.collection.JavaConversions._
 
 class EqualiserCodeGenerator(fieldTypes: Seq[LogicalType]) {
 
+  def this(fieldTypes: Array[LogicalType]) {
 
 Review comment:
   Can we improve the existing constructor to accept only Array[] ? So that we can avoid to maintain two constructors. 

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#issuecomment-575971337
 
 
   <!--
   Meta data
   Hash:f765a3816b97657b93895347980f6899a45e95b9 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:f765a3816b97657b93895347980f6899a45e95b9
   -->
   ## CI report:
   
   * f765a3816b97657b93895347980f6899a45e95b9 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#issuecomment-575971337
 
 
   <!--
   Meta data
   Hash:f765a3816b97657b93895347980f6899a45e95b9 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/145096929 TriggerType:PUSH TriggerID:f765a3816b97657b93895347980f6899a45e95b9
   Hash:f765a3816b97657b93895347980f6899a45e95b9 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4463 TriggerType:PUSH TriggerID:f765a3816b97657b93895347980f6899a45e95b9
   Hash:9565df8604df038216c3fef48788be932c93a381 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4503 TriggerType:PUSH TriggerID:9565df8604df038216c3fef48788be932c93a381
   Hash:9565df8604df038216c3fef48788be932c93a381 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/145178863 TriggerType:PUSH TriggerID:9565df8604df038216c3fef48788be932c93a381
   -->
   ## CI report:
   
   * f765a3816b97657b93895347980f6899a45e95b9 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/145096929) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4463) 
   * 9565df8604df038216c3fef48788be932c93a381 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/145178863) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4503) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

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


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#discussion_r368277949
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/AggregateITCase.scala
 ##########
 @@ -1186,4 +1189,41 @@ class AggregateITCase(
     assertEquals(expected, sink.getRetractResults)
   }
 
+  @Test
+  def testGenericTypesWithoutStateClean(): Unit = {
+    tEnv.getConfig.setIdleStateRetentionTime(Time.days(0), Time.days(0))
+    val t = env.fromElements(1, 2, 3).toTable(tEnv, 'a)
+    val results = t
+        .select(new GenericAggregateFunction()('a))
+        .toRetractStream[Row]
+
+    val sink = new TestingRetractSink
+    results.addSink(sink).setParallelism(1)
+    env.execute()
+  }
+}
+
+class RandomClass(var i: Int)
+
+class GenericAggregateFunction extends AggregateFunction[java.lang.Integer, RandomClass] {
 
 Review comment:
   Move this `JavaUserDefinedAggFunctions`? So that it can be reused across tests. 

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#issuecomment-575971337
 
 
   <!--
   Meta data
   Hash:f765a3816b97657b93895347980f6899a45e95b9 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/145096929 TriggerType:PUSH TriggerID:f765a3816b97657b93895347980f6899a45e95b9
   Hash:f765a3816b97657b93895347980f6899a45e95b9 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4463 TriggerType:PUSH TriggerID:f765a3816b97657b93895347980f6899a45e95b9
   Hash:9565df8604df038216c3fef48788be932c93a381 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4503 TriggerType:PUSH TriggerID:9565df8604df038216c3fef48788be932c93a381
   Hash:9565df8604df038216c3fef48788be932c93a381 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/145178863 TriggerType:PUSH TriggerID:9565df8604df038216c3fef48788be932c93a381
   -->
   ## CI report:
   
   * f765a3816b97657b93895347980f6899a45e95b9 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/145096929) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4463) 
   * 9565df8604df038216c3fef48788be932c93a381 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/145178863) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4503) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

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


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#discussion_r368278705
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/AggregateITCase.scala
 ##########
 @@ -1186,4 +1189,41 @@ class AggregateITCase(
     assertEquals(expected, sink.getRetractResults)
   }
 
+  @Test
+  def testGenericTypesWithoutStateClean(): Unit = {
+    tEnv.getConfig.setIdleStateRetentionTime(Time.days(0), Time.days(0))
 
 Review comment:
   Could you add a comment above this because we don't provide a way to disable state cleanup. 

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


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#issuecomment-576487355
 
 
   Thanks @wuchong for review, updated.

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#issuecomment-575969660
 
 
   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 5e14a59953462a613d2f736450654cdf5023b875 (Sun Jan 19 05:43:33 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
    * **This pull request references an unassigned [Jira ticket](https://issues.apache.org/jira/browse/FLINK-15631).** According to the [code contribution guide](https://flink.apache.org/contributing/contribute-code.html), tickets need to be assigned before starting with the implementation work.
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10896: [FLINK-15631][table-planner-blink] Fix equals code generation for raw and timestamp type
URL: https://github.com/apache/flink/pull/10896#issuecomment-575971337
 
 
   <!--
   Meta data
   Hash:f765a3816b97657b93895347980f6899a45e95b9 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/145096929 TriggerType:PUSH TriggerID:f765a3816b97657b93895347980f6899a45e95b9
   Hash:f765a3816b97657b93895347980f6899a45e95b9 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4463 TriggerType:PUSH TriggerID:f765a3816b97657b93895347980f6899a45e95b9
   -->
   ## CI report:
   
   * f765a3816b97657b93895347980f6899a45e95b9 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/145096929) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4463) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

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


With regards,
Apache Git Services