HiveQL(Hive SQL)跟普通SQL最大区别

  一直使用PIG,而今也需要兼顾HIVE。网上搜了点资料,感觉挺有用,这里翻译过来。翻译估计不太准确,待自己熟悉HIVE后再慢慢总结。

  * No true date/time data types, no interval types, and many missing UDFs for manipulating dates (e.g. ADD_MONTH)

  * Strict type matching without support for automatic coercion or typed literals (e.g. CASE <bigint expr> WHEN 1 THEN ... END)

  * All queries must reference a table (no 'dual' or table-less queries)

  * No session-scoped temp tables

  * No 'IN' predicate

  * No 'FIND' string search function for producing the offset to a match

  * No find/replace string functions for plain strings (i.e. not regex)

  * XPATH UDFs cannot return a string representing an entire subtree in the DOM, which prevents composition.

  * Few mechanisms for collapsing arrays to scalar types (e.g. 'join' complement of string 'split'; aggregations other than 'size' for numeric arrays; etc.)

  粗略的翻译:

  1.HiveQL没有真正的日期/时间类型,自增类型,以及操作日期和时间的一些函数如(ADD_MONTH)

  2.HiveQL有着非常严格的类型匹配,不支持类型自动转换(如不支持: CASE big_int_number WHEN 1 THEN ... END),我的理解是big int类型不可以自动帮你转换为int

  3.HiveQL只能对表进行查询,普通的SQL可以对结果集查询,如一般的嵌套查询)

  4.HiveQL没有临时表的概念

  5.HiveQL没有IN操作

  6.HiveQL对于字符串没有FIND和REPLACE函数

  7.HiveQL中的XPATH UDF不能够返回一个代表子DOM树的字符串实体,为了阻止composition.

  8.Few mechanisms for collapsing arrays to scalar types (e.g. 'join' complement of string 'split'; aggregations other than 'size' for numeric arrays; etc.)

  ===========================================================================================================================================================

  1.No windowing functions. IE, SUM(sales) OVER (PARTITION BY date). Its difficult to do a lot things common to warehousing, like a running sum, without having to write custom mappers/reducers or a UDF.

  2.No regular UNION, INTERSECT, or MINUS operators.

  3.Null values are treated differently than empty string, and are exported differently. IE, empty strings are exported as '\n' and nulls are exported as nulls. I know this isn't unique to Hive but still annoying when exporting data from Hive into another system.

  4.No hierarchical/self referencing querying. I know most distributed computing solutions can't do this, but it can be very handy.

  5.No Update or Delete statements.

  6.Haven't been able to find any kind of cost-based explain plans. Running explain plans generally just shows the path of accessing data. Useful to some degree but it would be great if it was more advanced in that it could help the user understand which steps are causing the biggest slowdowns.

  =======================================================================================================================================================================

  1. For row format delimiter for line termination, it only supports '\n'.

  2. Hive does not support the ability to run a query that select from tables in more than one database.

  3. Hive does not support sub-queries such as those connected by IN/EXISTS in the WHERE clause.

  4. Hive does not support the truncation of data from a table.

  ===========================================================================================================================================================

