Comments (2)
SQL query for common tag naming schemes (219,384 records):
SELECT *
FROM (SELECT *,
SPLIT_PART(artifactid, '-', 1) AS p1,
SPLIT_PART(artifactid, '-', 2) AS p2,
SPLIT_PART(artifactid, '-', 3) AS p3,
SPLIT_PART(artifactid, '-', 4) AS p4,
SPLIT_PART(artifactid, '-', 5) AS p5
FROM tags) subquery
WHERE LOWER(tag_name) IN (
LOWER(version),
LOWER(artifactid || '-' || version),
LOWER('version-' || version),
LOWER('v' || version),
LOWER('v.' || version),
LOWER('release-' || version),
LOWER('release-v' || version),
LOWER('release_' || version),
LOWER('release_v' || version),
LOWER('release/' || version),
LOWER('release/v' || version),
LOWER('releases/' || version),
LOWER('rel-' || version),
LOWER('rel_' || version),
LOWER('rel_v' || version),
LOWER('rel/' || version),
LOWER('rel/v' || version),
LOWER('r' || version),
LOWER('r.' || version),
LOWER('project-' || version),
LOWER(version || '-release'),
LOWER(version || '.release'),
LOWER('v' || version || '.release'),
LOWER(version || '.final'),
LOWER(version || '-final'),
LOWER( 'v' || version || '-final'),
LOWER('tag-' || version),
LOWER('tag' || version),
-- Complex
LOWER(p1 || '-' || version),
LOWER(p1 || '-v' || version),
LOWER(p2 || '-' || version),
LOWER(p2 || '-v' || version),
LOWER(p3 || '-' || version),
LOWER(p3 || '-v' || version),
LOWER(p4 || '-' || version),
LOWER(p4 || '-v' || version),
LOWER(p5 || '-' || version),
LOWER(p5 || '-v' || version),
LOWER(p1 || '-' || p2 || '-' || version),
LOWER(p1 || '-' || p2 || '-v' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-v' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || p4 || '-' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || p4 || '-v' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || p4 || '-' || p5 || '-' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || p4 || '-' || p5 || '-v' || version)
);
PS. Use LOWER() on both sides to make it case insensitive
Complex formats:
- 1st syllable in artifactid + version (15,858 records)
jinq-jpa-test,1.8.33 -> jinq-1.8.33
pivot4j-core,0.9 -> pivot4j-0.9
- 2nd syllable in artifactid + version (424 records)
maven-enforcer-plugin,3.1.0 -> enforcer-3.1.0
apache-karaf,4.0.0.M1 -> karaf-4.0.0.M1
- 3rd syllable in artifactid + version (39 records)
vertx-vaadin-flow,18.0.0 -> flow-18.0.0
etsi-xades-jaxb,2.0.1 -> jaxb-2.0.1
- 4th syllable in artifactid + version (29 records)
java-client-testing-cucumber,1.0.0-rc1 -> cucumber-1.0.0-rc1
cloudlink-enterprise-sdk-javabase,1.1.0 -> javabase-1.1.0
Also permutations of the artifactid up to 5 words eg.
artifactid: this-is-an-artifact-id, version: 2.1
- this-2.1
- this-is-2.1
- this-is-an-2.1
- this-is-an-artifact-2.1
etc
from mavensecrets.
Deletion Queries
Delete from builds table
DELETE FROM builds b USING (SELECT *
FROM (SELECT *,
SPLIT_PART(artifactid, '-', 1) AS p1,
SPLIT_PART(artifactid, '-', 2) AS p2,
SPLIT_PART(artifactid, '-', 3) AS p3,
SPLIT_PART(artifactid, '-', 4) AS p4,
SPLIT_PART(artifactid, '-', 5) AS p5
FROM tags) s1
WHERE LOWER(tag_name) NOT IN (
LOWER(version),
LOWER(artifactid || '-' || version),
LOWER('version-' || version),
LOWER('v' || version),
LOWER('v.' || version),
LOWER('release-' || version),
LOWER('release-v' || version),
LOWER('release_' || version),
LOWER('release_v' || version),
LOWER('release/' || version),
LOWER('release/v' || version),
LOWER('releases/' || version),
LOWER('rel-' || version),
LOWER('rel_' || version),
LOWER('rel_v' || version),
LOWER('rel/' || version),
LOWER('rel/v' || version),
LOWER('r' || version),
LOWER('r.' || version),
LOWER('project-' || version),
LOWER(version || '-release'),
LOWER(version || '.release'),
LOWER('v' || version || '.release'),
LOWER(version || '.final'),
LOWER(version || '-final'),
LOWER( 'v' || version || '-final'),
LOWER('tag-' || version),
LOWER('tag' || version),
-- Complex
LOWER(p1 || '-' || version),
LOWER(p1 || '-v' || version),
LOWER(p2 || '-' || version),
LOWER(p2 || '-v' || version),
LOWER(p3 || '-' || version),
LOWER(p3 || '-v' || version),
LOWER(p4 || '-' || version),
LOWER(p4 || '-v' || version),
LOWER(p5 || '-' || version),
LOWER(p5 || '-v' || version),
LOWER(p1 || '-' || p2 || '-' || version),
LOWER(p1 || '-' || p2 || '-v' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-v' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || p4 || '-' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || p4 || '-v' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || p4 || '-' || p5 || '-' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || p4 || '-' || p5 || '-v' || version)
)) s2 WHERE b.groupid = s2.groupid and b.artifactid = s2.artifactid and b.version = s2.version;
Delete from tags table
DELETE FROM tags t USING (SELECT *
FROM (SELECT *,
SPLIT_PART(artifactid, '-', 1) AS p1,
SPLIT_PART(artifactid, '-', 2) AS p2,
SPLIT_PART(artifactid, '-', 3) AS p3,
SPLIT_PART(artifactid, '-', 4) AS p4,
SPLIT_PART(artifactid, '-', 5) AS p5
FROM tags) s1
WHERE LOWER(tag_name) NOT IN (
LOWER(version),
LOWER(artifactid || '-' || version),
LOWER('version-' || version),
LOWER('v' || version),
LOWER('v.' || version),
LOWER('release-' || version),
LOWER('release-v' || version),
LOWER('release_' || version),
LOWER('release_v' || version),
LOWER('release/' || version),
LOWER('release/v' || version),
LOWER('releases/' || version),
LOWER('rel-' || version),
LOWER('rel_' || version),
LOWER('rel_v' || version),
LOWER('rel/' || version),
LOWER('rel/v' || version),
LOWER('r' || version),
LOWER('r.' || version),
LOWER('project-' || version),
LOWER(version || '-release'),
LOWER(version || '.release'),
LOWER('v' || version || '.release'),
LOWER(version || '.final'),
LOWER(version || '-final'),
LOWER( 'v' || version || '-final'),
LOWER('tag-' || version),
LOWER('tag' || version),
-- Complex
LOWER(p1 || '-' || version),
LOWER(p1 || '-v' || version),
LOWER(p2 || '-' || version),
LOWER(p2 || '-v' || version),
LOWER(p3 || '-' || version),
LOWER(p3 || '-v' || version),
LOWER(p4 || '-' || version),
LOWER(p4 || '-v' || version),
LOWER(p5 || '-' || version),
LOWER(p5 || '-v' || version),
LOWER(p1 || '-' || p2 || '-' || version),
LOWER(p1 || '-' || p2 || '-v' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-v' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || p4 || '-' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || p4 || '-v' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || p4 || '-' || p5 || '-' || version),
LOWER(p1 || '-' || p2 || '-' || p3 || '-' || p4 || '-' || p5 || '-v' || version)
)) s2 WHERE t.groupid = s2.groupid and t.artifactid = s2.artifactid and t.version = s2.version;
from mavensecrets.
Related Issues (20)
- Extract jdk version from class files
- Failure Analysis HOT 1
- Revise selection
- Categorise failure types HOT 1
- Integrate compiler_version_release field into builder to determine compiler JDK version HOT 1
- Change build command to build only relevant sub-module
- If Reproducible Central buildspec exists, still try to create buildspec and build it for comparison
- Calculate Reproducibility score
- Update docker-compose.yml to persist the db using a volume
- Update Dockerfile to include Gideon's analyzer
- Run standalone experiment to test reproducibility score
- Extract release profile from POM/Parent POM and use it in the build cmd HOT 1
- Change builder package fetch query
- Builds failing due to Maven Enforcer Plugin
- Fetch and parse Maven version from java_version_manifest_1 in builder
- Update schema of 'builds' on server
- Exclude non-Maven projects from builder
- Not all packages from RC can find their buildspec
- Build with all java versions even if no version-related fields exist for the package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mavensecrets.