You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/01/24 05:28:00 UTC
[jira] [Commented] (FLINK-8492) [FLINK-8492][table] Fix calc cost
bug
[ https://issues.apache.org/jira/browse/FLINK-8492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16336937#comment-16336937 ]
ASF GitHub Bot commented on FLINK-8492:
---------------------------------------
GitHub user hequn8128 opened a pull request:
https://github.com/apache/flink/pull/5347
[FLINK-8492][table] Fix calc cost bug
## What is the purpose of the change
Fix calc cost bug. Currently, unsupported exception will be thrown when multi calc existing between correlate and TableFunctionScan.
## Brief change log
- Add a constant 1 to compCnt in `CommonCalc`
## Verifying this change
This change added tests and can be verified as follows:
- Added integration tests for udtf with multi cals
## 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)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/hequn8128/flink 8492
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5347.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5347
----
commit bf1b4d4773c3690dfe73a0e71b22730d8b5eb99c
Author: hequn8128 <ch...@...>
Date: 2018-01-24T04:25:13Z
[FLINK-8492][table] Fix calc cost bug
----
> [FLINK-8492][table] Fix calc cost bug
> -------------------------------------
>
> Key: FLINK-8492
> URL: https://issues.apache.org/jira/browse/FLINK-8492
> Project: Flink
> Issue Type: Bug
> Components: Table API & SQL
> Reporter: Hequn Cheng
> Assignee: Hequn Cheng
> Priority: Major
>
> Considering the following test, unsupported exception will be thrown due to multi calc existing between correlate and TableFunctionScan.
> {code:java}
> // code placeholder
> @Test
> def testCrossJoinWithMultiFilter(): Unit = {
> val t = testData(env).toTable(tEnv).as('a, 'b, 'c)
> val func0 = new TableFunc0
> val result = t
> .join(func0('c) as('d, 'e))
> .select('c, 'd, 'e)
> .where('e > 10)
> .where('e > 20)
> .select('c, 'd)
> .toAppendStream[Row]
> result.addSink(new StreamITCase.StringSink[Row])
> env.execute()
> val expected = mutable.MutableList("Jack#22,Jack,22", "Anna#44,Anna,44")
> assertEquals(expected.sorted, StreamITCase.testResults.sorted)
> }
> {code}
> I can see two options to fix this problem:
> # Adapt calcite OptRule to merge the continuous calc.
> # Merge multi calc in correlate convert rule.
> I prefer the second one, not only it is easy to implement but also i think with or without an optimize rule should not influence flink functionality.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)