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

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


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

commit 90621a889a425d2e8e1c83cf2283e1718cd320f7
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

Reply via email to