Add changes for presto mor queries (#1578)
Adds the neccessary changes to hudi for support of presto querying hudi merge-on-read table's realtime view. Co-authored-by: Brandon Scheller <bschelle@amazon.com>
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
package org.apache.hudi.hadoop;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.apache.hudi.hadoop.realtime.HoodieParquetRealtimeInputFormat;
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
@@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
public class TestAnnotation {
|
||||
|
||||
@Test
|
||||
public void testAnnotation() {
|
||||
public void testHoodieParquetInputFormatAnnotation() {
|
||||
assertTrue(HoodieParquetInputFormat.class.isAnnotationPresent(UseFileSplitsFromInputFormat.class));
|
||||
Annotation[] annotations = HoodieParquetInputFormat.class.getAnnotations();
|
||||
boolean found = false;
|
||||
@@ -38,4 +38,23 @@ public class TestAnnotation {
|
||||
}
|
||||
assertTrue(found);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHoodieParquetRealtimeInputFormatAnnotations() {
|
||||
assertTrue(HoodieParquetRealtimeInputFormat.class.isAnnotationPresent(UseFileSplitsFromInputFormat.class));
|
||||
assertTrue(HoodieParquetRealtimeInputFormat.class.isAnnotationPresent(UseRecordReaderFromInputFormat.class));
|
||||
Annotation[] annotations = HoodieParquetRealtimeInputFormat.class.getAnnotations();
|
||||
boolean foundFileSplitsAnnotation = false;
|
||||
boolean foundRecordReaderAnnotation = false;
|
||||
for (Annotation annotation : annotations) {
|
||||
if ("UseFileSplitsFromInputFormat".equals(annotation.annotationType().getSimpleName())) {
|
||||
foundFileSplitsAnnotation = true;
|
||||
}
|
||||
if ("UseRecordReaderFromInputFormat".equals(annotation.annotationType().getSimpleName())) {
|
||||
foundRecordReaderAnnotation = true;
|
||||
}
|
||||
}
|
||||
assertTrue(foundFileSplitsAnnotation);
|
||||
assertTrue(foundRecordReaderAnnotation);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user