Class OrcSchemaVisitor<T>

  • Direct Known Subclasses:
    EstimateOrcAvgWidthVisitor

    public abstract class OrcSchemaVisitor<T>
    extends java.lang.Object
    Generic visitor of an ORC Schema.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterElementField​(org.apache.orc.TypeDescription element)  
      void afterField​(java.lang.String name, org.apache.orc.TypeDescription type)  
      void afterKeyField​(org.apache.orc.TypeDescription key)  
      void afterValueField​(org.apache.orc.TypeDescription value)  
      void beforeElementField​(org.apache.orc.TypeDescription element)  
      void beforeField​(java.lang.String name, org.apache.orc.TypeDescription type)  
      void beforeKeyField​(org.apache.orc.TypeDescription key)  
      void beforeValueField​(org.apache.orc.TypeDescription value)  
      java.lang.String currentFieldName()  
      protected java.lang.String[] currentPath()  
      java.lang.String elementName()  
      java.lang.String keyName()  
      T list​(org.apache.orc.TypeDescription array, T element)  
      T map​(org.apache.orc.TypeDescription map, T key, T value)  
      protected java.lang.String[] path​(java.lang.String name)  
      T primitive​(org.apache.orc.TypeDescription primitive)  
      T record​(org.apache.orc.TypeDescription record, java.util.List<java.lang.String> names, java.util.List<T> fields)  
      java.lang.String valueName()  
      static <T> T visit​(org.apache.orc.TypeDescription schema, OrcSchemaVisitor<T> visitor)  
      static <T> java.util.List<T> visitSchema​(org.apache.orc.TypeDescription schema, OrcSchemaVisitor<T> visitor)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OrcSchemaVisitor

        public OrcSchemaVisitor()
    • Method Detail

      • visitSchema

        public static <T> java.util.List<T> visitSchema​(org.apache.orc.TypeDescription schema,
                                                        OrcSchemaVisitor<T> visitor)
      • visit

        public static <T> T visit​(org.apache.orc.TypeDescription schema,
                                  OrcSchemaVisitor<T> visitor)
      • elementName

        public java.lang.String elementName()
      • keyName

        public java.lang.String keyName()
      • valueName

        public java.lang.String valueName()
      • currentFieldName

        public java.lang.String currentFieldName()
      • beforeField

        public void beforeField​(java.lang.String name,
                                org.apache.orc.TypeDescription type)
      • afterField

        public void afterField​(java.lang.String name,
                               org.apache.orc.TypeDescription type)
      • beforeElementField

        public void beforeElementField​(org.apache.orc.TypeDescription element)
      • afterElementField

        public void afterElementField​(org.apache.orc.TypeDescription element)
      • beforeKeyField

        public void beforeKeyField​(org.apache.orc.TypeDescription key)
      • afterKeyField

        public void afterKeyField​(org.apache.orc.TypeDescription key)
      • beforeValueField

        public void beforeValueField​(org.apache.orc.TypeDescription value)
      • afterValueField

        public void afterValueField​(org.apache.orc.TypeDescription value)
      • record

        public T record​(org.apache.orc.TypeDescription record,
                        java.util.List<java.lang.String> names,
                        java.util.List<T> fields)
      • list

        public T list​(org.apache.orc.TypeDescription array,
                      T element)
      • map

        public T map​(org.apache.orc.TypeDescription map,
                     T key,
                     T value)
      • primitive

        public T primitive​(org.apache.orc.TypeDescription primitive)
      • currentPath

        protected java.lang.String[] currentPath()
      • path

        protected java.lang.String[] path​(java.lang.String name)