Github user anoopsharma00 commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/511#discussion_r65246611
--- Diff: core/sql/optimizer/NATable.cpp ---
@@ -7308,6 +7308,16 @@ NATable * NATableDB::get(const ExtendedQualName*
key, BindWA* bindWA, NABoolean
}
}
+ // the reload cqd will be set during aqr after compiletime and runtime
+ // timestamp mismatch is detected.
+ // If set, reload hive metadata.
+ if ((cachedNATable->isHiveTable()) &&
+ (CmpCommon::getDefault(HIVE_DATA_MOD_CHECK) == DF_ON) &&
+ (CmpCommon::getDefault(TRAF_RELOAD_NATABLE_CACHE) == DF_ON))
--- End diff --
For non-hive trafodion tables, query invalidation feature detects when a
particular
table structure has changed and invalidates natable for that table only.
For hive tables, table modification detection is based on detection of
timestamp
change of the hive dirs since query invalidation feature does not apply to
hive
tables as they could be created/populated from outside of trafodion.
Also unlike traf tables, we need to know when data has changed for a
hive table as optimizer uses that information to generate data access maps.
So aqr is done when timestamp change is detected for hive data/struct dirs.
AQR granularity is at query level and NATables for all tables that are part
of the
query which is being AQR'd will be reloaded.
Tables that are not part of that query will not be reloaded.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---