Skip to content

Conversation

@sadikovi
Copy link
Contributor

@sadikovi sadikovi commented Oct 14, 2022

What changes were proposed in this pull request?

This PR fixes the error message when referencing a "." separated attribute that does not exist in the table. For example,

Seq((0)).toDF("the.id").select("the.id").show()

would throw an error with the invalid suggestion:

org.apache.spark.sql.AnalysisException: [UNRESOLVED_COLUMN.WITH_SUGGESTION] A column or function parameter
 with name `the`.`id` cannot be resolved. Did you mean one of the following? [`the`.`id`];

However, it should be showing the.id instead of the.id:

org.apache.spark.sql.AnalysisException: [UNRESOLVED_COLUMN.WITH_SUGGESTION] A column or function parameter
 with name `the`.`id` cannot be resolved. Did you mean one of the following? [`the.id`];

The issue is due to to toSQLId function that parses the attribute name again, after it has already been qualified. The method splits the name by dots and qualifies each individual part which is incorrect.

Why are the changes needed?

Fixes a bug in reporting attribute names for the UNRESOLVED_COLUMN.WITH_SUGGESTION error.

Does this PR introduce any user-facing change?

Yes, the user should see the correct message now when the table contains columns with "." separators.

How was this patch tested?

Existing unit tests.

@EnricoMi
Copy link
Contributor

@sadikovi you can find a few tests for this in #38256.

@sadikovi sadikovi closed this Oct 14, 2022
dongjoon-hyun pushed a commit that referenced this pull request Jan 23, 2024
### What changes were proposed in this pull request?
This pr aims to upgrade Arrow from 14.0.2 to 15.0.0, this version fixes the compatibility issue with Netty 4.1.104.Final(GH-39265).

Additionally, since the `arrow-vector` module uses `eclipse-collections` to replace `netty-common` as a compile-level dependency, Apache Spark has added a dependency on `eclipse-collections` after upgrading to use Arrow 15.0.0.

### Why are the changes needed?
The new version brings the following major changes:

Bug Fixes
GH-34610 - [Java] Fix valueCount and field name when loading/transferring NullVector
GH-38242 - [Java] Fix incorrect internal struct accounting for DenseUnionVector#getBufferSizeFor
GH-38254 - [Java] Add reusable buffer getters to char/binary vectors
GH-38366 - [Java] Fix Murmur hash on buffers less than 4 bytes
GH-38387 - [Java] Fix JDK8 compilation issue with TestAllTypes
GH-38614 - [Java] Add VarBinary and VarCharWriter helper methods to more writers
GH-38725 - [Java] decompression in Lz4CompressionCodec.java does not set writer index

New Features and Improvements
GH-38511 - [Java] Add getTransferPair(Field, BufferAllocator, CallBack) for StructVector and MapVector
GH-14936 - [Java] Remove netty dependency from arrow-vector
GH-38990 - [Java] Upgrade to flatc version 23.5.26
GH-39265 - [Java] Make it run well with the netty newest version 4.1.104

The full release notes as follows:

- https://arrow.apache.org/release/15.0.0.html

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GitHub Actions

### Was this patch authored or co-authored using generative AI tooling?
No

Closes #44797 from LuciferYang/SPARK-46718.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants