Skip to content

Commit

Permalink
TOOLS-1385: (ASLOADER) Fix column position error for data file withou…
Browse files Browse the repository at this point in the history
…t header. (#5)
  • Loading branch information
hbpatre authored Oct 4, 2019
1 parent 8b5824a commit 75a3547
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.aerospike</groupId>
<artifactId>aerospike-load</artifactId>
<version>2.3</version>
<version>2.3.2</version>
<name>Aerospike DSV Loader</name>
<packaging>jar</packaging>

Expand Down Expand Up @@ -32,7 +32,7 @@
<dependency>
<groupId>com.aerospike</groupId>
<artifactId>aerospike-client</artifactId>
<version>4.4.3</version>
<version>4.4.5</version>
</dependency>
<!-- Apache command line parser. -->
<dependency>
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/aerospike/load/AerospikeLoad.java
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,6 @@ private static void updateColumnInfo(ColumnDefinition columnDef, List<String> co

if (dsvHasHeader()) {
columnDef.columnName = columnNames.get(columnDef.columnPos);
} else {
throw new Exception("Column position defined for data file without header !!");
}
}

Expand Down Expand Up @@ -585,7 +583,7 @@ private static void updateColumnInfoForMappingDefs(List<String> columnNames) thr
if (binColumnDef.valueDef != null) {

// SYSTEM_TIME is reserved column value
if (binColumnDef.valueDef.columnName.toLowerCase().equals(Constants.SYSTEM_TIME)) {
if (binColumnDef.valueDef.columnName != null && binColumnDef.valueDef.columnName.toLowerCase().equals(Constants.SYSTEM_TIME)) {
continue;
}
updateColumnInfo(binColumnDef.valueDef, columnNames);
Expand Down

0 comments on commit 75a3547

Please sign in to comment.