Uploaded image for project: 'CloverDX'
  1. CloverDX
  2. CLO-4571

DB Lookup does not accept key longer than 10 digits

    XMLWordPrintable

    Details

    • QA Testing:
      Graph automated test
    • QA Test Identification:
      cloveretl.test.scenarios/after-commit.ts/BigDecimal_CLO-4571

      Description

      DB Lookup table with one numeric key, i.e.:

      select * from transactions where account_id = ?
      

      fails during execution with error

      org.jetel.data.primitive.Decimal$OutOfPrecisionException -> Too many digits before decimal dot, must be 10 at most (100022086049); specified precision [12,2]
      

      The metadata used as a key value is extracted from db table and have length = 19, scale = 0 for given account_id field.

      Error:

      ----------------------- CTL2 snippet -----------------------
      6:     $out.0.hasTransaction_2013 = lookup(getTransactions2013ByAccountId).get($in.0.account_id) != null;
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      ----------------------- CTL2 snippet -----------------------
      Call arguments: 
      [1] field: "account_id" (decimal) -> 100022086049
      	at org.jetel.ctl.ASTnode.CLVFLookupNode.jjtAccept(CLVFLookupNode.java:69)
      	at org.jetel.ctl.TransformLangExecutor.visit(TransformLangExecutor.java:677)
      	at org.jetel.ctl.ASTnode.CLVFComparison.jjtAccept(CLVFComparison.java:56)
      	at org.jetel.ctl.TransformLangExecutor.evaluateRHS(TransformLangExecutor.java:1815)
      	at org.jetel.ctl.TransformLangExecutor.visit(TransformLangExecutor.java:1694)
      	at org.jetel.ctl.ASTnode.CLVFAssignment.jjtAccept(CLVFAssignment.java:52)
      	at org.jetel.ctl.TransformLangExecutor.executeAndCleanup(TransformLangExecutor.java:2661)
      	at org.jetel.ctl.TransformLangExecutor.visit(TransformLangExecutor.java:1519)
      	at org.jetel.ctl.ASTnode.CLVFBlock.jjtAccept(CLVFBlock.java:44)
      	at org.jetel.ctl.TransformLangExecutor.executeFunction(TransformLangExecutor.java:2516)
      	at org.jetel.ctl.TransformLangExecutor.executeFunction(TransformLangExecutor.java:2573)
      	at org.jetel.component.CTLRecordTransformAdapter.transformImpl(CTLRecordTransformAdapter.java:121)
      	at org.jetel.component.CTLRecordTransformAdapter.transform(CTLRecordTransformAdapter.java:102)
      	at org.jetel.component.Reformat.execute(Reformat.java:273)
      	... 4 more
      Caused by: org.jetel.exception.JetelRuntimeException
      	at org.jetel.ctl.TransformLangExecutorRuntimeException.<init>(TransformLangExecutorRuntimeException.java:53)
      	at org.jetel.ctl.TransformLangExecutorRuntimeException.<init>(TransformLangExecutorRuntimeException.java:75)
      	... 18 more
      Caused by: org.jetel.data.primitive.Decimal$OutOfPrecisionException: Too many digits before decimal dot, must be 10 at most (100022086049); specified precision [12,2]
      	at org.jetel.data.primitive.IntegerDecimal.setValue(IntegerDecimal.java:213)
      	at org.jetel.data.primitive.IntegerDecimal.setValue(IntegerDecimal.java:229)
      	at org.jetel.data.DecimalDataField.setValue(DecimalDataField.java:305)
      	at org.jetel.data.DecimalDataField.setValue(DecimalDataField.java:210)
      	at org.jetel.ctl.TransformLangExecutor.visit(TransformLangExecutor.java:1978)
      	at org.jetel.ctl.ASTnode.CLVFLookupNode.jjtAccept(CLVFLookupNode.java:62)
      	... 17 more
      

        Attachments

          Activity

            People

            • Assignee:
              zatopekm Martin Zatopek
              Reporter:
              harazimj Jiri Harazim (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h