virajjasani commented on a change in pull request #1363:
URL: https://github.com/apache/phoenix/pull/1363#discussion_r765996900
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
##########
@@ -4134,25 +4151,34 @@ public MutationState addColumn(PTable table,
List<ColumnDef> origColumnDefs,
metaPropertiesEvaluated.getUpdateCacheFrequency(),
metaPropertiesEvaluated.getPhoenixTTL(),
metaPropertiesEvaluated.getPhysicalTableName(),
- metaPropertiesEvaluated.getSchemaVersion());
+ metaPropertiesEvaluated.getSchemaVersion(),
+
metaPropertiesEvaluated.getColumnEncodedBytes());
}
tableMetaData.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond());
connection.rollback();
}
+ long seqNum = 0;
if (changingPhoenixTableProperty || columnDefs.size() > 0) {
- incrementTableSeqNum(table, tableType, columnDefs.size(),
metaPropertiesEvaluated);
+ seqNum = incrementTableSeqNum(table, tableType,
columnDefs.size(), metaPropertiesEvaluated);
tableMetaData.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond());
connection.rollback();
}
+ if (isTransformNeeded) {
+ try {
+ Transform.addTransform(connection, tenantIdToUse,
table, metaProperties, seqNum, PTable.TransformType.METADATA_TRANSFORM);
+ } catch (SQLException ex) {
+ connection.rollback();
+ throw ex;
Review comment:
Looks like this can happen only if we fail to parse metaProperties
object to String, correct?
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
##########
@@ -177,6 +180,9 @@
import org.apache.phoenix.coprocessor.MetaDataProtocol.MutationCode;
import org.apache.phoenix.coprocessor.MetaDataProtocol.SharedTableState;
import org.apache.phoenix.schema.stats.GuidePostsInfo;
+import org.apache.phoenix.schema.task.SystemTaskParams;
+import org.apache.phoenix.schema.transform.SystemTransformRecord;
Review comment:
nit: looks like they are no longer used
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
##########
@@ -5220,12 +5260,8 @@ private boolean evaluateStmtProperties(MetaProperties
metaProperties, MetaProper
throws SQLException {
boolean changingPhoenixTableProperty = false;
- if (metaProperties.getImmutableRowsProp() != null) {
+ if (metaProperties.getImmutableRowsProp() != null && table.getType()
!= INDEX) {
if (metaProperties.getImmutableRowsProp().booleanValue() !=
table.isImmutableRows()) {
- if (table.getImmutableStorageScheme() !=
ImmutableStorageScheme.ONE_CELL_PER_COLUMN) {
Review comment:
Any change required in existing IT due to removal of this restriction?
--
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]