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



##########
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:
       This method by default returns `null` if it can't find anything. So 
maybe change this to `if (schema != null) {` here.




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


Reply via email to