From 75a354732e1c87b14534ec86a995cc3f1d442cce Mon Sep 17 00:00:00 2001 From: hbpatre Date: Fri, 4 Oct 2019 13:46:45 +0530 Subject: [PATCH] TOOLS-1385: (ASLOADER) Fix column position error for data file without header. (#5) --- pom.xml | 4 ++-- src/main/java/com/aerospike/load/AerospikeLoad.java | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 7e16f62..0fb26b1 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.aerospike aerospike-load - 2.3 + 2.3.2 Aerospike DSV Loader jar @@ -32,7 +32,7 @@ com.aerospike aerospike-client - 4.4.3 + 4.4.5 diff --git a/src/main/java/com/aerospike/load/AerospikeLoad.java b/src/main/java/com/aerospike/load/AerospikeLoad.java index 9fa8675..e2f4863 100644 --- a/src/main/java/com/aerospike/load/AerospikeLoad.java +++ b/src/main/java/com/aerospike/load/AerospikeLoad.java @@ -544,8 +544,6 @@ private static void updateColumnInfo(ColumnDefinition columnDef, List co if (dsvHasHeader()) { columnDef.columnName = columnNames.get(columnDef.columnPos); - } else { - throw new Exception("Column position defined for data file without header !!"); } } @@ -585,7 +583,7 @@ private static void updateColumnInfoForMappingDefs(List 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);