Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleVersion

Prior to Hive 0.6.0, lateral view did not support the predicate push-down optimization. In Hive 0.5.0 and earlier, if you used a WHERE clause your query may not have compiled. A workaround was to add set hive.optimize.ppd=false; before your query. The fix was made in Hive 0.6.0; see https://issues.apache.org/jira/browse/HIVE-1056: Predicate push down does not work with UDTF's.

Info
titleVersion

From Hive 0.12.0, column aliases can be omitted. In this case, aliases are inherited from field names of StructObjectInspector which is returned from UTDF.

Example

Consider the following base table named pageAds. It has two columns: pageid (name of the page) and adid_list (an array of ads appearing on the page):

...

pageid

adid_list

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="a2ea884f202f9f01-2c477664-4bbf4053-bf06ab0a-58c4ee47ab08c7d361cba9d2"><ac:plain-text-body><![CDATA[

front_page

[1, 2, 3]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b6264f255b26b760-0a89d70e-40da4579-9638aae4-c74c696032a0a65e3fee3510"><ac:plain-text-body><![CDATA[

contact_page

[3, 4, 5]

]]></ac:plain-text-body></ac:structured-macro>

...

Array<int> col1

Array<string> col2

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b71a9afb77a08da9-82cb50db-426f47f1-90deb4c5-ab90d84700b51af65007269d"><ac:plain-text-body><![CDATA[

[1, 2]

[a", "b", "c"]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="314a11a0afed28b5-3ac4708c-4db24181-9427a77f-22957f2875c430726c7971dd"><ac:plain-text-body><![CDATA[

[3, 4]

[d", "e", "f"]

]]></ac:plain-text-body></ac:structured-macro>

...

int mycol1

Array<string> col2

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="433e08512dc5ba66-3172e317-45d941bd-8f109ef4-9f581aa722a56cd9f8d3d6e3"><ac:plain-text-body><![CDATA[

1

[a", "b", "c"]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="26b1026e409a19fd-40f664f7-46f64d49-8f0b8593-84089c395b2e29f080c4264d"><ac:plain-text-body><![CDATA[

2

[a", "b", "c"]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c36d6577ac9bfcac-4f4cd570-47224843-abf9966b-e2a95a1877bb58cbe2c85742"><ac:plain-text-body><![CDATA[

3

[d", "e", "f"]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="52c96457f7f9e55e-259cda9b-47394fcc-8da19aa7-47c14d459bcde61a0b837157"><ac:plain-text-body><![CDATA[

4

[d", "e", "f"]

]]></ac:plain-text-body></ac:structured-macro>

...