Github user ankitsinghal commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/261#discussion_r123154290
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java ---
@@ -2135,7 +2135,7 @@ private PTable
createTableInternal(CreateTableStatement statement, byte[][] spli
// Upsert physical name for mapped view only if the full
physical table name is different than the full table name
// Otherwise, we end up with a self-referencing link and
then cannot ever drop the view.
if (viewType != ViewType.MAPPED
- ||
!physicalNames.get(0).getString().equals(SchemaUtil.getTableName(schemaName,
tableName))) {
+ ||
!physicalNames.get(0).getString().equals(SchemaUtil.getPhysicalName(schemaName,
tableName))) {
--- End diff --
can you include isNamespaceMapped as table name with schema can also be in
default namespace.
```
- ||
!physicalNames.get(0).getString().equals(SchemaUtil.getTableName(schemaName,
tableName))) {
+ ||
!physicalNames.get(0).getString().equals(SchemaUtil.getPhysicalTableName(
+ SchemaUtil.getTableNameAsBytes(schemaName,
tableName), isNamespaceMapped).getNameAsString())) {
```
---
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.
---