You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by GitBox <gi...@apache.org> on 2021/03/17 08:20:08 UTC

[GitHub] [metamodel] jhorcicka commented on a change in pull request #250: MM-1235: AbstractDataContext.searchColumn was fixed for situation when schema and column are equal strings

jhorcicka commented on a change in pull request #250:
URL: https://github.com/apache/metamodel/pull/250#discussion_r595797516



##########
File path: core/src/main/java/org/apache/metamodel/AbstractDataContext.java
##########
@@ -308,19 +308,17 @@ public final Column getColumnByQualifiedLabel(final String columnName) {
      * @return
      */
     private Column searchColumn(String schemaNameSearch, String columnNameOriginal, String columnNameSearch) {
-        if (columnNameSearch.startsWith(schemaNameSearch)) {
-            Schema schema = getSchemaByName(schemaNameSearch);
-            if (schema != null) {
-                String tableAndColumnPath = columnNameOriginal.substring(schemaNameSearch.length());
-
-                if (tableAndColumnPath.charAt(0) == '.') {
-                    tableAndColumnPath = tableAndColumnPath.substring(1);
-
-                    Column column = getColumn(schema, tableAndColumnPath);
-                    if (column != null) {
-                        return column;
-                    }
-                }
+        final Schema schema = getSchemaByName(schemaNameSearch);
+        if (schema == null) {

Review comment:
       OK




----------------------------------------------------------------
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:
users@infra.apache.org