TDQ-9700: fix the preview query error when is hive context connection