palashc commented on code in PR #2033:
URL: https://github.com/apache/phoenix/pull/2033#discussion_r1877437795
##########
phoenix-core-client/src/main/java/org/apache/phoenix/query/QueryConstants.java:
##########
@@ -655,11 +655,11 @@ enum JoinType {INNER, LEFT_OUTER}
SYSTEM_CDC_STREAM_STATUS_TABLE + "\"(\n" +
// PK columns
TABLE_NAME + " VARCHAR NOT NULL," +
- STREAM_STATUS + " VARCHAR NOT NULL," +
+ STREAM_NAME + " VARCHAR NOT NULL," +
// Non-PK columns
- STREAM_NAME + " VARCHAR,\n" +
+ STREAM_STATUS + " VARCHAR,\n" +
Review Comment:
For querying, since there should only be one stream per table, the query
should still be efficient?
SELECT STREAM_NAME FROM SYSTEM.CDC_STREAM_STATUS WHERE TABLE_NAME =
<table-name> AND STREAM_STATUS = 'ENABLED'
##########
phoenix-core-client/src/main/java/org/apache/phoenix/query/QueryConstants.java:
##########
@@ -655,11 +655,11 @@ enum JoinType {INNER, LEFT_OUTER}
SYSTEM_CDC_STREAM_STATUS_TABLE + "\"(\n" +
// PK columns
TABLE_NAME + " VARCHAR NOT NULL," +
- STREAM_STATUS + " VARCHAR NOT NULL," +
+ STREAM_NAME + " VARCHAR NOT NULL," +
// Non-PK columns
- STREAM_NAME + " VARCHAR,\n" +
+ STREAM_STATUS + " VARCHAR,\n" +
Review Comment:
@virajjasani I changed it because the update pattern is
1. UPSERT (table_name, stream_name, ENABLING)
2. UPSERT (table_name, stream_name, ENABLED)
For querying, since there should only be one stream per table, the query
should still be efficient?
`SELECT STREAM_NAME FROM SYSTEM.CDC_STREAM_STATUS WHERE TABLE_NAME =
<table-name> AND STREAM_STATUS = 'ENABLED'`
--
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]