This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new 77ca7db [nit] make schema qualifier error message in field lookup
more readable (#1079)
77ca7db is described below
commit 77ca7db5635331bb819f35e2c11936de822bd469
Author: Jiayu Liu <[email protected]>
AuthorDate: Fri Oct 8 04:59:27 2021 +0800
[nit] make schema qualifier error message in field lookup more readable
(#1079)
---
.github/workflows/rust.yml | 2 +-
datafusion/src/logical_plan/dfschema.rs | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 370b988..a07c95e 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -132,7 +132,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
- image: postgres:13
+ image: postgres:14
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: db_test
diff --git a/datafusion/src/logical_plan/dfschema.rs
b/datafusion/src/logical_plan/dfschema.rs
index 1ef8ac7..31143c4 100644
--- a/datafusion/src/logical_plan/dfschema.rs
+++ b/datafusion/src/logical_plan/dfschema.rs
@@ -159,7 +159,7 @@ impl DFSchema {
.filter(|(_, field)| match (qualifier, &field.qualifier) {
// field to lookup is qualified.
// current field is qualified and not shared between
relations, compare both
- // qualifer and name.
+ // qualifier and name.
(Some(q), Some(field_q)) => q == field_q && field.name() ==
name,
// field to lookup is qualified but current field is
unqualified.
(Some(_), None) => false,
@@ -170,7 +170,7 @@ impl DFSchema {
match matches.next() {
None => Err(DataFusionError::Plan(format!(
"No field named '{}.{}'. Valid fields are {}.",
- qualifier.unwrap_or(""),
+ qualifier.unwrap_or("<unqualified>"),
name,
self.get_field_names()
))),
@@ -179,7 +179,7 @@ impl DFSchema {
// found more than one matches
Some(_) => Err(DataFusionError::Internal(format!(
"Ambiguous reference to qualified field named '{}.{}'",
- qualifier.unwrap_or(""),
+ qualifier.unwrap_or("<unqualified>"),
name
))),
},