Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Maybe a bug found when testing using oracle 10g

  1. #1
    Join Date
    Oct 2006
    Posts
    1

    Default Maybe a bug found when testing using oracle 10g

    Hi,

    Maybe, I found a bug when i'm testing with oracle10g, but i add a line to the function getQuoteIdentifierString, because Oracle consider that nonquoted identifiers must be refered always without double quotation.

    But the aliases with spaces generate a sql-syntax error in the function nonDistinctGenerateSQL, so its necessary to add the quotes

    With this changes it works fine, now.

    Mario

    mondrian.rolap.sql.SqlQuery.Dialect.getQuoteIdentifierString()
    if (isDB2()) {
    return "";
    }
    else if (isOracle()) {
    return "";
    }
    else {
    return quoteIdentifierString;
    }
    }


    mondrian.rolap.agg.AbstractQuerySpec.nonDistinctGenerateSQL()
    ...
    if (sqlQuery.getDialect().isAS400()) {
    sqlQuery.addSelect(expr, null);
    } else {
    if (sqlQuery.getDialect().isOracle()) {
    sqlQuery.addSelect(expr, "\\"" + getColumnAlias(i) + "\\"");
    }
    else {
    sqlQuery.addSelect(expr, getColumnAlias(i));
    }

    }
    ...


    Mario

  2. #2
    Join Date
    Nov 1999
    Posts
    1,618

    Default Re:Maybe a bug found when testing using oracle 10g

    I don't think this is a bug in Mondrian. Even though you defined them in lower case, your table and column names are upper case. Do 'select * from cat' and you'll see.

    Mondrian quotes all identifiers so that Oracle gets them exactly as they are - same case, and including spaces, punctuation etc.

    You should define the table and column names in the schema.xml file in upper case - then you won't need that code change, and everything will just work.

    Julian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.