jeyhunkarimov commented on PR #23586:
URL: https://github.com/apache/flink/pull/23586#issuecomment-1840305544
Does it make any difference? yes and no IMHO.
Yes, because imagine `test1()` executes the statement
`createTemporarySystemFunction("add", new TestAddWithOpen)` (also
`createTemporaryFunction`). In this case, `add` function is visible to
`test2()`.
No, because, this (creating a new table for each test) would be overkill
IMHO. We just need to be sure that we are testing the functions that are
defined within the scope of a particular test (independent whether we use
`createTemporarySystemFunction` or `createTemporaryFunction`).
Some alternatives would be:
- we could explicitly drop functions in each test
- we could create a method to upsert a function (if a function exists, drop
and register the new one)
- we could use global functions in `before` via
`createTemporarySystemFunction` and use the functions that should live within
the scope of the test via `createTemporaryFunction` (we should still have some
mechanism to drop them)
In any case, the scope of this PR was diverged quite a bit (the main issue
was already resolved in the meantime). If you guys agree, I would close this PR
and mark the issue as resolved.
--
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]