Skip to content

Add database name for table model CLI#14544

Merged
JackieTien97 merged 3 commits intoapache:masterfrom
liyuheng55555:Working/cli-tree-and-table
Dec 25, 2024
Merged

Add database name for table model CLI#14544
JackieTien97 merged 3 commits intoapache:masterfrom
liyuheng55555:Working/cli-tree-and-table

Conversation

@liyuheng55555
Copy link
Copy Markdown
Collaborator

@liyuheng55555 liyuheng55555 commented Dec 25, 2024

image

private static void updateUsingDatabaseIfNecessary(String database) {
if (!Objects.equals(usingDatabase, database)) {
usingDatabase = database;
if (sqlDialect != null && Model.TABLE.name().equals(sqlDialect.toUpperCase())) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what if usingDatabase is null? IOTDB_CLI_PREFIX should be IOTDB instead of "IOTDB:"

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.

OK, I've changed this part

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.

But still wondering in which case the "usingDatabase" will changed from not-null to null, seems we don't have "unuse database" statement for now

Copy link
Copy Markdown
Contributor

@OneSizeFitsQuorum OneSizeFitsQuorum left a comment

Choose a reason for hiding this comment

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

LGTM

@JackieTien97 JackieTien97 merged commit 4e76b3d into apache:master Dec 25, 2024
@liyuheng55555 liyuheng55555 deleted the Working/cli-tree-and-table branch December 25, 2024 10:36
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.

3 participants