Search code examples
olap-cubemondrian

Mondrian doing sub-select on group by oracle


When I do this dimension:

<Dimension ForeignKey="ID_PROCESSO" highCardinality="false" name="Adverso Principal">
       <Hierarchy Name="Adverso Principal" hasAll="true" allMemberName="Todos the Adverse Principais">
         <level Name="Adverso Principal" table="m_entidade" column="NOME" type="string" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
         <KeyExpression>
         <SQL dialect="generic">
         (
select NAME from D_PROCESSO_PARTE
         left join M_ENTIDADE on D_PROCESSO_PARTE.ID_ENTIDADE = M_ENTIDADE.ID_ENTIDADE
         where D_PROCESSO_PARTE.CLIENTE = 'F'
         and M_PROCESSO.ID_PROCESSO = D_PROCESSO_PARTE.ID_PROCESSO
)
         </ SQL>
         </ KeyExpression>
         </ Level>
       </ Hierarchy>
     </ Dimension>

He's putting in the sub-select group by, and the oracle that is not allowed. Someone already Tave any similar problem?


Solution

  • This could be a bug. Mondrian uses dialects internally to figure out what is allowed on a given database. It should know that Oracle doesn't support this. You won't be able to fix this unless you change the code and recompile yourself.

    You should report this on the project's bug tracking system.