You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2022/04/05 06:12:35 UTC

[phoenix] branch 4.16 updated: PHOENIX-6679 PHOENIX-6665 changed column name for CURRENT seqence values

This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch 4.16
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.16 by this push:
     new bff374b347 PHOENIX-6679 PHOENIX-6665 changed column name for CURRENT seqence values
bff374b347 is described below

commit bff374b3477a25c41b9a1ca5b3b69da23541575e
Author: Istvan Toth <st...@apache.org>
AuthorDate: Thu Mar 31 06:59:30 2022 +0200

    PHOENIX-6679 PHOENIX-6665 changed column name for CURRENT seqence values
---
 .../java/org/apache/phoenix/compile/SequenceValueExpression.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceValueExpression.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceValueExpression.java
index 8ba31835ac..18ec87c2ad 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceValueExpression.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceValueExpression.java
@@ -96,7 +96,14 @@ public class SequenceValueExpression extends BaseTerminalExpression {
 
     @Override
     public String toString() {
-        return op.getName() + Arrays.toString(getNumToAllocateExpressions().toArray()) + " VALUE(S) " + "FOR " + SchemaUtil.getTableName(key.getSchemaName(),key.getSequenceName());
+        String sequenceQualifiedName =
+                SchemaUtil.getTableName(key.getSchemaName(), key.getSequenceName());
+        if (op == Op.CURRENT_VALUE) {
+            return op.getName() + " VALUE " + "FOR " + sequenceQualifiedName;
+        } else {
+            return op.getName() + Arrays.toString(getNumToAllocateExpressions().toArray())
+                    + " VALUE(S) " + "FOR " + sequenceQualifiedName;
+        }
     }
 
     @Override