HiveQL(HiveSQL)跟普通SQL最大区别一直使用PIG,而今也需要兼顾HIVE的更多相关文章

  1. pl/sql和sql的区别

    源地址:https://zhidao.baidu.com/question/187511430.html 1 sql(数据定义语言) 和PL/Sql的区别:答:SQL是结构化查询语言,比较接近自然语言 ...

  2. MongoDB 1: NoSQL 和 SQL的区别

    导读:本篇博客,主要是结合自己在项目中的使用,简单的阐述一下NoSQL和SQL的区别.那么,根据自己的应用,NoSQL这边,选择的是MongoDB(Redis虽然也是,但属于内存存储,这里不予说明). ...

  3. 为什么使用Nosql:Nosql和SQL的区别

    1.概念: SQL(Structured Query Language)数据库,指关系型数据库.主要代表:SQL Server.Oracle.MySQL.PostgreSQL. NoSQL(Not O ...

  4. My SQL 和SQL Server区别

    MySQL 与SQL Server区别 今天了解了二者区别,整理网上查阅资料,总结列举如下: MSSQL == SQL server 是sybase与微软合作时期的产物. 对于程序开发人员而言,目前使 ...

  5. java.util.Date、java.sql.Date、java.sql.Time、java.sql.Timestamp区别和联系

    java.util.Date.java.sql.Date.java.sql.Time.java.sql.Timestamp区别和联系 栏目:Java基础 作者:admin 日期:2015-04-19  ...

  6. 86标准SQL与92标准SQL用法区别

    86标准SQL与92标准SQL用法区别 在开发Oracle 9i时, 数据库还时间了ANSL SQL/92标准的链接语法, 在书中建议在使用Oracle 9i及更高版本时,应该使用SQL/92标准的语 ...

  7. HQL和SQL的区别

    1.hql与sql的区别 sql 面向数据库表查询 hql 面向对象查询 hql : from 后面跟的 类名+类对象 where 后 用 对象的属性做条件 sql: from 后面跟的是表名    ...

  8. SQL和PL/SQL的区别

    SQL和PL/SQL的区别 1. SQL是结构化查询语言,比较接近自然语言,使用SQL,只需要说干什么,不需要说怎么干.由数据定义语言.数据操纵语言.数据控制语言构成,它不面向过程,即前一条语句与后一 ...

  9. Unity3D C#中使用LINQ查询(与 SQL的区别)

    学过SQL的一看就懂 LINQ代码很直观 但是,LINQ却又跟SQL完全不同 首先来看一下调用LINQ的代码 int[] badgers = {36,5,91,3,41,69,8}; var skun ...

随机推荐

  1. Silverlight 限制 规则输入(正整数或小数)的另一种“技巧”写法

    今天上午纠结一个问题很久,silverlight TextBox限制用户规则输入,要求只能输入正整数或则小数,小数点只能有且只有一个 刚开始的时候就是想直接用keyDown事件里面来解决    voi ...

  2. 161216、使用spring的DefaultResourceLoader自定义properties文件加载工具类

    import java.io.IOException; import java.io.InputStream; import java.util.NoSuchElementException; imp ...

  3. CI 框架访问 http://[::1]/yourproject/

    Chances are you have left the base url blank/* |---------------------------------------------------- ...

  4. a标签样式

    .a{            cursor:pointer;            color: blue;            text-decoration:none;        }

  5. 浙江理工2015.12校赛-F Landlocked

    Landlocked Time Limit: 5 Sec Memory Limit: 128 MB Submit: 288 Solved: 39 Description Canada is not a ...

  6. js产生随机数并加入数组

    <!doctype html> <html lang="zh-CN"> <head> <meta charset="utf-8& ...

  7. WPFの三种方式实现快捷键

    最近,对wpf添加快捷键的方式进行了整理.主要用到的三种方式如下: 一.wpf命令: 资源中添加命令 <Window.Resources> <RoutedUICommand x:Ke ...

  8. unity4.6学习Ugui中文文档-------参考-UGUI Rect Transform

    1 . Rect Transform Rect Transform 是 2D 与 3D 图形的 Transform 组件对应.它用来指定用户界面系统中的大小. 位置和旋转的控件 Properties ...

  9. FreeSWITCH中文语音包

    一.中文语音资源的获取 官方提供的资源:http://files.freeswitch.org/releases/sounds/ 自己录音 实在不行可以@我给你发一份. 二.中文资源的安装 英文资源的 ...

  10. android中的HttpURLConnection和HttpClient实现app与pc数据交互

    自学android的这几天很辛苦,但是很满足,因为每当学到一点点知识点都会觉得很开心,觉得今天是特别有意义的,可能这个就是一种莫名的热爱吧. 下面来说说今天学习的HttpURLConnection和H ...