Opened 4 years ago
Closed 4 years ago
#2314 closed defect (fixed)
updatedb script for sdoms
Reported by: | Vlad Merticariu | Owned by: | Vlad Merticariu |
---|---|---|---|
Priority: | major | Milestone: | 10.0 |
Component: | undecided | Version: | 9.8 |
Keywords: | Cc: | ||
Complexity: | Medium |
Description
rasdaman used to have a problem with updating the sdoms of collections in RASBASE after rasql update queries (https://rasdaman.org/ticket/2281).
That was fixed, however there are still collections that were updated before the fix, thus their RASBASE sdom remains incorrect. The sdom reported by rasql, however, is correct, as that one is computed from the array index.
We need an updatedb script that does the following:
- for every collection, do a rasql sdom query to get the sdom value
- check the sdom that is persisted in RASBASE for the collection
- if they are different, persist in RASBASE the sdom reported by rasql
The sdom is stored in RASBASE is stored in the RAS_DOMAINVALUES tables (1 entry for each of low and high per dimension).
A query on RASBASE that helps you understand how the sdom values are stored in RASBASE:
SELECT cols.MDDId * 512 + 1 AS oid, '[' || group_concat(dom.Low || ':' || dom.High, ',') || ']' AS sdom FROM RAS_MDDCOLLECTIONS cols INNER JOIN RAS_MDDOBJECTS mdds ON cols.MDDId=mdds.MDDId INNER JOIN RAS_DOMAINVALUES dom ON mdds.DomainId=dom.DomainId WHERE cols.MDDCollId=%d GROUP BY cols.MDDId
The query reports the sdom stored in RASBASE for the collection identified by the oid passed as %d.
Change History (2)
comment:1 by , 4 years ago
Owner: | changed from | to
---|
comment:2 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |