Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5533

Fix flag assignment in FunctionInitializer.checkInit() method

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.10.0
    • Fix Version/s: 1.11.0
    • Component/s: None
    • Labels:

      Description

      FunctionInitializer.checkInit() method uses DCL to ensure that function body is loaded only once. But flag parameter is never updated and all threads are entering synchronized block.

      Also FunctionInitializer.getImports() always returns empty list.

      https://github.com/apache/drill/blob/3e8b01d5b0d3013e3811913f0fd6028b22c1ac3f/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/FunctionInitializer.java

      Changes:
      1. Fix DCL in FunctionInitializer.checkInit() method (update flag parameter when function body is loaded).
      2. Fix ImportGrabber.getImports() method to return list with imports.
      3. Add unit tests for FunctionInitializer.
      4. Minor refactoring (rename methods, add javadoc).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arina Arina Ielchiieva
                Reporter:
                arina Arina Ielchiieva
                Reviewer:
                Sudheesh Katkam
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: