Skip to content

Commit

Permalink
Update spanner queries (#1480)
Browse files Browse the repository at this point in the history
* Updates node queries to use only GQL. This helps improve performance
for querying with filters
* Removes extra join in observation with contained in place query. After
speaking with Mingtian, he recommends adding observation to the graph to
remove additional joins. This will require updating the graph schema,
and there are some implications for write throughput, but we can
potentially explore this (can discuss more later)
* Updates some search tests (it's unclear if this is just flaky, so if
it starts to fail again, we can consider updating the test to support
potentially inconsistent ordering)
  • Loading branch information
n-h-diaz authored Dec 20, 2024
1 parent e935d5b commit 56fb9c8
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 215 deletions.
28 changes: 14 additions & 14 deletions internal/server/spanner/golden/query/search_nodes_with_type.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,13 @@
"StatisticalVariable"
]
},
{
"SubjectID": "oecd/IDD_INCACTOTAL_TOT_CURRENT_METH2011",
"Name": "Income Distribution Database: All age groups: mean disposable income (current prices), Total population, Current definition, Income definition until 2011",
"Types": [
"StatisticalVariable"
]
},
{
"SubjectID": "oecd/IDD_INCCTOTAL_WA_INCOMPARABLE_METH2012",
"Name": "Income Distribution Database: Mean disposable income (current prices), Working age population: 18-65, Previous definition - without overlap year, New income definition since 2012",
Expand All @@ -370,6 +377,13 @@
"StatisticalVariable"
]
},
{
"SubjectID": "oecd/IDD_P90P10_TOT_CURRENT_METH2012",
"Name": "Income Distribution Database: P90/P10 disposable income decile ratio, Total population, Current definition, New income definition since 2012",
"Types": [
"StatisticalVariable"
]
},
{
"SubjectID": "oecd/IDD_P90P50_TOT_INCOMPARABLE_METH2012",
"Name": "Income Distribution Database: P90/P50 disposable income decile ratio, Total population, Previous definition - without overlap year, New income definition since 2012",
Expand All @@ -391,20 +405,6 @@
"StatisticalVariable"
]
},
{
"SubjectID": "oecd/IDD_INCACTOTAL_TOT_CURRENT_METH2011",
"Name": "Income Distribution Database: All age groups: mean disposable income (current prices), Total population, Current definition, Income definition until 2011",
"Types": [
"StatisticalVariable"
]
},
{
"SubjectID": "oecd/IDD_P90P10_TOT_CURRENT_METH2012",
"Name": "Income Distribution Database: P90/P10 disposable income decile ratio, Total population, Current definition, New income definition since 2012",
"Types": [
"StatisticalVariable"
]
},
{
"SubjectID": "oecd/IMW_1EARNERC2C_2_1_0_0_0_1",
"Name": "Incomes of minimum wage earners: Couple with 2 children - partner is out of work, Family income, divided by the income of an otherwise identical family working at the average wage, Net income (family level), Full-time employees working in ISIC sectors C-K (see metadata for details), Weighted average of minimum wage amounts throughout the calendar year, No, Yes",
Expand Down
42 changes: 21 additions & 21 deletions internal/server/spanner/golden/query/search_nodes_without_type.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,13 @@
"StatisticalVariable"
]
},
{
"SubjectID": "dc/g/Household_HouseholdType-MarriedCoupleFamilyHousehold_Income_IncomeStatus-WithIncome",
"Name": "Household With Household Type = Married Couple Family Household, Income, Income Status = With Income",
"Types": [
"StatVarGroup"
]
},
{
"SubjectID": "dc/g/Household_HouseholdType-NonfamilyHousehold_Income_IncomeStatus-WithIncome",
"Name": "Household With Household Type = Nonfamily Household, Income, Income Status = With Income",
Expand Down Expand Up @@ -447,6 +454,13 @@
"StatisticalVariable"
]
},
{
"SubjectID": "oecd/IDD_INCACTOTAL_TOT_CURRENT_METH2011",
"Name": "Income Distribution Database: All age groups: mean disposable income (current prices), Total population, Current definition, Income definition until 2011",
"Types": [
"StatisticalVariable"
]
},
{
"SubjectID": "oecd/IDD_INCCTOTAL_WA_INCOMPARABLE_METH2012",
"Name": "Income Distribution Database: Mean disposable income (current prices), Working age population: 18-65, Previous definition - without overlap year, New income definition since 2012",
Expand All @@ -468,6 +482,13 @@
"StatisticalVariable"
]
},
{
"SubjectID": "oecd/IDD_P90P10_TOT_CURRENT_METH2012",
"Name": "Income Distribution Database: P90/P10 disposable income decile ratio, Total population, Current definition, New income definition since 2012",
"Types": [
"StatisticalVariable"
]
},
{
"SubjectID": "oecd/IDD_P90P50_TOT_INCOMPARABLE_METH2012",
"Name": "Income Distribution Database: P90/P50 disposable income decile ratio, Total population, Previous definition - without overlap year, New income definition since 2012",
Expand All @@ -489,27 +510,6 @@
"StatisticalVariable"
]
},
{
"SubjectID": "dc/g/Household_HouseholdType-MarriedCoupleFamilyHousehold_Income_IncomeStatus-WithIncome",
"Name": "Household With Household Type = Married Couple Family Household, Income, Income Status = With Income",
"Types": [
"StatVarGroup"
]
},
{
"SubjectID": "oecd/IDD_INCACTOTAL_TOT_CURRENT_METH2011",
"Name": "Income Distribution Database: All age groups: mean disposable income (current prices), Total population, Current definition, Income definition until 2011",
"Types": [
"StatisticalVariable"
]
},
{
"SubjectID": "oecd/IDD_P90P10_TOT_CURRENT_METH2012",
"Name": "Income Distribution Database: P90/P10 disposable income decile ratio, Total population, Current definition, New income definition since 2012",
"Types": [
"StatisticalVariable"
]
},
{
"SubjectID": "oecd/IMW_1EARNERC2C_2_1_0_0_0_1",
"Name": "Incomes of minimum wage earners: Couple with 2 children - partner is out of work, Family income, divided by the income of an otherwise identical family working at the average wage, Net income (family level), Full-time employees working in ISIC sectors C-K (see metadata for details), Weighted average of minimum wage amounts throughout the calendar year, No, Yes",
Expand Down
Loading

0 comments on commit 56fb9c8

Please sign in to comment.