Skip to content

Conversation

@xuchuanqiu
Copy link
Contributor

JDBC Catalog:Change the escape character "" to "!", to solve the problem that in MySQL the escaped '' must be written as '\';

JDBC Catalog:Change the escape character "\" to "!", to solve the problem that in MySQL the escaped '\' must be written as '\\';
@github-actions github-actions bot added the core label Jan 4, 2024
@nastra
Copy link
Contributor

nastra commented Apr 16, 2024

fixes #10056

@xuchuanqiu can you rebase this one please to fix the merge conflicts?

+ " = ? OR "
+ TABLE_NAMESPACE
+ " LIKE ? ESCAPE '\\' "
+ " LIKE ? ESCAPE '!' "
Copy link
Member

Choose a reason for hiding this comment

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

Does it work with any backend like PostgreSQL ?

Copy link
Member

Choose a reason for hiding this comment

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

Tested without problem with PostgreSQL

Copy link
Member

@jbonofre jbonofre left a comment

Choose a reason for hiding this comment

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

I didn't know this ! notation. I will test on PostgreSQL and MySQL to be sure it works with these vendors.

@jbonofre
Copy link
Member

If @xuchuanqiu doesn't have the bandwidth, I can help on this one. If it works with MySQL, SQLlite and PostgreSQL, it's a nice fix to include in Iceberg 1.5.1.

@amogh-jahagirdar amogh-jahagirdar self-requested a review April 17, 2024 13:24
@amogh-jahagirdar amogh-jahagirdar added this to the Iceberg 1.5.1 milestone Apr 17, 2024
@amogh-jahagirdar
Copy link
Contributor

I've added this to the 1.5.1 milestone. If we validate that it works on all the backends as expected, then I think we can include in the patch release (we'll also discuss this in the community sync today).

@jbonofre
Copy link
Member

I tested with MySQL 8.3.0 (both server and JDBC driver) and I confirm the ! notation works.
I used MySQL 8.3.0 docker image, create the schema and updated the GET_NAMESPACE_SQL statement.
No SQL statement error, and the namespace is retrieved without problem.

I'm doing the same test with PostgreSQL now, to be sure the same statement works fine with PostgreSQL.

@jbonofre
Copy link
Member

I also tested with PostgreSQL 42.7.3 and it works fine.

In order to fix the conflict, I propose to create a clean PR.

@jbonofre
Copy link
Member

Replaced by #10167 to merge the conflict.

@amogh-jahagirdar
Copy link
Contributor

Thanks @jbonofre ! Discussed offline, we'll ensure that @xuchuanqiu gets co-authorship/attribution. Thanks @xuchuanqiu

@amogh-jahagirdar
Copy link
Contributor

I'll close this since #9407 has been merged, thanks @xuchuanqiu @jbonofre !

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.

4 participants