Github user twdsilva commented on a diff in the pull request: https://github.com/apache/phoenix/pull/303#discussion_r192313898 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java --- @@ -787,7 +787,7 @@ public MutationPlan compile(UpsertStatement upsert) throws SQLException { LinkedHashSet<PColumn> updateColumns = Sets.newLinkedHashSetWithExpectedSize(nColumns + 1); updateColumns.add(new PColumnImpl( table.getPKColumns().get(position).getName(), // Use first PK column name as we know it won't conflict with others - null, PVarbinary.INSTANCE, null, null, false, position, SortOrder.getDefault(), 0, null, false, null, false, false, null)); + null, PVarbinary.INSTANCE, null, null, false, position, SortOrder.getDefault(), 0, null, false, null, false, false, null, table.getPKColumns().get(0).getTimestamp())); --- End diff -- We are using the first timestamp of the first pk column, so its guaranteed to be non null.
---