Skip to content

Commit dd6e334

Browse files
Handle additional caching scenarios
Add bbf_version validation, exec-time cache repopulation, and rename/alter/dependency invalidation logic and tests Task: BABEL-6037 Signed-off-by: Manisha Deshpande <mmdeshp@amazon.com>
1 parent ffb844e commit dd6e334

File tree

10 files changed

+665
-120
lines changed

10 files changed

+665
-120
lines changed

contrib/babelfishpg_tsql/src/catalog.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3655,6 +3655,18 @@ rename_procfunc_update_bbf_catalog(RenameStmt *stmt)
36553655
new_record_repl_func_ext[Anum_bbf_function_ext_orig_name - 1] = true;
36563656
}
36573657

3658+
/* Invalidate cached parse tree — procedure name is embedded in the parse tree namespace stack */
3659+
/* Alternatively, if guc enabled, explore if worth looking up session cache PLtsql_HashTable for
3660+
* updated parse tree result and serialize and re-populate babelfish_function_ext's antlr_parse_tree column */
3661+
new_record_nulls_func_ext[Anum_bbf_function_ext_antlr_parse_tree_text - 1] = true;
3662+
new_record_repl_func_ext[Anum_bbf_function_ext_antlr_parse_tree_text - 1] = true;
3663+
new_record_nulls_func_ext[Anum_bbf_function_ext_antlr_parse_tree_datums - 1] = true;
3664+
new_record_repl_func_ext[Anum_bbf_function_ext_antlr_parse_tree_datums - 1] = true;
3665+
new_record_nulls_func_ext[Anum_bbf_function_ext_antlr_parse_tree_modify_date - 1] = true;
3666+
new_record_repl_func_ext[Anum_bbf_function_ext_antlr_parse_tree_modify_date - 1] = true;
3667+
new_record_nulls_func_ext[Anum_bbf_function_ext_antlr_parse_tree_bbf_version - 1] = true;
3668+
new_record_repl_func_ext[Anum_bbf_function_ext_antlr_parse_tree_bbf_version - 1] = true;
3669+
36583670
new_tuple = heap_modify_tuple(usertuple,
36593671
bbf_func_ext_dsc,
36603672
new_record_func_ext,

0 commit comments

Comments
 (0)