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

feat sql history #1804

Merged
merged 20 commits into from
Oct 9, 2023
Merged

feat sql history #1804

merged 20 commits into from
Oct 9, 2023

Conversation

jeroiraz
Copy link
Contributor

@jeroiraz jeroiraz commented Oct 3, 2023

This PR introduces support for historical queries over physical tables (row revisions)

select * from (history of table1)

+---------------+-------------+----------------+-----------------+
| (table1._rev) | (table1.id) | (table1.title) | (table1.active) |
+---------------+-------------+----------------+-----------------+
|             2 |           1 | "title1"       | false           |
|             1 |           1 | "title1"       | true            |
|             1 |           2 | "title2"       | true            |
+---------------+-------------+----------------+-----------------+
select * from (history of table1) where _rev > 1
+---------------+-------------+----------------+-----------------+
| (table1._rev) | (table1.id) | (table1.title) | (table1.active) |
+---------------+-------------+----------------+-----------------+
|             2 |           1 | "title1"       | false           |
+---------------+-------------+----------------+-----------------+
select max(_rev), avg(_rev) from (history of table1) where not active
+---------------+---------------+
| (table1.col0) | (table1.col1) |
+---------------+---------------+
|             2 |             2 |
+---------------+---------------+

@jeroiraz jeroiraz changed the base branch from master to feat_tx_metadata October 3, 2023 12:20
@coveralls
Copy link
Collaborator

coveralls commented Oct 3, 2023

Coverage Status

coverage: 89.52% (+0.3%) from 89.249% when pulling a900b1f on feat_sql_history into 0cdf8e4 on master.

@jeroiraz jeroiraz force-pushed the feat_sql_history branch 2 times, most recently from 6cc42dd to 9d666ea Compare October 3, 2023 13:55
@jeroiraz jeroiraz changed the base branch from feat_tx_metadata to feat_store_multi_index October 4, 2023 09:33
@jeroiraz jeroiraz changed the base branch from feat_store_multi_index to master October 4, 2023 14:25
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

82.0% 82.0% Coverage
0.8% 0.8% Duplication

@jeroiraz jeroiraz merged commit 04a7c4c into master Oct 9, 2023
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