-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e204ba
commit f9c9c05
Showing
100 changed files
with
1,953 additions
and
1,508 deletions.
There are no files selected for viewing
This file contains 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,78 @@ | ||
#!/bin/bash | ||
|
||
# Set error handling | ||
set -euo pipefail | ||
|
||
# Function to print error messages | ||
error() { | ||
echo "ERROR: $1" >&2 | ||
exit 1 | ||
} | ||
|
||
# Function to print status messages | ||
info() { | ||
echo "INFO: $1" | ||
} | ||
|
||
# Function to print folder paths in a consistent format | ||
print_folder() { | ||
local dir="$1" | ||
local request_file="$dir/request.json" | ||
local request_size="" | ||
|
||
# Get the size of request.json if it exists | ||
if [ -f "$request_file" ]; then | ||
request_size=$(wc -l < "$request_file") | ||
fi | ||
|
||
printf "%-60s | request.json: %3s lines\n" "$dir" "$request_size" | ||
} | ||
|
||
echo "===========================================================================" | ||
echo " MISSING RESPONSE.JSON FILES REPORT" | ||
echo "===========================================================================" | ||
echo | ||
echo "Folders containing request.json but missing response.json:" | ||
echo "-----------------------------------------------------------" | ||
|
||
# Initialize counter for missing response files | ||
missing_count=0 | ||
missing_folders=() | ||
|
||
# Find all directories containing request.json | ||
while IFS= read -r -d '' dir; do | ||
dir=$(dirname "$dir") | ||
if [ ! -f "$dir/response.json" ]; then | ||
missing_folders+=("$dir") | ||
((missing_count++)) | ||
fi | ||
done < <(find . -name "request.json" -print0) | ||
|
||
# Sort the missing folders for consistent output | ||
IFS=$'\n' sorted_folders=($(sort <<<"${missing_folders[*]}")) | ||
unset IFS | ||
|
||
# Print the sorted folders | ||
for dir in "${sorted_folders[@]}"; do | ||
print_folder "$dir" | ||
done | ||
|
||
echo | ||
echo "===========================================================================" | ||
echo "SUMMARY:" | ||
echo " - Total folders scanned: $(find . -name "request.json" | wc -l)" | ||
echo " - Folders missing response.json: $missing_count" | ||
echo "===========================================================================" | ||
|
||
# Export to file if missing folders were found | ||
if [ $missing_count -gt 0 ]; then | ||
report_file="missing_responses_report.txt" | ||
{ | ||
echo "Missing response.json files report" | ||
echo "Generated on: $(date)" | ||
echo "----------------------------------------" | ||
printf "%s\n" "${sorted_folders[@]}" | ||
} > "$report_file" | ||
echo | ||
info "Report saved to $report_file" | ||
fi |
This file contains 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,12 @@ | ||
[ | ||
{ | ||
"aggregates": { | ||
"how_many_albums": 347, | ||
"how_many_artist_ids": 347, | ||
"how_many_distinct_artist_ids": 204, | ||
"min_artist_id": 1, | ||
"max_artist_id": 275, | ||
"avg_artist_id": 121.94236311239192 | ||
} | ||
} | ||
] |
44 changes: 44 additions & 0 deletions
44
relational/query/aggregate_count_albums_plus_field/expected.json
This file contains 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,44 @@ | ||
[ | ||
{ | ||
"aggregates": { | ||
"how_many_albums": 10, | ||
"how_many_artist_ids": 10, | ||
"how_many_distinct_artist_ids": 8, | ||
"min_artist_id": 8, | ||
"max_artist_id": 15, | ||
"avg_artist_id": 11.5 | ||
}, | ||
"rows": [ | ||
{ | ||
"Title": "Out Of Exile" | ||
}, | ||
{ | ||
"Title": "BackBeat Soundtrack" | ||
}, | ||
{ | ||
"Title": "The Best Of Billy Cobham" | ||
}, | ||
{ | ||
"Title": "Alcohol Fueled Brewtality Live! [Disc 1]" | ||
}, | ||
{ | ||
"Title": "Alcohol Fueled Brewtality Live! [Disc 2]" | ||
}, | ||
{ | ||
"Title": "Black Sabbath" | ||
}, | ||
{ | ||
"Title": "Black Sabbath Vol. 4 (Remaster)" | ||
}, | ||
{ | ||
"Title": "Body Count" | ||
}, | ||
{ | ||
"Title": "Chemical Wedding" | ||
}, | ||
{ | ||
"Title": "The Best Of Buddy Guy - The Millenium Collection" | ||
} | ||
] | ||
} | ||
] |
46 changes: 46 additions & 0 deletions
46
relational/query/aggregate_count_artist_albums/expected.json
This file contains 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,46 @@ | ||
[ | ||
{ | ||
"rows": [ | ||
{ | ||
"Name": "Accept", | ||
"Albums": { | ||
"aggregates": { | ||
"how_many_albums": 2 | ||
} | ||
} | ||
}, | ||
{ | ||
"Name": "Aerosmith", | ||
"Albums": { | ||
"aggregates": { | ||
"how_many_albums": 1 | ||
} | ||
} | ||
}, | ||
{ | ||
"Name": "Alanis Morissette", | ||
"Albums": { | ||
"aggregates": { | ||
"how_many_albums": 1 | ||
} | ||
} | ||
}, | ||
{ | ||
"Name": "Alice In Chains", | ||
"Albums": { | ||
"aggregates": { | ||
"how_many_albums": 1 | ||
} | ||
} | ||
}, | ||
{ | ||
"Name": "Antônio Carlos Jobim", | ||
"Albums": { | ||
"aggregates": { | ||
"how_many_albums": 2 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] |
77 changes: 77 additions & 0 deletions
77
relational/query/aggregate_count_artist_albums_plus_field/expected.json
This file contains 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,77 @@ | ||
[ | ||
{ | ||
"rows": [ | ||
{ | ||
"Name": "Accept", | ||
"Albums": { | ||
"rows": [ | ||
{ | ||
"Title": "Balls to the Wall" | ||
}, | ||
{ | ||
"Title": "Restless and Wild" | ||
} | ||
], | ||
"aggregates": { | ||
"how_many_albums": 2 | ||
} | ||
} | ||
}, | ||
{ | ||
"Name": "Aerosmith", | ||
"Albums": { | ||
"rows": [ | ||
{ | ||
"Title": "Big Ones" | ||
} | ||
], | ||
"aggregates": { | ||
"how_many_albums": 1 | ||
} | ||
} | ||
}, | ||
{ | ||
"Name": "Alanis Morissette", | ||
"Albums": { | ||
"rows": [ | ||
{ | ||
"Title": "Jagged Little Pill" | ||
} | ||
], | ||
"aggregates": { | ||
"how_many_albums": 1 | ||
} | ||
} | ||
}, | ||
{ | ||
"Name": "Alice In Chains", | ||
"Albums": { | ||
"rows": [ | ||
{ | ||
"Title": "Facelift" | ||
} | ||
], | ||
"aggregates": { | ||
"how_many_albums": 1 | ||
} | ||
} | ||
}, | ||
{ | ||
"Name": "Antônio Carlos Jobim", | ||
"Albums": { | ||
"rows": [ | ||
{ | ||
"Title": "Warner 25 Anos" | ||
}, | ||
{ | ||
"Title": "Chill: Brazil (Disc 2)" | ||
} | ||
], | ||
"aggregates": { | ||
"how_many_albums": 2 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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,66 @@ | ||
[ | ||
{ | ||
"rows": [ | ||
{ | ||
"albums": { | ||
"rows": [ | ||
{ | ||
"title": "For Those About To Rock We Salute You" | ||
}, | ||
{ | ||
"title": "Let There Be Rock" | ||
} | ||
] | ||
}, | ||
"Albums": { | ||
"rows": [ | ||
{ | ||
"title": "For Those About To Rock We Salute You" | ||
}, | ||
{ | ||
"title": "Let There Be Rock" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"albums": { | ||
"rows": [ | ||
{ | ||
"title": "Balls to the Wall" | ||
}, | ||
{ | ||
"title": "Restless and Wild" | ||
} | ||
] | ||
}, | ||
"Albums": { | ||
"rows": [ | ||
{ | ||
"title": "Balls to the Wall" | ||
}, | ||
{ | ||
"title": "Restless and Wild" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"albums": { | ||
"rows": [ | ||
{ | ||
"title": "Big Ones" | ||
} | ||
] | ||
}, | ||
"Albums": { | ||
"rows": [ | ||
{ | ||
"title": "Big Ones" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
] |
This file contains 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,21 @@ | ||
[ | ||
{ | ||
"rows": [ | ||
{ | ||
"Name": "AC/DC" | ||
}, | ||
{ | ||
"Name": "Accept" | ||
}, | ||
{ | ||
"Name": "Aerosmith" | ||
}, | ||
{ | ||
"Name": "Alanis Morissette" | ||
}, | ||
{ | ||
"Name": "Alice In Chains" | ||
} | ||
] | ||
} | ||
] |
Oops, something went wrong.