| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>HiveUtilities (Drill : 1.20.0 API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="HiveUtilities (Drill : 1.20.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/HiveUtilities.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/drill/exec/store/hive/HiveTestDataGenerator.html" title="class in org.apache.drill.exec.store.hive"><span class="typeNameLink">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/drill/exec/store/hive/HiveUtilities.html" target="_top">Frames</a></li> |
| <li><a href="HiveUtilities.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.drill.exec.store.hive</div> |
| <h2 title="Class HiveUtilities" class="title">Class HiveUtilities</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.drill.exec.store.hive.HiveUtilities</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">HiveUtilities</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#HiveUtilities--">HiveUtilities</a></span>()</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#addConfToJob-org.apache.hadoop.mapred.JobConf-java.util.Properties-">addConfToJob</a></span>(org.apache.hadoop.mapred.JobConf job, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> properties)</code> |
| <div class="block">Utility method which adds give configs to <code>JobConf</code> object.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#convertPartitionType-org.apache.hadoop.hive.serde2.typeinfo.TypeInfo-java.lang.String-java.lang.String-">convertPartitionType</a></span>(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo typeInfo, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> defaultPartitionValue)</code> |
| <div class="block">Partition value is received in string format.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/drill/exec/store/hive/HiveTableWrapper.HivePartitionWrapper.html" title="class in org.apache.drill.exec.store.hive">HiveTableWrapper.HivePartitionWrapper</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#createPartitionWithSpecColumns-org.apache.drill.exec.store.hive.HiveTableWithColumnCache-org.apache.hadoop.hive.metastore.api.Partition-">createPartitionWithSpecColumns</a></span>(<a href="../../../../../../org/apache/drill/exec/store/hive/HiveTableWithColumnCache.html" title="class in org.apache.drill.exec.store.hive">HiveTableWithColumnCache</a> table, |
| org.apache.hadoop.hive.metastore.api.Partition partition)</code> |
| <div class="block">Helper method which stores partition columns in table columnListCache.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static org.apache.hadoop.hive.conf.HiveConf</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#generateHiveConf-org.apache.hadoop.hive.conf.HiveConf-java.util.Map-">generateHiveConf</a></span>(org.apache.hadoop.hive.conf.HiveConf hiveConf, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> properties)</code> |
| <div class="block">Creates HiveConf based on properties in given HiveConf and configuration properties.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static org.apache.hadoop.hive.conf.HiveConf</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#generateHiveConf-java.util.Map-">generateHiveConf</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> properties)</code> |
| <div class="block">Creates HiveConf based on given list of configuration properties.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/drill/exec/record/metadata/ColumnMetadata.html" title="interface in org.apache.drill.exec.record.metadata">ColumnMetadata</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#getColumnMetadata-org.apache.drill.exec.planner.types.HiveToRelDataTypeConverter-org.apache.hadoop.hive.metastore.api.FieldSchema-">getColumnMetadata</a></span>(<a href="../../../../../../org/apache/drill/exec/planner/types/HiveToRelDataTypeConverter.html" title="class in org.apache.drill.exec.planner.types">HiveToRelDataTypeConverter</a> dataTypeConverter, |
| org.apache.hadoop.hive.metastore.api.FieldSchema column)</code> |
| <div class="block">Converts specified <code>FieldSchema column</code> into <a href="../../../../../../org/apache/drill/exec/record/metadata/ColumnMetadata.html" title="interface in org.apache.drill.exec.record.metadata"><code>ColumnMetadata</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/drill/exec/record/metadata/ColumnMetadata.html" title="interface in org.apache.drill.exec.record.metadata">ColumnMetadata</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#getColumnMetadata-java.lang.String-org.apache.calcite.rel.type.RelDataType-">getColumnMetadata</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| org.apache.calcite.rel.type.RelDataType relDataType)</code> |
| <div class="block">Converts specified <code>RelDataType relDataType</code> into <a href="../../../../../../org/apache/drill/exec/record/metadata/ColumnMetadata.html" title="interface in org.apache.drill.exec.record.metadata"><code>ColumnMetadata</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends org.apache.hadoop.mapred.InputFormat<?,?>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#getInputFormatClass-org.apache.hadoop.mapred.JobConf-org.apache.hadoop.hive.metastore.api.StorageDescriptor-org.apache.hadoop.hive.metastore.api.Table-">getInputFormatClass</a></span>(org.apache.hadoop.mapred.JobConf job, |
| org.apache.hadoop.hive.metastore.api.StorageDescriptor sd, |
| org.apache.hadoop.hive.metastore.api.Table table)</code> |
| <div class="block">Utility method which gets table or partition <code>InputFormat</code> class.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/drill/common/types/TypeProtos.MajorType.html" title="class in org.apache.drill.common.types">TypeProtos.MajorType</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#getMajorTypeFromHiveTypeInfo-org.apache.hadoop.hive.serde2.typeinfo.TypeInfo-org.apache.drill.exec.server.options.OptionSet-">getMajorTypeFromHiveTypeInfo</a></span>(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo typeInfo, |
| <a href="../../../../../../org/apache/drill/exec/server/options/OptionSet.html" title="interface in org.apache.drill.exec.server.options">OptionSet</a> options)</code> |
| <div class="block">Obtains major type from given type info holder.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/drill/common/types/TypeProtos.MinorType.html" title="enum in org.apache.drill.common.types">TypeProtos.MinorType</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#getMinorTypeFromHivePrimitiveTypeInfo-org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo-org.apache.drill.exec.server.options.OptionSet-">getMinorTypeFromHivePrimitiveTypeInfo</a></span>(org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo primitiveTypeInfo, |
| <a href="../../../../../../org/apache/drill/exec/server/options/OptionSet.html" title="interface in org.apache.drill.exec.server.options">OptionSet</a> options)</code> |
| <div class="block">Obtains minor type from given primitive type info holder.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#getPartitionMetadata-org.apache.drill.exec.store.hive.HivePartition-org.apache.drill.exec.store.hive.HiveTableWithColumnCache-">getPartitionMetadata</a></span>(<a href="../../../../../../org/apache/drill/exec/store/hive/HivePartition.html" title="class in org.apache.drill.exec.store.hive">HivePartition</a> partition, |
| <a href="../../../../../../org/apache/drill/exec/store/hive/HiveTableWithColumnCache.html" title="class in org.apache.drill.exec.store.hive">HiveTableWithColumnCache</a> table)</code> |
| <div class="block">Wrapper around <code>MetaStoreUtils#getPartitionMetadata(org.apache.hadoop.hive.metastore.api.Partition, Table)</code> |
| which also adds parameters from table to properties returned by that method.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#getTableMetadata-org.apache.drill.exec.store.hive.HiveTableWithColumnCache-">getTableMetadata</a></span>(<a href="../../../../../../org/apache/drill/exec/store/hive/HiveTableWithColumnCache.html" title="class in org.apache.drill.exec.store.hive">HiveTableWithColumnCache</a> table)</code> |
| <div class="block">Wrapper around <code>MetaStoreUtils#getSchema(StorageDescriptor, StorageDescriptor, Map, String, String, List)</code> |
| which also sets columns from table cache to table and returns properties returned by |
| <code>MetaStoreUtils#getSchema(StorageDescriptor, StorageDescriptor, Map, String, String, List)</code>.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#hasHeaderOrFooter-org.apache.drill.exec.store.hive.HiveTableWithColumnCache-">hasHeaderOrFooter</a></span>(<a href="../../../../../../org/apache/drill/exec/store/hive/HiveTableWithColumnCache.html" title="class in org.apache.drill.exec.store.hive">HiveTableWithColumnCache</a> table)</code> |
| <div class="block">Checks if given table has header or footer.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#nativeReadersRuleMatches-org.apache.calcite.plan.RelOptRuleCall-java.lang.Class-">nativeReadersRuleMatches</a></span>(org.apache.calcite.plan.RelOptRuleCall call, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> tableInputFormatClass)</code> |
| <div class="block">Rule is matched when all of the following match: |
| |
| GroupScan in given DrillScalRel is an <a href="../../../../../../org/apache/drill/exec/store/hive/HiveScan.html" title="class in org.apache.drill.exec.store.hive"><code>HiveScan</code></a> |
| <a href="../../../../../../org/apache/drill/exec/store/hive/HiveScan.html" title="class in org.apache.drill.exec.store.hive"><code>HiveScan</code></a> is not already rewritten using Drill's native readers |
| InputFormat in table metadata and all partitions metadata contains the same value |
| No error occurred while checking for the above conditions.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#populateVector-org.apache.drill.exec.vector.ValueVector-io.netty.buffer.DrillBuf-java.lang.Object-int-int-">populateVector</a></span>(<a href="../../../../../../org/apache/drill/exec/vector/ValueVector.html" title="interface in org.apache.drill.exec.vector">ValueVector</a> vector, |
| <a href="../../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a> managedBuffer, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> val, |
| int start, |
| int end)</code> |
| <div class="block">Populates vector with given value based on its type.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#restoreColumns-org.apache.drill.exec.store.hive.HiveTableWithColumnCache-org.apache.drill.exec.store.hive.HivePartition-">restoreColumns</a></span>(<a href="../../../../../../org/apache/drill/exec/store/hive/HiveTableWithColumnCache.html" title="class in org.apache.drill.exec.store.hive">HiveTableWithColumnCache</a> table, |
| <a href="../../../../../../org/apache/drill/exec/store/hive/HivePartition.html" title="class in org.apache.drill.exec.store.hive">HivePartition</a> partition)</code> |
| <div class="block">Sets columns from table cache to table and partition.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#retrieveIntProperty-java.util.Properties-java.lang.String-int-">retrieveIntProperty</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> tableProperties, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> propertyName, |
| int defaultValue)</code> |
| <div class="block">Returns property value.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#throwUnsupportedHiveDataTypeError-java.lang.String-">throwUnsupportedHiveDataTypeError</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> unsupportedType)</code> |
| <div class="block">Generates unsupported types exception message with list of supported types |
| and throws user exception.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/store/hive/HiveUtilities.html#verifyAndAddTransactionalProperties-org.apache.hadoop.mapred.JobConf-org.apache.hadoop.hive.metastore.api.StorageDescriptor-">verifyAndAddTransactionalProperties</a></span>(org.apache.hadoop.mapred.JobConf job, |
| org.apache.hadoop.hive.metastore.api.StorageDescriptor sd)</code> |
| <div class="block">This method checks whether the table is transactional and set necessary properties in <code>JobConf</code>.<br> |
| If schema evolution properties aren't set in job conf for the input format, method sets the column names |
| and types from table/partition properties or storage descriptor.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="HiveUtilities--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>HiveUtilities</h4> |
| <pre>public HiveUtilities()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="convertPartitionType-org.apache.hadoop.hive.serde2.typeinfo.TypeInfo-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>convertPartitionType</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> convertPartitionType(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo typeInfo, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> defaultPartitionValue)</pre> |
| <div class="block">Partition value is received in string format. Convert it into appropriate object based on the type.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>typeInfo</code> - type info</dd> |
| <dd><code>value</code> - partition values</dd> |
| <dd><code>defaultPartitionValue</code> - default partition value</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>converted object</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="populateVector-org.apache.drill.exec.vector.ValueVector-io.netty.buffer.DrillBuf-java.lang.Object-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>populateVector</h4> |
| <pre>public static void populateVector(<a href="../../../../../../org/apache/drill/exec/vector/ValueVector.html" title="interface in org.apache.drill.exec.vector">ValueVector</a> vector, |
| <a href="../../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a> managedBuffer, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> val, |
| int start, |
| int end)</pre> |
| <div class="block">Populates vector with given value based on its type.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>vector</code> - vector instance</dd> |
| <dd><code>managedBuffer</code> - Drill duffer</dd> |
| <dd><code>val</code> - value</dd> |
| <dd><code>start</code> - start position</dd> |
| <dd><code>end</code> - end position</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMajorTypeFromHiveTypeInfo-org.apache.hadoop.hive.serde2.typeinfo.TypeInfo-org.apache.drill.exec.server.options.OptionSet-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMajorTypeFromHiveTypeInfo</h4> |
| <pre>public static <a href="../../../../../../org/apache/drill/common/types/TypeProtos.MajorType.html" title="class in org.apache.drill.common.types">TypeProtos.MajorType</a> getMajorTypeFromHiveTypeInfo(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo typeInfo, |
| <a href="../../../../../../org/apache/drill/exec/server/options/OptionSet.html" title="interface in org.apache.drill.exec.server.options">OptionSet</a> options)</pre> |
| <div class="block">Obtains major type from given type info holder.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>typeInfo</code> - type info holder</dd> |
| <dd><code>options</code> - session options</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>appropriate major type, null otherwise. For some types may throw unsupported exception.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMinorTypeFromHivePrimitiveTypeInfo-org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo-org.apache.drill.exec.server.options.OptionSet-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMinorTypeFromHivePrimitiveTypeInfo</h4> |
| <pre>public static <a href="../../../../../../org/apache/drill/common/types/TypeProtos.MinorType.html" title="enum in org.apache.drill.common.types">TypeProtos.MinorType</a> getMinorTypeFromHivePrimitiveTypeInfo(org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo primitiveTypeInfo, |
| <a href="../../../../../../org/apache/drill/exec/server/options/OptionSet.html" title="interface in org.apache.drill.exec.server.options">OptionSet</a> options)</pre> |
| <div class="block">Obtains minor type from given primitive type info holder.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>primitiveTypeInfo</code> - primitive type info holder</dd> |
| <dd><code>options</code> - session options</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>appropriate minor type, otherwise throws unsupported type exception</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getInputFormatClass-org.apache.hadoop.mapred.JobConf-org.apache.hadoop.hive.metastore.api.StorageDescriptor-org.apache.hadoop.hive.metastore.api.Table-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInputFormatClass</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends org.apache.hadoop.mapred.InputFormat<?,?>> getInputFormatClass(org.apache.hadoop.mapred.JobConf job, |
| org.apache.hadoop.hive.metastore.api.StorageDescriptor sd, |
| org.apache.hadoop.hive.metastore.api.Table table) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <div class="block">Utility method which gets table or partition <code>InputFormat</code> class. First it |
| tries to get the class name from given StorageDescriptor object. If it doesn't contain it tries to get it from |
| StorageHandler class set in table properties. If not found throws an exception.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>job</code> - <code>JobConf</code> instance needed incase the table is StorageHandler based table.</dd> |
| <dd><code>sd</code> - <code>StorageDescriptor</code> instance of currently reading partition or table (for non-partitioned tables).</dd> |
| <dd><code>table</code> - Table object</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addConfToJob-org.apache.hadoop.mapred.JobConf-java.util.Properties-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addConfToJob</h4> |
| <pre>public static void addConfToJob(org.apache.hadoop.mapred.JobConf job, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> properties)</pre> |
| <div class="block">Utility method which adds give configs to <code>JobConf</code> object.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>job</code> - <code>JobConf</code> instance.</dd> |
| <dd><code>properties</code> - New config properties</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getPartitionMetadata-org.apache.drill.exec.store.hive.HivePartition-org.apache.drill.exec.store.hive.HiveTableWithColumnCache-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getPartitionMetadata</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> getPartitionMetadata(<a href="../../../../../../org/apache/drill/exec/store/hive/HivePartition.html" title="class in org.apache.drill.exec.store.hive">HivePartition</a> partition, |
| <a href="../../../../../../org/apache/drill/exec/store/hive/HiveTableWithColumnCache.html" title="class in org.apache.drill.exec.store.hive">HiveTableWithColumnCache</a> table)</pre> |
| <div class="block">Wrapper around <code>MetaStoreUtils#getPartitionMetadata(org.apache.hadoop.hive.metastore.api.Partition, Table)</code> |
| which also adds parameters from table to properties returned by that method.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>partition</code> - the source of partition level parameters</dd> |
| <dd><code>table</code> - the source of table level parameters</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>properties</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="restoreColumns-org.apache.drill.exec.store.hive.HiveTableWithColumnCache-org.apache.drill.exec.store.hive.HivePartition-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>restoreColumns</h4> |
| <pre>public static void restoreColumns(<a href="../../../../../../org/apache/drill/exec/store/hive/HiveTableWithColumnCache.html" title="class in org.apache.drill.exec.store.hive">HiveTableWithColumnCache</a> table, |
| <a href="../../../../../../org/apache/drill/exec/store/hive/HivePartition.html" title="class in org.apache.drill.exec.store.hive">HivePartition</a> partition)</pre> |
| <div class="block">Sets columns from table cache to table and partition.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>table</code> - the source of column lists cache</dd> |
| <dd><code>partition</code> - partition which will set column list</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getTableMetadata-org.apache.drill.exec.store.hive.HiveTableWithColumnCache-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTableMetadata</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> getTableMetadata(<a href="../../../../../../org/apache/drill/exec/store/hive/HiveTableWithColumnCache.html" title="class in org.apache.drill.exec.store.hive">HiveTableWithColumnCache</a> table)</pre> |
| <div class="block">Wrapper around <code>MetaStoreUtils#getSchema(StorageDescriptor, StorageDescriptor, Map, String, String, List)</code> |
| which also sets columns from table cache to table and returns properties returned by |
| <code>MetaStoreUtils#getSchema(StorageDescriptor, StorageDescriptor, Map, String, String, List)</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>table</code> - Hive table with cached columns</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Hive table metadata</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="throwUnsupportedHiveDataTypeError-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>throwUnsupportedHiveDataTypeError</h4> |
| <pre>public static void throwUnsupportedHiveDataTypeError(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> unsupportedType)</pre> |
| <div class="block">Generates unsupported types exception message with list of supported types |
| and throws user exception.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>unsupportedType</code> - unsupported type</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="retrieveIntProperty-java.util.Properties-java.lang.String-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>retrieveIntProperty</h4> |
| <pre>public static int retrieveIntProperty(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> tableProperties, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> propertyName, |
| int defaultValue)</pre> |
| <div class="block">Returns property value. If property is absent, return given default value. |
| If property value is non-numeric will fail.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>tableProperties</code> - table properties</dd> |
| <dd><code>propertyName</code> - property name</dd> |
| <dd><code>defaultValue</code> - default value used in case if property is absent</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>property value</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NumberFormatException.html?is-external=true" title="class or interface in java.lang">NumberFormatException</a></code> - if property value is not numeric</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hasHeaderOrFooter-org.apache.drill.exec.store.hive.HiveTableWithColumnCache-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasHeaderOrFooter</h4> |
| <pre>public static boolean hasHeaderOrFooter(<a href="../../../../../../org/apache/drill/exec/store/hive/HiveTableWithColumnCache.html" title="class in org.apache.drill.exec.store.hive">HiveTableWithColumnCache</a> table)</pre> |
| <div class="block">Checks if given table has header or footer. |
| If at least one of them has value more then zero, method will return true.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>table</code> - table with column cache instance</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if table contains header or footer, false otherwise</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="verifyAndAddTransactionalProperties-org.apache.hadoop.mapred.JobConf-org.apache.hadoop.hive.metastore.api.StorageDescriptor-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>verifyAndAddTransactionalProperties</h4> |
| <pre>public static void verifyAndAddTransactionalProperties(org.apache.hadoop.mapred.JobConf job, |
| org.apache.hadoop.hive.metastore.api.StorageDescriptor sd)</pre> |
| <div class="block">This method checks whether the table is transactional and set necessary properties in <code>JobConf</code>.<br> |
| If schema evolution properties aren't set in job conf for the input format, method sets the column names |
| and types from table/partition properties or storage descriptor.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>job</code> - the job to update</dd> |
| <dd><code>sd</code> - storage descriptor</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="nativeReadersRuleMatches-org.apache.calcite.plan.RelOptRuleCall-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>nativeReadersRuleMatches</h4> |
| <pre>public static boolean nativeReadersRuleMatches(org.apache.calcite.plan.RelOptRuleCall call, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> tableInputFormatClass)</pre> |
| <div class="block">Rule is matched when all of the following match: |
| <ul> |
| <li>GroupScan in given DrillScalRel is an <a href="../../../../../../org/apache/drill/exec/store/hive/HiveScan.html" title="class in org.apache.drill.exec.store.hive"><code>HiveScan</code></a></li> |
| <li> <a href="../../../../../../org/apache/drill/exec/store/hive/HiveScan.html" title="class in org.apache.drill.exec.store.hive"><code>HiveScan</code></a> is not already rewritten using Drill's native readers</li> |
| <li> InputFormat in table metadata and all partitions metadata contains the same value </li> |
| <li> No error occurred while checking for the above conditions. An error is logged as warning.</li> |
| </ul></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>call</code> - rule call</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>True if the rule can be applied. False otherwise</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="generateHiveConf-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>generateHiveConf</h4> |
| <pre>public static org.apache.hadoop.hive.conf.HiveConf generateHiveConf(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> properties)</pre> |
| <div class="block">Creates HiveConf based on given list of configuration properties.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>properties</code> - config properties</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>instance of HiveConf</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="generateHiveConf-org.apache.hadoop.hive.conf.HiveConf-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>generateHiveConf</h4> |
| <pre>public static org.apache.hadoop.hive.conf.HiveConf generateHiveConf(org.apache.hadoop.hive.conf.HiveConf hiveConf, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> properties)</pre> |
| <div class="block">Creates HiveConf based on properties in given HiveConf and configuration properties.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>hiveConf</code> - hive conf</dd> |
| <dd><code>properties</code> - config properties</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>instance of HiveConf</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createPartitionWithSpecColumns-org.apache.drill.exec.store.hive.HiveTableWithColumnCache-org.apache.hadoop.hive.metastore.api.Partition-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createPartitionWithSpecColumns</h4> |
| <pre>public static <a href="../../../../../../org/apache/drill/exec/store/hive/HiveTableWrapper.HivePartitionWrapper.html" title="class in org.apache.drill.exec.store.hive">HiveTableWrapper.HivePartitionWrapper</a> createPartitionWithSpecColumns(<a href="../../../../../../org/apache/drill/exec/store/hive/HiveTableWithColumnCache.html" title="class in org.apache.drill.exec.store.hive">HiveTableWithColumnCache</a> table, |
| org.apache.hadoop.hive.metastore.api.Partition partition)</pre> |
| <div class="block">Helper method which stores partition columns in table columnListCache. If table columnListCache has exactly the |
| same columns as partition, in partition stores columns index that corresponds to identical column list. |
| If table columnListCache hasn't such column list, the column list adds to table columnListCache and in partition |
| stores columns index that corresponds to column list.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>table</code> - hive table instance</dd> |
| <dd><code>partition</code> - partition instance</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>hive partition wrapper</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getColumnMetadata-java.lang.String-org.apache.calcite.rel.type.RelDataType-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getColumnMetadata</h4> |
| <pre>public static <a href="../../../../../../org/apache/drill/exec/record/metadata/ColumnMetadata.html" title="interface in org.apache.drill.exec.record.metadata">ColumnMetadata</a> getColumnMetadata(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| org.apache.calcite.rel.type.RelDataType relDataType)</pre> |
| <div class="block">Converts specified <code>RelDataType relDataType</code> into <a href="../../../../../../org/apache/drill/exec/record/metadata/ColumnMetadata.html" title="interface in org.apache.drill.exec.record.metadata"><code>ColumnMetadata</code></a>. |
| For the case when specified relDataType is struct, map with recursively converted children |
| will be created.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - filed name</dd> |
| <dd><code>relDataType</code> - filed type</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><a href="../../../../../../org/apache/drill/exec/record/metadata/ColumnMetadata.html" title="interface in org.apache.drill.exec.record.metadata"><code>ColumnMetadata</code></a> which corresponds to specified <code>RelDataType relDataType</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getColumnMetadata-org.apache.drill.exec.planner.types.HiveToRelDataTypeConverter-org.apache.hadoop.hive.metastore.api.FieldSchema-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getColumnMetadata</h4> |
| <pre>public static <a href="../../../../../../org/apache/drill/exec/record/metadata/ColumnMetadata.html" title="interface in org.apache.drill.exec.record.metadata">ColumnMetadata</a> getColumnMetadata(<a href="../../../../../../org/apache/drill/exec/planner/types/HiveToRelDataTypeConverter.html" title="class in org.apache.drill.exec.planner.types">HiveToRelDataTypeConverter</a> dataTypeConverter, |
| org.apache.hadoop.hive.metastore.api.FieldSchema column)</pre> |
| <div class="block">Converts specified <code>FieldSchema column</code> into <a href="../../../../../../org/apache/drill/exec/record/metadata/ColumnMetadata.html" title="interface in org.apache.drill.exec.record.metadata"><code>ColumnMetadata</code></a>. |
| For the case when specified relDataType is struct, map with recursively converted children |
| will be created.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>dataTypeConverter</code> - converter to obtain Calcite's types from Hive's ones</dd> |
| <dd><code>column</code> - column to convert</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><a href="../../../../../../org/apache/drill/exec/record/metadata/ColumnMetadata.html" title="interface in org.apache.drill.exec.record.metadata"><code>ColumnMetadata</code></a> which corresponds to specified <code>FieldSchema column</code></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/HiveUtilities.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/drill/exec/store/hive/HiveTestDataGenerator.html" title="class in org.apache.drill.exec.store.hive"><span class="typeNameLink">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/drill/exec/store/hive/HiveUtilities.html" target="_top">Frames</a></li> |
| <li><a href="HiveUtilities.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |