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. android第三方登陆

    实现QQ.微信.新浪微博和百度第三方登录(Android Studio) 前言: 对于大多数的APP都有第三方登录这个功能,自己也做过几次,最近又有一个新项目用到了第三方登录,所以特意总结了一下关于第 ...

  2. apache开启rewrite重写

    命令开启 sudo a2enmod rewrite sudo /etc/init.d/apache2 restart 即可开启重写,不行的话再试下下面方法 ubuntu如何开启Rewrite模块 在终 ...

  3. iOS中Block的基础用法

    本文简介 本章不会对Block做过多的实现研究.只是讲解基本的用法.纯粹基础知识.结合实际项目怎么去做举例.Block使用场景,可以在两个界面的传值,也可以对代码封装作为参数的传递等.用过GCD就知道 ...

  4. Python—I/O多路复用

    一.I/O多路复用概念: 监听多个描述符的状态,如果描述符状态改变,则会被内核修改标志位,从而被进程获取进而进行读写操作 二.select,poll,epoll select模块,提供了:select ...

  5. linux Nginx VirtualHost虚拟主机多站点设置

    linux系统CentOS7 Nginx1.9.9 一台nginx服务器同一IP被注册多个不同域名,访问不同域名到该服务器后请求不同项目 本台nginx服务器的IP地址为 192.168.155.12 ...

  6. zigbee学习之路(七):定时器3(中断方式)

    一.前言 上次我们学习了了用定时器3进行查询方式来进行溢出判断,今天我们来换一种方式,用中断方式来检测和查询定时器3的溢出. 二.原理与分析 要使用定时器3,我们必须先要配置的是T3CTL,来把定时器 ...

  7. 系统巡警 v1.2 系统行为分析神器

    系统巡警,是一款安全辅助软件,可以帮助系统维护人员或安全研究人员观察系统运行情况,包括进程启动与销毁记录.模块加载记录.线程启动与销毁记录.系统服务创建修改和删除记录.文件与文件夹的增加删除和修改记录 ...

  8. asp.net 微信支付 错误解决方案

    asp.net 微信支付 错误解决方案 在网上看到有人解决方案为: 解决方法 出现这种错误网上查出现有的原因是: 订阅号没有相关的权限 账号没有认证,没有相关的权限 那么这里遇到问题两种都不是.开发账 ...

  9. linux-ubuntu常用命令

    常用命令 cd 目录 #跳转到指定目录 cp fileName pfileName #拷贝fileName到pfilename ll #显示目录下的所有文件和目录 uname -a #查看内核版本 c ...

  10. Cheatsheet: 2015 08.01 ~ 08.31

    Java Beginner's Guide to MVC with Spring Framework Exploring the Spring Web MVC for Web Application ...