[Query] BigQuery: inform whether result is from cache or execution

Description

DASC - Story default text according to the team DoR (Definition of Ready)

01 - PERSON OF CONTACT (WHO CAN ANSWER QUESTIONS):
02 - STORY AS A <PERSONA>, I [WANT TO] <NEED>, [SO THAT] <GOAL>:
03 - PROBLEM (CURRENT SCENARIO OR PAIN TO BE RESOLVED?):

  • when a SQL query is executed repeatedly, BigQuery manages a cache to speed up the results for the user
  • without knowing if that query was executed or just retrieved from a cache, we try to guide the user to its execution plan, but if was not executed, no plan can be exhibited
  • if every query result also returns a property saying if the query came from cache or not, we would be able to avoid user frustration after the click on “execution plan”, and just hide or disable the button, or even add a message saying the results came from BQ cache
  • we need first the team Data providing this information, then core BE adding to its proxy endpoints

04 - WHO CAN USE THIS FEATURE (USER ROLES):
05 - ACTIVITY DIAGRAM (ACTIVITY DIAGRAM LINK AND IMAGE):
06 - STEPS (ACTIONS TO BE PERFORMED LINKING TO SCREENSHOTS):
07 - ALTERNATIVE STEPS:
08 - ASSETS (RELEVANT DOCUMENTATION LINKS, JSON EXAMPLES, ETC):
09 - ACCEPTANCE CRITERIA / EXPECTED BEHAVIOR:

  • on the queryResults endpoint (query_sync and query_polling) add a property to inform whether the results came from cache or a new execution