Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Severe Severe
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.

      Description

      A RolapStarPredicate sometimes has a null RolapStar.Column value.

      We would like to make this field mandatory, so that predicates can generate SQL for themselves in a self-contained fashion using the

      void RolapColumnPredicate.toSql(SqlQuery,StringBuilder)

      method. Currently we workaround this issue by supplying a fake column if the column is null. To reproduce, set

      Bug1767775Fixed = true
      Bug<thisbug>Fixed = true

      in Bug.java and run BasicQueryTest.testCountDistinct, and you get

      java.lang.NullPointerException
      at mondrian.rolap.agg.ValueColumnPredicate.toSql(ValueColumnPredicate.java:134)
      at mondrian.rolap.RolapStar$Column.createInExpr(RolapStar.java:1133)
      at mondrian.rolap.SqlConstraintUtils.generateSingleValueInExpr(SqlConstraintUtils.java:883)
      at mondrian.rolap.SqlConstraintUtils.addMemberConstraint(SqlConstraintUtils.java:304)
      at mondrian.rolap.SqlConstraintUtils.addMemberConstraint(SqlConstraintUtils.java:227)
      at mondrian.rolap.DefaultMemberChildrenConstraint.addMemberConstraint(DefaultMemberChildrenConstraint.java:44)
      at mondrian.rolap.SqlMemberSource.makeChildMemberSql(SqlMemberSource.java:498)
      at mondrian.rolap.SqlMemberSource.getMemberChildren2(SqlMemberSource.java:707)
      at mondrian.rolap.SqlMemberSource.getMemberChildren(SqlMemberSource.java:641)
      at mondrian.rolap.SqlMemberSource.getMemberChildren(SqlMemberSource.java:616)
      at mondrian.rolap.SmartMemberReader.readMemberChildren(SmartMemberReader.java:279)
      at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:244)
      at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:211)
      at mondrian.rolap.RolapSchemaReader.internalGetMemberChildren(RolapSchemaReader.java:150)
      at mondrian.rolap.RolapSchemaReader.lookupMemberChildByName(RolapSchemaReader.java:306)
      at mondrian.olap.MemberBase.lookupChild(MemberBase.java:129)
      at mondrian.rolap.RolapSchemaReader.getElementChild(RolapSchemaReader.java:253)
      at mondrian.olap.Util.lookupCompound(Util.java:510)
      at mondrian.rolap.RolapSchemaReader.lookupCompound(RolapSchemaReader.java:287)
      at mondrian.rolap.RolapCube$RolapCubeSchemaReader.getMemberByUniqueName(RolapCube.java:2448)
      at mondrian.rolap.RolapCube$RolapCubeSchemaReader.getMemberByUniqueName(RolapCube.java:2440)
      at mondrian.rolap.RolapSchema.createRole(RolapSchema.java:530)
      at mondrian.rolap.RolapSchema.load(RolapSchema.java:445)
      at mondrian.rolap.RolapSchema.load(RolapSchema.java:323)
      at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:214)
      at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:78)
      at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:867)
      at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:682)
      at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:149)
      at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:80)
      at mondrian.olap.DriverManager.getConnection(DriverManager.java:190)
      at mondrian.olap.DriverManager.getConnection(DriverManager.java:131)
      at mondrian.test.TestContext.getFoodMartConnection(TestContext.java:211)
      at mondrian.test.TestContext.getConnection(TestContext.java:192)
      at mondrian.test.TestContext.executeQuery(TestContext.java:388)
      at mondrian.test.TestContext.assertQueryReturns(TestContext.java:615)
      at mondrian.test.FoodMartTestCase.assertQueryReturns(FoodMartTestCase.java:124)
      at mondrian.test.BasicQueryTest.testCountDistinct(BasicQueryTest.java:2915)

      Assigning to Richard because of this bug's similarity with bug 1767775 "Predicate references RolapStar.Column when used in AggStar".

        Activity

        Hide
        Mondrian Importer User added a comment -
        {jhyde}, 08/04/2007: IP, Artifact Created: 66.92.12.96 | {jhyde}

        , 08/04/2007: summary, Predicate sometimes has null Column

        Show
        Mondrian Importer User added a comment - {jhyde}, 08/04/2007: IP, Artifact Created: 66.92.12.96 | {jhyde} , 08/04/2007: summary, Predicate sometimes has null Column

          People

          • Assignee:
            Unassigned User
            Reporter:
            Julian Hyde
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: