-
Notifications
You must be signed in to change notification settings - Fork 40
Introduce virtual tables in Storage abstraction #3180
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
Merged
brfrn169
merged 7 commits into
master
from
introduce-virtual-tables-in-storage-abstraction
Nov 20, 2025
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
59cf736
Introduce virtual tables in Storage abstraction
brfrn169 20f476d
Fix based on feedback
brfrn169 7ae572b
Disable nagative cache in VirtualTableInfoManager
brfrn169 9a4fdd6
Fix message
brfrn169 a440e25
Fix based on feedback
brfrn169 d5693a4
Fix based on feedback
brfrn169 364d34e
Merge branch 'master' into introduce-virtual-tables-in-storage-abstra…
brfrn169 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ration-test/java/com/scalar/db/storage/jdbc/JdbcDatabaseVirtualTablesIntegrationTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package com.scalar.db.storage.jdbc; | ||
|
|
||
| import com.scalar.db.api.DistributedStorageVirtualTablesIntegrationTestBase; | ||
| import java.util.Properties; | ||
|
|
||
| public class JdbcDatabaseVirtualTablesIntegrationTest | ||
| extends DistributedStorageVirtualTablesIntegrationTestBase { | ||
|
|
||
| @Override | ||
| protected Properties getProperties(String testName) { | ||
| return JdbcEnv.getProperties(testName); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
core/src/main/java/com/scalar/db/api/VirtualTableInfo.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| package com.scalar.db.api; | ||
|
|
||
| /** | ||
| * Represents information about a virtual table, which is a view created by joining two source | ||
| * tables. | ||
| */ | ||
| public interface VirtualTableInfo { | ||
| /** | ||
| * Returns the namespace name of the virtual table. | ||
| * | ||
| * @return the namespace name of the virtual table | ||
| */ | ||
| String getNamespaceName(); | ||
|
|
||
| /** | ||
| * Returns the table name of the virtual table. | ||
| * | ||
| * @return the table name of the virtual table | ||
| */ | ||
| String getTableName(); | ||
|
|
||
| /** | ||
| * Returns the namespace name of the left source table. | ||
| * | ||
| * @return the namespace name of the left source table | ||
| */ | ||
| String getLeftSourceNamespaceName(); | ||
|
|
||
| /** | ||
| * Returns the table name of the left source table. | ||
| * | ||
| * @return the table name of the left source table | ||
| */ | ||
| String getLeftSourceTableName(); | ||
|
|
||
| /** | ||
| * Returns the namespace name of the right source table. | ||
| * | ||
| * @return the namespace name of the right source table | ||
| */ | ||
| String getRightSourceNamespaceName(); | ||
|
|
||
| /** | ||
| * Returns the table name of the right source table. | ||
| * | ||
| * @return the table name of the right source table | ||
| */ | ||
| String getRightSourceTableName(); | ||
|
|
||
| /** | ||
| * Returns the join type used to create this virtual table. | ||
| * | ||
| * @return the join type (INNER or LEFT_OUTER) | ||
| */ | ||
| VirtualTableJoinType getJoinType(); | ||
| } | ||
22 changes: 22 additions & 0 deletions
22
core/src/main/java/com/scalar/db/api/VirtualTableJoinType.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| package com.scalar.db.api; | ||
|
|
||
| /** | ||
| * The type of join to perform between two source tables of a virtual table. | ||
| * | ||
| * <p>This enum defines the types of joins that can be performed when creating a virtual table that | ||
| * combines data from two source tables. | ||
| */ | ||
| public enum VirtualTableJoinType { | ||
| /** | ||
| * An inner join returns only the rows where there is a match in both source tables based on their | ||
| * primary key. | ||
| */ | ||
| INNER, | ||
|
|
||
| /** | ||
| * A left outer join returns all rows from the left source table and the matched rows from the | ||
| * right source table. If there is no match for a left row, the right-side columns appear as | ||
| * {@code NULL}. | ||
| */ | ||
| LEFT_OUTER | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.