codope commented on code in PR #11975:
URL: https://github.com/apache/hudi/pull/11975#discussion_r1774661761


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/RecordLevelIndexSupport.scala:
##########
@@ -91,6 +93,23 @@ class RecordLevelIndexSupport(spark: SparkSession,
   def isIndexAvailable: Boolean = {
     metadataConfig.isEnabled && 
metaClient.getTableConfig.getMetadataPartitions.contains(HoodieTableMetadataUtil.PARTITION_NAME_RECORD_INDEX)
   }
+
+  /**
+   * Returns true if the query type is supported by the index.
+   */
+  override def supportsQueryType(options: Map[String, String]): Boolean = {
+    options.get(TIME_TRAVEL_AS_OF_INSTANT.key)
+      .fold {
+        // if the as.of.instant is None, check QUERY_TYPE is snapshot
+        options.getOrElse(QUERY_TYPE.key, 
QUERY_TYPE.defaultValue).equalsIgnoreCase(HoodieTableQueryType.SNAPSHOT.name)
+        false

Review Comment:
   good catch, removed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to