Aarchy commented on code in PR #1553:
URL: https://github.com/apache/phoenix/pull/1553#discussion_r1086762675
##########
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java:
##########
@@ -2614,7 +2628,47 @@ else if
(!SchemaUtil.isSystemTable(Bytes.toBytes(SchemaUtil.getTableName(schemaN
}
// Use position as column qualifier if APPEND_ONLY_SCHEMA to
prevent gaps in
// the column encoding (PHOENIX-4737).
- Integer encodedCQ = isPkColumn ? null : isAppendOnlySchema ?
Integer.valueOf(ENCODED_CQ_COUNTER_INITIAL_VALUE + position) :
cqCounter.getNextQualifier(cqCounterFamily);
+ Integer encodedCQ = null;
+ if (!isPkColumn) {
+ if (colDef.getColumnQualifier() != null && encodingScheme
!= NON_ENCODED_QUALIFIERS) {
+ if (cqCounter.getNextQualifier(cqCounterFamily) >
ENCODED_CQ_COUNTER_INITIAL_VALUE &&
+ !inputCqCounters.containsKey(cqCounterFamily))
{
+ throw new
SQLExceptionInfo.Builder(SQLExceptionCode.MISSING_CQ)
+ .setSchemaName(schemaName)
+
.setTableName(tableName).build().buildException();
+ }
+
+ if (statement.getFamilyCQCounters() == null ||
+
statement.getFamilyCQCounters().get(cqCounterFamily) == null) {
+ cqCounter.setValue(cqCounterFamily,
colDef.getColumnQualifier());
Review Comment:
Fixed, thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]