Note that is is, in general, very hard to test an exception such as these. We are catching programming errors. How does one trigger such exceptions? By running a test that finds a programming bug. What is the proper response? Fix the bug so that it never occurs again. This is why it is so hard to catch specific programming errors: by definition, they should never occur.
However, if done at the fragment executor level, then Drill does have a way to trigger an exception using the error injection framework. Basically, pick a point in the code (perhaps in one of the readers) an call the error injector. If it is enabled, it will throw the requested exception. You can then verify that the error is as expected. And, since the error is intentionally injected, you can repeat this test as often as you like. Error handling is a tricky topic, which is why I'm jumping in to offer suggestions based on my time in "the school of hard knocks." [ Full content available at: https://github.com/apache/drill/pull/1455 ] This message was relayed via gitbox.apache.org for [email protected]
