Author: shawkins
Date: 2011-08-11 16:12:07 -0400 (Thu, 11 Aug 2011)
New Revision: 3378
Modified:
trunk/engine/src/main/java/org/teiid/query/sql/lang/TextTable.java
trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java
Log:
TEIID-1703 adding more flexibility to fixed width parsing
Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/TextTable.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/TextTable.java 2011-08-11 18:49:54
UTC (rev 3377)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/TextTable.java 2011-08-11 20:12:07
UTC (rev 3378)
@@ -94,7 +94,7 @@
private boolean escape;
private Integer header;
private Integer skip;
- private boolean usingRowDelimiter;
+ private boolean usingRowDelimiter = true;
private boolean fixedWidth;
Modified: trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java 2011-08-11
18:49:54 UTC (rev 3377)
+++
trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java 2011-08-11
20:12:07 UTC (rev 3378)
@@ -1277,7 +1277,11 @@
append(" "); //$NON-NLS-1$
}
- append(((Constant)args[1]).getValue());
+ if (args.length < 2 || args[1] == null || !(args[1] instanceof
Constant)) {
+ append(UNDEFINED);
+ } else {
+ append(((Constant)args[1]).getValue());
+ }
}
append(")"); //$NON-NLS-1$
Show replies by date