spuru9 commented on PR #232:
URL:
https://github.com/apache/flink-connector-jdbc/pull/232#issuecomment-5756568722
> why do we need FlinkVersionUtils and can't use FlinkVersion?
I've switched the helper to use the public FlinkVersion.current() instead of
EnvironmentInformation.
It still needs to be a small helper rather than an inline
FlinkVersion.current().isNewerVersionThan(FlinkVersion.v2_3), because the
connector compiles against its baseline flink.version and that
flink-annotations only declares FlinkVersion up to the baseline's own version.
Referencing v2_3 fails to compile there — and this holds for the planned 2.1.2
baseline too, whose enum stops at v2_1:
```
error: cannot find symbol
return FlinkVersion.current().isNewerVersionThan(FlinkVersion.v2_3);
^
symbol: variable v2_3 (flink-annotations 2.1.2 declares up to v2_1)
```
And as a inline is not possible, and its a block of code, I am adding a
Util. Can add a TODO for cleanup post the compile version has moved 2.3+.
If there is another way let me know.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]