Profiler fails when there are no columns selected for profiling
@@ -162,10 +162,14 @@ public class Profiler {
}
}
+ if (!profiledColumns.isEmpty()) {
retVal = "select " + StringUtils.join(profiledColumns, ',') + " from " + safeTable;
if (inputAndOutputTablePartitionKey != null && !"ALL".equalsIgnoreCase(inputAndOutputTablePartitionKey)) {
retVal += " where " + HiveUtils.quoteIdentifier(ProfilerConfiguration.INPUT_TABLE_PARTITION_COLUMN_NAME) + " = " + HiveUtils.quoteString(inputAndOutputTablePartitionKey);
}
+ } else {
+ retVal = null;
+ }
break;
case "query":
retVal = profileObjectDesc;
