You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by Xpray <gi...@git.apache.org> on 2018/02/09 02:23:09 UTC
[GitHub] flink pull request #5438: [FLINK-8617][TableAPI & SQL] Fix code generation b...
GitHub user Xpray opened a pull request:
https://github.com/apache/flink/pull/5438
[FLINK-8617][TableAPI & SQL] Fix code generation bug while accessing …
## What is the purpose of the change
fix code generation error in MapGet
## Brief change log
handle nullTerm of MapGet GeneratedExpression correctly.
## Verifying this change
*(Please pick either of the following options)*
This change added tests and can be verified as follows:
```
run org.apache.flink.table.runtime.batch.sql.CalcITCase testMapGet()
run org.apache.flink.table.runtime.batch.table.CalcITCase testMapget()
run org.apache.flink.table.runtime.stream.table.CalcITCase testMapGet()
run org.apache.flink.table.runtime.stream.sql.SqlITCase testMapGet()
```
## 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/Xpray/flink FLINK-8617
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5438.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 #5438
----
commit d618aac64156a9fd86c8367d6594e593521a8d8b
Author: Xpray <le...@...>
Date: 2018-02-09T02:17:16Z
[FLINK-8617][TableAPI & SQL] Fix code generation bug while accessing Map type
----
---
[GitHub] flink pull request #5438: [FLINK-8617][TableAPI & SQL] Fix code generation b...
Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on a diff in the pull request:
https://github.com/apache/flink/pull/5438#discussion_r167503729
--- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/ScalarOperators.scala ---
@@ -351,7 +351,7 @@ object ScalarOperators {
else {
s"""
|${operand.code}
- |boolean $resultTerm = false;
+ |boolean $resultTerm = ${operand.resultTerm} == null;
--- End diff --
This is not a bug but intended. The result type should be a primitive at this point. I remove it and all tests are still working correctly.
---
[GitHub] flink issue #5438: [FLINK-8617][TableAPI & SQL] Fix code generation bug whil...
Posted by Xpray <gi...@git.apache.org>.
Github user Xpray commented on the issue:
https://github.com/apache/flink/pull/5438
@twalthr the PR has been updated, please have a look.
---
[GitHub] flink issue #5438: [FLINK-8617][TableAPI & SQL] Fix code generation bug whil...
Posted by Xpray <gi...@git.apache.org>.
Github user Xpray commented on the issue:
https://github.com/apache/flink/pull/5438
I've removed the ITCase and add some tests to ```org.apache.flink.table.expressions.MapTypeTest ```
---
[GitHub] flink pull request #5438: [FLINK-8617][TableAPI & SQL] Fix code generation b...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/5438
---