Commit 1dfcd8f
[SPARK-52404][SQL] Give a separate error class to failures in
### What changes were proposed in this pull request?
We add a new error class to cover a distinct portion of the `INTERNAL_ERROR` class, that is, a situation where an attribute reference in the query plan cannot be bound. The error massage, once hardcoded in `BoundAttribute.scala` is now moved the the JSON file.
### Why are the changes needed?
The error messages should be stored in the JSON files, and not hard-coded into the source. Failures in `BoundAttribute.scala` are a distinct and don't share much with the other `INTERNAL_ERROR` failures, yet they are currently bundled under the same error class.
### Does this PR introduce _any_ user-facing change?
Yes. Change of error class.
### How was this patch tested?
New test is added.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes apache#51066 from ala/attr_not_found.
Authored-by: ala <[email protected]>
Signed-off-by: Herman van Hovell <[email protected]>BindReferences
1 parent 8c3194f commit 1dfcd8f
File tree
3 files changed
+64
-2
lines changed- common/utils/src/main/resources/error
- sql/catalyst/src
- main/scala/org/apache/spark/sql/catalyst/expressions
- test/scala/org/apache/spark/sql/catalyst/expressions
3 files changed
+64
-2
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2227 | 2227 | | |
2228 | 2228 | | |
2229 | 2229 | | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
2230 | 2236 | | |
2231 | 2237 | | |
2232 | 2238 | | |
| |||
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
97 | 110 | | |
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments