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. Linux应用程序访问字符设备驱动详细过程【转】

    本文转载自:http://blog.csdn.net/coding__madman/article/details/51346532 下面先通过一个编写好的内核驱动模块来体验以下字符设备驱动 可以暂时 ...

  2. master page

    <?xml version="1.0"?><configuration>  <system.web>    <pages clientID ...

  3. C#:涉及DPI的高分辨率下的显示问题

    一.背景 在PC机上显示正常,在高分辨率下的Pad上,显示出现问题: 1.显示在屏幕最右端的窗体(控件)显示不出来: 2.截图时,被截图的界面字体文字变大,界面因此显示不全. 二.解决方法: 方法一: ...

  4. Java 引用传递

    按照Java的规定,Java的函数参数在传递的时候有两种方式. 对于基本类型,如int,double等作为函数参数传递时,采取的是传值方式. 对于对象,如数组.字符串等作为参数传递时,采用的是引用方式 ...

  5. 【leetcode❤python】 400. Nth Digit

    #-*- coding: UTF-8 -*- class Solution(object):    def findNthDigit(self, n):        ""&quo ...

  6. python高性能代码之多线程优化

    以常见的端口扫描器为实例 端口扫描器的原理很简单,操作socket来判断连接状态确定主机端口的开放情况. import socket def scan(port): s = socket.socket ...

  7. Java开发中经典的小实例-(100能被3整除的数打印出来)

    public class Test21 {    public static void main(String[] args) {        // TODO Auto-generated meth ...

  8. select框内容的编辑、修改、添加、删除操作

    // 添加 function col_add() { var selObj = $("#mySelect"); var value="value"; var t ...

  9. HTML 方法

    姓名输入框:<input type="text" value="默认有值"/> 密码输入框:<input type="text&qu ...

  10. 焦点问题onfocus=”this.blur()”代替方法(转)

    为了去除链接的虚线框,网上搜索到最常见的方法是onfocus=“this.blur()”,不过同时搜索到的是这会不利于盲人浏览使用页面 在淘宝ued官方博客上详细说明了解决方法,这里转了部分,完整版: ...