Github user prashantkommireddi commented on a diff in the pull request:
https://github.com/apache/incubator-phoenix/pull/27#discussion_r11405380
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/util/SchemaUtil.java ---
@@ -553,4 +553,14 @@ public static short getMaxKeySeq(PTable table) {
}
return (short)(table.getPKColumns().size() - offset);
}
+
+ public static String getEscapedColumnFamily(String fullColumnName) {
+ int index = fullColumnName.indexOf(QueryConstants.NAME_SEPARATOR);
+ if (index < 0) {
+ return fullColumnName;
+ }
+ String columnFamily = fullColumnName.substring(0,index);
+ String columnName = fullColumnName.substring(index+1);
+ return "\"" + columnFamily + "\"" + QueryConstants.NAME_SEPARATOR
+ columnName ;
--- End diff --
Let's extract "\" into a static final variable.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---