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

Dian Fu edited comment on FLINK-17135 at 4/16/20, 9:17 AM:
-----------------------------------------------------------

I have reproduced this issue in my local machine and I think it's a bug 
introduced in CALCITE-3149 after debugging. CALCITE-3149 ensures that the 
RelDataType cache(DATATYPE_CACHE) in RelDataTypeFactoryImpl could be garbage 
collected. However, the equality check still checks the [object 
reference](https://github.com/apache/calcite/blob/52a57078ba081b24b9d086ed363c715485d1a519/core/src/main/java/org/apache/calcite/rex/RexProgramBuilder.java#L948).
 It may cause issues in cases that the cache DATATYPE_CACHE has been garbage 
collected and at the same time there are still references to the old 
RelDataType (I have saw there are RelDataTypes which are not in the 
DATATYPE_CACHE cache and this is the root cause of the test failure reported in 
this JIRA). I will change the tests a bit to work around this issue for the 
time being. 

However, this is a bug which should also be fixed in calcite. cc [~danny0405]


was (Author: dian.fu):
I have reproduced this issue in my local machine and I think it's a bug 
introduced in CALCITE-3149 after debugging. CALCITE-3149 ensures that the 
RelDataType cache(DATATYPE_CACHE) in RelDataTypeFactoryImpl could be garbage 
collected. However, the equality check still checks the [object 
reference](https://github.com/apache/calcite/blob/52a57078ba081b24b9d086ed363c715485d1a519/core/src/main/java/org/apache/calcite/rex/RexProgramBuilder.java#L948).
 It may cause issues in cases that the cache DATATYPE_CACHE has been garbage 
collected and at the same time there are still references to the old 
RelDataType (I have saw there are RelDataType types which are not in the 
DATATYPE_CACHE cache and this is the root cause of the test failure reported in 
this JIRA). I will change the tests a bit to work around this issue for the 
time being. 

However, this is a bug which should also be fixed in calcite. cc [~danny0405]

> PythonCalcSplitRuleTest.testPandasFunctionMixedWithGeneralPythonFunction 
> failed
> -------------------------------------------------------------------------------
>
>                 Key: FLINK-17135
>                 URL: https://issues.apache.org/jira/browse/FLINK-17135
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Python, Tests
>    Affects Versions: 1.11.0
>            Reporter: Dian Fu
>            Assignee: Dian Fu
>            Priority: Major
>              Labels: pull-request-available, test-stability
>             Fix For: 1.11.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Shared by Chesnay on 
> https://issues.apache.org/jira/browse/FLINK-17093?focusedCommentId=17083055&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17083055:
> PythonCalcSplitRuleTest.testPandasFunctionMixedWithGeneralPythonFunction 
> failed on master:
> {code:java}
>  [INFO] Running 
> org.apache.flink.table.planner.plan.rules.logical.PythonCalcSplitRuleTest
>  [ERROR] Tests run: 19, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 
> 0.441 s <<< FAILURE! - in 
> org.apache.flink.table.planner.plan.rules.logical.PythonCalcSplitRuleTest
>  [ERROR] 
> testPandasFunctionMixedWithGeneralPythonFunction(org.apache.flink.table.planner.plan.rules.logical.PythonCalcSplitRuleTest)
>  Time elapsed: 0.032 s <<< FAILURE!
>  java.lang.AssertionError: 
>  type mismatch:
>  type1:
>  INTEGER NOT NULL
>  type2:
>  INTEGER NOT NULL
>  at org.apache.calcite.util.Litmus$1.fail(Litmus.java:31)
>  at org.apache.calcite.plan.RelOptUtil.eq(RelOptUtil.java:2188)
>  at 
> org.apache.calcite.rex.RexProgramBuilder$RegisterInputShuttle.visitInputRef(RexProgramBuilder.java:948)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to