You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jackwener (via GitHub)" <gi...@apache.org> on 2023/04/23 13:17:19 UTC

[GitHub] [arrow-datafusion] jackwener commented on a diff in pull request #6097: fix: allow group by same expr in Aggregate

jackwener commented on code in PR #6097:
URL: https://github.com/apache/arrow-datafusion/pull/6097#discussion_r1174579761


##########
datafusion/common/src/dfschema.rs:
##########
@@ -217,20 +216,7 @@ impl DFSchema {
                 (None, Some(_)) | (None, None) => field.name() == name,
             })
             .map(|(idx, _)| idx);
-        match matches.next() {
-            None => Ok(None),
-            Some(idx) => match matches.next() {
-                None => Ok(Some(idx)),
-                // found more than one matches
-                Some(_) => Err(DataFusionError::Internal(format!(
-                    "Ambiguous reference to qualified field named {}.{}",
-                    qualifier
-                        .map(|q| q.to_quoted_string())
-                        .unwrap_or("<unqualified>".to_string()),
-                    quote_identifier(name)
-                ))),
-            },
-        }
+        Ok(matches.next())

Review Comment:
   it's used widely, I will try to enhance it in following PR. Thank you.



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org