Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/422#discussion_r29862737
--- Diff:
tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java ---
@@ -162,18 +210,22 @@ static Column
resolveFromCurrentAndChildNode(LogicalPlan.QueryBlock block, Colum
}
/**
- * It tries to find a full qualified column name from all relations in
the current block.
+ * Lookup a column among all relations in the current block from a
column name.
+ *
+ * It assumes that <code>columnName</code> is not any qualified name.
*
* @param block The current query block
- * @param columnRef The column reference to be found
+ * @param columnName The column reference to be found
* @return The found column
*/
- static Column resolveFromAllRelsInBlock(LogicalPlan.QueryBlock block,
- ColumnReferenceExpr columnRef)
throws VerifyException {
+ static Column lookupColumnFromAllRelsInBlock(LogicalPlan.QueryBlock
block,
+ String columnName) throws
VerifyException {
+
Preconditions.checkArgument(CatalogUtil.isSimpleIdentifier(columnName));
--- End diff --
It would be nice if you add an appropriate error message for pre-condition
checking failure.
---
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.
---