GitHub user paul-rogers opened a pull request:
https://github.com/apache/drill/pull/716
DRILL-5116: Enable generated code debugging in each Drill operator
DRILL-5052 added the ability to debug generated code. The reviewer
suggested permitting the technique to be used for all Drill operators. This PR
provides the required fixes. Most were small changes, others dealt with the
rather clever way that the existing byte-code merge converted static nested
classes to non-static inner classes, with the way that constructors were
inserted at the byte-code level and so on. See the JIRA for the details.
This code passed the unit tests twice: once with the traditional byte-code
manipulations, a second time using "plain-old Java" code compilation. Plain-old
Java is turned off by default, but can be turned on for all operators with a
single config change: see the JIRA for info. Consider the plain-old Java option
to be experimental: very handy for debugging, perhaps not quite tested enough
for production use.
One or two operators were not converted as they appear to not be used at
present, so no tests exercise them. See the JIRA for details.
This fix required visiting all operators. All generated methods declare
exceptions. For plain-old Java, the based class methods must also declare
exceptions. That afforded the opportunity to fix compiler warnings about
resources (our over-use of {{AutoCloseable}}), missing type parameters, unused
variables, and so on.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/paul-rogers/drill DRILL-5116
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/drill/pull/716.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 #716
----
commit 020e75cc5a538a0271dc78b361622b64ca6c2c65
Author: Paul Rogers <[email protected]>
Date: 2016-12-13T01:30:56Z
DRILL-5116: Enable generated code debugging in each Drill operator
DRILL-5052 added the ability to debug generated code. The reviewer suggested
permitting the technique to be used for all Drill operators. This PR
provides
the required fixes. Most were small changes, others dealt with the rather
clever way that the existing byte-code merge converted static nested classes
to non-static inner classes, with the way that constructors were inserted
at the byte-code level and so on. See the JIRA for the details.
This code passed the unit tests twice: once with the traditional byte-code
manipulations, a second time using "plain-old Java" code compilation.
Plain-old Java is turned off by default, but can be turned on for all
operators with a single config change: see the JIRA for info. Consider
the plain-old Java option to be experimental: very handy for debugging,
perhaps not quite tested enough for production use.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---