After fixing few other glitches with the parser, I am back to modifying metadata.properties to use the new optimizer override syntax.
Dan, I had infact tried earlier to use both \n and \\n in the metadata.properties rather than ~ but that didn't work. There is something going(I haven't figured out yet what is causing this strange behavior) on during the ant build process where a new line character gets inserted after every \ in the
metadata.properties when it is copied to classes directory. For instance, a line like following from metadata.properties
FROM --DERBY-PROPERTIES joinOrder=FIXED \\n \
SYS.SYSTABLES T --DERBY-PROPERTIES index='SYSTABLES_INDEX1' \\n\
gets converted to following during the build process and then copied to metadata.properties in the classes directory
SYS.SYSTABLES T --DERBY-PROPERTIES index='SYSTABLES_INDEX1' \\n\
gets converted to following during the build process and then copied to metadata.properties in the classes directory
FROM --DERBY-PROPERTIES joinOrder=FIXED \
\
n \
SYS.SYSTABLES T --DERBY-PROPERTIES index='SYSTABLES_INDEX1' \
\
n\
When this metadata.properties gets loaded into a Properties object later in the engine, the value for the key looks like following
\
n \
SYS.SYSTABLES T --DERBY-PROPERTIES index='SYSTABLES_INDEX1' \
\
n\
When this metadata.properties gets loaded into a Properties object later in the engine, the value for the key looks like following
FROM --DERBY-PROPERTIES joinOrder=FIXED n SYS.SYSTABLES T --DERBY-PROPERTIES index='SYSTABLES_INDEX1' n
This obviously is incorrect because of the extra n.
I need help in understanding how are the magical newline characters getting inserted after \ during the build process. Once that is resolved, I will not have to use ~ in the metadata.properties.
I need help in understanding how are the magical newline characters getting inserted after \ during the build process. Once that is resolved, I will not have to use ~ in the metadata.properties.
thanks,
Mamta
On 10/28/05, Daniel John Debrunner <[EMAIL PROTECTED]> wrote:
Mamta Satoor wrote:
> Hi,
>
[ ]
> If anyone has ideas about a better way of resolving this, please let me
> know.
The properties file format allows newlines to be inserted into property
values using \n. Can't you use that instead of ~ and not have any
special processing?
SELECT CAST ('' AS VARCHAR(128)) AS TABLE_CAT, \
S.SCHEMANAME AS TABLE_SCHEM, T.TABLENAME AS TABLE_NAME, \
COLS.COLUMNNAME AS COLUMN_NAME, \
CONGLOMS.DESCRIPTOR.getKeyColumnPosition(COLS.COLUMNNUMBER ) AS
KEY_SEQ, \
CONS.CONSTRAINTNAME AS PK_NAME \
FROM PROPERTIES joinOrder=FIXED \n \
SYS.SYSTABLES T PROPERTIES index='SYSTABLES_INDEX1' \n , \
etc. etc.
Dan.
