[
https://issues.apache.org/jira/browse/PHOENIX-6454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17361107#comment-17361107
]
ASF GitHub Bot commented on PHOENIX-6454:
-----------------------------------------
swaroopak commented on a change in pull request #1233:
URL: https://github.com/apache/phoenix/pull/1233#discussion_r649380413
##########
File path:
phoenix-tools/src/main/java/org/apache/phoenix/schema/SchemaSynthesisProcessor.java
##########
@@ -154,7 +156,24 @@ private CreateTableStatement
getCreateTableStatement(AddColumnStatement alterSta
} else {
newColDef.addAll(oldColDef);
newColDef.addAll(addStmt.getColumnDefs());
- newCreateStmt = new CreateTableStatement(createStmt, newColDef);
+ PrimaryKeyConstraint oldPKConstraint =
createStmt.getPrimaryKeyConstraint();
+ List<ColumnDefInPkConstraint> pkList = new ArrayList<>();
+ for(Pair<ColumnName, SortOrder> entry :
oldPKConstraint.getColumnNames()) {
+ ColumnDefInPkConstraint cd = new
+ ColumnDefInPkConstraint(entry.getFirst(),
entry.getSecond(), oldPKConstraint.isColumnRowTimestamp(entry
+ .getFirst()));
+ pkList.add(cd);
+ }
+ for(ColumnDef cd : addStmt.getColumnDefs()) {
Review comment:
That's a valid point, I am thinking to create a new Jira which will
validate if the statements are valid on the mini-cluster (as parsing won't
catch this and similar problem) and then only proceed for synthesis. Does that
sound okay?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add feature to SchemaTool to get the DDL in specification mode
> --------------------------------------------------------------
>
> Key: PHOENIX-6454
> URL: https://issues.apache.org/jira/browse/PHOENIX-6454
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Swaroopa Kadam
> Assignee: Swaroopa Kadam
> Priority: Major
> Fix For: 4.17.0, 5.2.0
>
>
> Currently, SchemExtractionTool uses PTable representation to get the
> effective DDL on the cluster.
> Rename SchemaExtractionTool to SchemaTool, add a feature that accepts create
> DDL and alter DDL to give effective DDL without using PTable implementation.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)