Virtual Columns

Hive 0.8.0 provides support for two virtual columns:

One is INPUT__FILE__NAME, which is the input file's name for a mapper task.

the other is BLOCK__OFFSET__INSIDE__FILE, which is the current global file position.

For block compressed file, it is the current block's file offset, which is the current block's first byte's file offset.

Simple Examples

select INPUT__FILE__NAME, key, BLOCK__OFFSET__INSIDE__FILE from src;

select key, count(INPUT__FILE__NAME) from src group by key order by key;

select * from src where BLOCK__OFFSET__INSIDE__FILE > 12000 order by key;

[Hive - LanguageManual] VirtualColumns的更多相关文章

  1. [Hive - LanguageManual ] Windowing and Analytics Functions (待)

    LanguageManual WindowingAndAnalytics     Skip to end of metadata   Added by Lefty Leverenz, last edi ...

  2. [HIve - LanguageManual] Hive Operators and User-Defined Functions (UDFs)

    Hive Operators and User-Defined Functions (UDFs) Hive Operators and User-Defined Functions (UDFs) Bu ...

  3. [Hive - LanguageManual] Import/Export

    LanguageManual ImportExport     Skip to end of metadata   Added by Carl Steinbach, last edited by Le ...

  4. [Hive - LanguageManual] DML: Load, Insert, Update, Delete

    LanguageManual DML Hive Data Manipulation Language Hive Data Manipulation Language Loading files int ...

  5. [Hive - LanguageManual] Alter Table/Partition/Column

    Alter Table/Partition/Column Alter Table Rename Table Alter Table Properties Alter Table Comment Add ...

  6. Hive LanguageManual DDL

    hive语法规则LanguageManual DDL SQL DML 和 DDL 数据操作语言 (DML) 和 数据定义语言 (DDL) 一.数据库 增删改都在文档里说得也很明白,不重复造车轮 二.表 ...

  7. [Hive - LanguageManual ] ]SQL Standard Based Hive Authorization

    Status of Hive Authorization before Hive 0.13 SQL Standards Based Hive Authorization (New in Hive 0. ...

  8. [Hive - LanguageManual] Hive Concurrency Model (待)

    Hive Concurrency Model Hive Concurrency Model Use Cases Turn Off Concurrency Debugging Configuration ...

  9. [Hive - LanguageManual ] Explain (待)

    EXPLAIN Syntax EXPLAIN Syntax Hive provides an EXPLAIN command that shows the execution plan for a q ...

随机推荐

  1. shell编程基础(4)case 与 function

    case case语句不用多说和c++里一样,用作选择,但是linux的case语句在语法上和c++还是有些不同的. ###########This is program test the Case# ...

  2. OPENGL画图类库

    链接  https://www.opengl.org/wiki/Language_bindings http://blog.csdn.net/luozhuang/article/details/421 ...

  3. C#画图解决闪烁问题

    导致画面闪烁的关键原因分析:       一.绘制窗口由于大小位置状态改变进行重绘操作时,绘图窗口内容或大小每改变一次,都要调用Paint事件进行重绘操作,该操作会使画面重新刷新一次以维持窗口正常显示 ...

  4. OEM status|start|stop

    OEM一旦建立以后,LINUX的主机名(hosts)就不要去改变. [oracle@redhat4 ~]$ emctl start dbconsoleOC4J Configuration issue. ...

  5. oracle .bash_profile

    [oracle@redhat4 ~]$ vi .bash_profile # .bash_profile # Get the aliases and functionsif [ -f ~/.bashr ...

  6. eclipse导入javax.servlet.*的方法

    1.下载web应用服务器tomact,网址http://tomcat.apache.org/download-80.cgi 这个根据自己系统进行选择. 2.将其加压到电脑中 3.在eclipse中添加 ...

  7. 【Todo】【转载】ES6的学习记录

    粗略看了一遍React的内容,然后看了 ES6 的入门文章: http://es6.ruanyifeng.com/#docs/intro 通过这个链接可以查看浏览器对 ES6 的支持程度: http: ...

  8. Ext.Net学习笔记01:在ASP.NET WebForm中使用Ext.Net

    Ext.Net是一个对ExtJS进行封装了的.net控件库,可以在ASP.NET WebForm和MVC中使用.从今天开始记录我的学习笔记,这是第一篇,今天学习了如何在WebForm中使用Ext.Ne ...

  9. UVa 10870 (矩阵快速幂) Recurrences

    给出一个d阶线性递推关系,求f(n) mod m的值. , 求出An-dv0,该向量的最后一个元素就是所求. #include <iostream> #include <cstdio ...

  10. Informatica 9.1常用查询

    select a.mapping_name, a.mapping_id, a.subject_id, a.is_valid, b.pv_precision, c.pv_value, b.pv_defa ...