Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Using two different hive catalogs, create the same database and table, and the final data will enter the same table #3080

Closed
1 of 2 tasks
zhongtiancai opened this issue Mar 22, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@zhongtiancai
Copy link

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version

0.7.0-incubating

Compute Engine

Flink hive-connect

Minimal reproduce step

Step 1

create catalog test;
use catalog test;
create database test_db;
use database test_db;
create table test_table;
insert data in test_table;

Step 2

create catalog test1;
use catalog test1;
create database test_db;
use database test_db;
create table test_table;
insert data in test_table;

Step 3

select * from test1.testdb.test_table;
select * from test.testdb.test_table;

What doesn't meet your expectations?

The results are different on hive hdfs://and file://.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@zhongtiancai zhongtiancai added the bug Something isn't working label Mar 22, 2024
@zhongtiancai
Copy link
Author

微信图片_20240323003433
code snippet

@zhuangchong
Copy link
Contributor

I understand that this is not a bug. You use the same Hive Metastore, you can only have a test_db database, a test_table table.

In your code example, your if Not Exist statement, your Step 2 does not really go to create a database or table.

@zhongtiancai
Copy link
Author

zhongtiancai commented Mar 25, 2024

微信图片_20240325193515
微信图片_20240325193528

@zhuangchong I use the same hive-config-dir, but with different warehouse parameters in the code. Is this situation considered the same on hive?

@zhuangchong
Copy link
Contributor

Yes, because hive has only one metadata database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants