- Fixed Type Casting issue
- Reorganized duplicated internal class in the DelimitedDataParser and DelimitedDataParserFactory
- Prevented a user from creating an inverted index on a dataset with a variable-length PK

Change-Id: Ice2027388bbd1641e94fa97118e0a3b2b6415461
Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/231
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <westmann@gmail.com>
diff --git a/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/file/FieldCursorForDelimitedDataParser.java b/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/file/FieldCursorForDelimitedDataParser.java
index c6fd654..69ea0b1 100644
--- a/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/file/FieldCursorForDelimitedDataParser.java
+++ b/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/file/FieldCursorForDelimitedDataParser.java
@@ -119,6 +119,7 @@
                         } else if (ch == '\n' && !startedQuote) {
                             start = p + 1;
                             state = State.EOR;
+                            lineCount++;
                             lastDelimiterPosition = p;
                             break;
                         } else if (ch == '\r' && !startedQuote) {
@@ -142,6 +143,7 @@
                     if (ch == '\n' && !startedQuote) {
                         ++start;
                         state = State.EOR;
+                        lineCount++;
                     } else {
                         state = State.IN_RECORD;
                         return true;