Skip to content

[Kernel] Fix issue querying tables with spaces in the name#3291

Merged
vkorukanti merged 4 commits into
delta-io:masterfrom
vkorukanti:fixPathIssue
Jun 24, 2024
Merged

[Kernel] Fix issue querying tables with spaces in the name#3291
vkorukanti merged 4 commits into
delta-io:masterfrom
vkorukanti:fixPathIssue

Conversation

@vkorukanti

@vkorukanti vkorukanti commented Jun 21, 2024

Copy link
Copy Markdown
Collaborator

Description

(Stacked on top of #3289 and #3290 )

Currently, Kernel uses a mix of path (file system path) or URI (in string format) in API interfaces, which causes confusion and bugs.

Context:
Path refers to a file system path which could have some characters that should be escaped when converted to URI
E.g. path: s3:/bucket/path to file/, URI for the same path: s3:/bucket/path%20to%20file/

Make it uniform everywhere to just use the paths (file system path).

How was this patch tested?

Additional tests with table path containing spaces.

@vkorukanti vkorukanti requested review from allisonport-db and scottsand-db and removed request for scottsand-db June 21, 2024 18:45

/**
* Escapes the given string to be used as a partition value in the path. Basically this escapes
* - characters that can't be in a file path. E.g. `a\nb` will be escaped to `a%0Ab`. -

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's up with the - usage in this comment? is it a dot job? the "-" literal character?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto-format. changed it to use the proper lists<ul>

* <li><ul>
* <li>name: {@code path}, type: {@code string}, description: location of the file.</li>
* <li>name: {@code path}, type: {@code string}, description: location of the file.
* The path is a URI as specified by RFC 2396 URI Generic Syntax, which needs to be decoded

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the input to Table.forPath also be a String that represents a URI? Have we updated that documentation?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not at the moment, and we can't change that. If we want to take URI as an input we should be explicit about and and it should be another API, something like Table.forURI(URI tableURI).

The path here comes from Delta Log and stored as a URI in Delta Log according to the protocol. The name is path but it is actually a URI. Just updating the documentation to reflect that.

Before the next release, I will have a design decision to change the path string to URI everywhere else (basically in the Engine interfaces). Until then this is the fix.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for explaining!

@vkorukanti vkorukanti merged commit 05e647a into delta-io:master Jun 24, 2024
@vkorukanti vkorukanti deleted the fixPathIssue branch July 12, 2024 19:50
vkorukanti added a commit to vkorukanti/delta that referenced this pull request Aug 30, 2024
…3291)

## Description
Currently, Kernel uses a mix of path (file system path) or URI (in
string format) in API interfaces, which causes confusion and bugs.

Context: 
Path refers to a file system path which could have some characters that
should be escaped when converted to URI
E.g. path: `s3:/bucket/path to file/`, URI for the same path:
`s3:/bucket/path%20to%20file/`

Make it uniform everywhere to just use the paths (file system path).

## How was this patch tested?
Additional tests with table path containing spaces.
mblanco-denodo added a commit to mblanco-denodo/presto that referenced this pull request Dec 16, 2025
## Description
Upgrade delta-kernel-api and delta-kernel-defaults library to version
3.3.2

## Motivation and Context
Upgrading those libraries will make us able to support future
improvements in the connector, like support for deletion vectors, type
widening, varian type... .

## Impact
Library bug fixes from 3.2.0 and ability to support new features.
In the 3.2.1 version, this bug was fixed:
delta-io/delta#3291
so this previous bugfix has been undone as it is not needed anymore:
prestodb#26397

## Test Plan
There already exist unit tests. Since this is only a library version
upgrade, passing the unit tests should be our target.

## Release Notes
```
== NO RELEASE NOTE ==
```
mblanco-denodo added a commit to mblanco-denodo/presto that referenced this pull request Dec 17, 2025
## Description
Upgrade delta-kernel-api and delta-kernel-defaults library to version
3.3.2

## Motivation and Context
Upgrading those libraries will make us able to support future
improvements in the connector, like support for deletion vectors, type
widening, varian type... .

## Impact
Library bug fixes from 3.2.0 and ability to support new features.
In the 3.2.1 version, this bug was fixed:
delta-io/delta#3291
so this previous bugfix has been undone as it is not needed anymore:
prestodb#26397

## Test Plan
There already exist unit tests. Since this is only a library version
upgrade, passing the unit tests should be our target.

## Release Notes
```
== NO RELEASE NOTE ==
```
mblanco-denodo added a commit to mblanco-denodo/presto that referenced this pull request Dec 18, 2025
## Description
Upgrade delta-kernel-api and delta-kernel-defaults library to version
3.3.2

## Motivation and Context
Upgrading those libraries will make us able to support future
improvements in the connector, like support for deletion vectors, type
widening, varian type... .

## Impact
Library bug fixes from 3.2.0 and ability to support new features.
In the 3.2.1 version, this bug was fixed:
delta-io/delta#3291
so this previous bugfix has been undone as it is not needed anymore:
prestodb#26397

## Test Plan
There already exist unit tests. Since this is only a library version
upgrade, passing the unit tests should be our target.

## Release Notes
```
== NO RELEASE NOTE ==
```
hantangwangd pushed a commit to prestodb/presto that referenced this pull request Dec 25, 2025
…26814)

## Description
Upgrade delta-kernel-api and delta-kernel-defaults library to version
3.3.2

## Motivation and Context
Upgrading those libraries will make us able to support future
improvements in the connector, like support for deletion vectors, type
widening, variant type... .

## Impact
Library bug fixes from 3.2.0 and ability to support new features. In the
3.2.1 version, this bug was fixed:
delta-io/delta#3291
so this previous bugfix has been undone as it is not needed anymore:
#26397

## Test Plan
There already exist unit tests. Since this is only a library version
upgrade, passing the unit tests should be our target.

## Release Notes
```
== NO RELEASE NOTE ==
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants