File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
lib/trino-parquet/src/main/java/io/trino/parquet/reader Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 3232import io .trino .spi .type .TimestampWithTimeZoneType ;
3333import io .trino .spi .type .Type ;
3434import io .trino .spi .type .VarcharType ;
35+ import jdk .incubator .vector .VectorShape ;
3536import org .apache .parquet .schema .LogicalTypeAnnotation ;
3637import org .apache .parquet .schema .LogicalTypeAnnotation .DateLogicalTypeAnnotation ;
3738import org .apache .parquet .schema .LogicalTypeAnnotation .DecimalLogicalTypeAnnotation ;
8485
8586public final class ColumnReaderFactory
8687{
87- private static final int PREFERRED_BIT_WIDTH = getVectorBitSize ();
88+ private static final int PREFERRED_BIT_WIDTH = VectorShape . preferredShape (). vectorBitSize ();
8889
8990 private final DateTimeZone timeZone ;
9091 private final boolean vectorizedDecodingEnabled ;
@@ -372,16 +373,4 @@ private static boolean isVectorizedDecodingSupported()
372373 // Graviton 2 machines return false here, whereas x86 and Graviton 3 machines return true
373374 return PREFERRED_BIT_WIDTH >= 256 ;
374375 }
375-
376- // get VectorShape bit size via reflection to avoid requiring the preview feature is enabled
377- private static int getVectorBitSize ()
378- {
379- try {
380- Class <?> clazz = Class .forName ("jdk.incubator.vector.VectorShape" );
381- return (int ) clazz .getMethod ("vectorBitSize" ).invoke (clazz .getMethod ("preferredShape" ).invoke (null ));
382- }
383- catch (Throwable e ) {
384- return -1 ;
385- }
386- }
387376}
You can’t perform that action at this time.
0 commit comments