• Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • 10.0.2
    • 8.3
    • Dialogs
    • None
    • Workaround Exists
    • Hide

      1) Cancel out of the reconciler dialog
      2) Place your cursor in the SQL near the columns that need reconciling
      3) Select the "Expression Builder" action the the Transformation Editor toolbar
      4) Create/edit your complex/nested function definition

      Show
      1) Cancel out of the reconciler dialog 2) Place your cursor in the SQL near the columns that need reconciling 3) Select the "Expression Builder" action the the Transformation Editor toolbar 4) Create/edit your complex/nested function definition

      Description of problem: Trying to create a function to concatenate last and first names, but nothing would return from dialog after pressing OK. Looking in the log, NPE was found:

      java.lang.NullPointerException
      at org.teiid.query.function.FunctionTree.getFunction(FunctionTree.java:386)
      at org.teiid.query.function.FunctionLibrary.findFunction(FunctionLibrary.java:141)
      at org.teiid.query.function.FunctionLibrary.findFunction(FunctionLibrary.java:1)
      at org.teiid.designer.transformation.ui.reconciler.ReconcilerPanel.syncFunction(ReconcilerPanel.java:725)
      at org.teiid.designer.transformation.ui.reconciler.ReconcilerPanel.expressionButtonPressed(ReconcilerPanel.java:681)
      at org.teiid.designer.transformation.ui.reconciler.ReconcilerPanel$6.widgetSelected(ReconcilerPanel.java:364)
      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

            [TEIIDDES-1949] Unable to create function from the reconciler

            Tested today with TD 10.0.2.Alpha2 it works for me without problems.
            Closing
            TD JIRA Clean up

            Matus Makovy added a comment - Tested today with TD 10.0.2.Alpha2 it works for me without problems. Closing TD JIRA Clean up

            Not worth the time/resources to implement this and there is a workaround.

            Barry LaFond added a comment - Not worth the time/resources to implement this and there is a workaround.

            The Transformation Editor's Expression builder operates on a New or Existing expression. Upon return from the dialog/wizard, it replaces the SQL for that expression then goes through the setSQL() and validation logic which resets everything in the t-form.

            The Reconciler is actually a Secondary editor that allows re-arranging the SQL (reconciling, adding/removing bindings, functions etc) and the user can Cancel all these changes. So when the new expression is returned to this panel, it's handled differently by setting the binding to the new language object rather than replacing the SQL.

            We might be able to somehow replace the SQL text on the cloned Command object but this would take quite alot of work.

            Barry LaFond added a comment - The Transformation Editor's Expression builder operates on a New or Existing expression. Upon return from the dialog/wizard, it replaces the SQL for that expression then goes through the setSQL() and validation logic which resets everything in the t-form. The Reconciler is actually a Secondary editor that allows re-arranging the SQL (reconciling, adding/removing bindings, functions etc) and the user can Cancel all these changes. So when the new expression is returned to this panel, it's handled differently by setting the binding to the new language object rather than replacing the SQL. We might be able to somehow replace the SQL text on the cloned Command object but this would take quite alot of work.

            Van Halbert <vhalbert@redhat.com> changed the Status of bug 1035035 from NEW to CLOSED

            RH Bugzilla Integration added a comment - Van Halbert <vhalbert@redhat.com> changed the Status of bug 1035035 from NEW to CLOSED

            Van Halbert <vhalbert@redhat.com> changed the Status of bug 1035035 from ASSIGNED to NEW

            RH Bugzilla Integration added a comment - Van Halbert <vhalbert@redhat.com> changed the Status of bug 1035035 from ASSIGNED to NEW

            Maybe put a hack in to check for this use-case (arg.getType() == NULL) and throw up a warning dialog stating: "Attempting to create complex, nested function definition. Please launch function builder from Transformation Editor toolbar"

            Barry LaFond added a comment - Maybe put a hack in to check for this use-case (arg.getType() == NULL) and throw up a warning dialog stating: "Attempting to create complex, nested function definition. Please launch function builder from Transformation Editor toolbar"

            Looks like our ReconcilerPanel has limited support for function definition which does not correctly recurse through nested functions as in:

            concat( LastName, concat(', ', FirstName))

            Launching from T-Editor, Teiid's ResolverVisitor correctly does this.

            Workaround is to use the Function Builder from the T-Editor for complex function building.

            Barry LaFond added a comment - Looks like our ReconcilerPanel has limited support for function definition which does not correctly recurse through nested functions as in: concat( LastName, concat(', ', FirstName)) Launching from T-Editor, Teiid's ResolverVisitor correctly does this. Workaround is to use the Function Builder from the T-Editor for complex function building.

            No, I was using concat(string, string).

            Example: concat( LastName, concat(', ', FirstName))

            I even tried just comma without single quotes.

            Van Halbert (Inactive) added a comment - No, I was using concat(string, string). Example: concat( LastName, concat(', ', FirstName)) I even tried just comma without single quotes.

            Van, can you clarify?

            1) Did you add a custom function for your use-case?
            2) Did you just try and use the simple string concat() functions?

            Barry LaFond added a comment - Van, can you clarify? 1) Did you add a custom function for your use-case? 2) Did you just try and use the simple string concat() functions?

            There is a designer customization to FunctionLibrary here correct? From FunctionTree it implies that a function has been added to the with some null type information.

            Steven Hawkins added a comment - There is a designer customization to FunctionLibrary here correct? From FunctionTree it implies that a function has been added to the with some null type information.

              blafond Barry LaFond
              van.halbert Van Halbert (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: