You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2021/12/14 08:44:45 UTC

[GitHub] [phoenix] richardantal commented on a change in pull request #1364: PHOENIX-6596 Schema extraction double quotes expressions, resulting i…

richardantal commented on a change in pull request #1364:
URL: https://github.com/apache/phoenix/pull/1364#discussion_r768430178



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/schema/tool/SchemaExtractionProcessor.java
##########
@@ -135,8 +135,8 @@ private String getIndexedColumnsString(PTable indexPTable, PTable dataPTable, St
         StringBuilder indexedColumnsBuilder = new StringBuilder();
 
         for (PColumn indexedColumn : indexPK) {
-            String indexColumn = extractIndexColumn(indexedColumn.getName().getString(), defaultCF);
-            if(indexColumn.equalsIgnoreCase(MetaDataUtil.VIEW_INDEX_ID_COLUMN_NAME)) {
+            String indexColumn = extractIndexColumn(indexedColumn.getExpressionStr(), defaultCF);

Review comment:
       We still parse it but indexedColumn.getExpressionStr() is better to parse.
   indexedColumn.getName().getString() returnes 'QUOTED' for quoted string and ('number' * 'currency') for lowercase columns so we would not be able to differentiate them.
   On the other hand  indexedColumn.getExpressionStr() returns these columns as 'QUOTED' and ("number" * "currency")




-- 
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: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org