HiveQL(HiveSQL)跟普通SQL最大区别一直使用PIG,而今也需要兼顾HIVE
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的更多相关文章
- pl/sql和sql的区别
源地址:https://zhidao.baidu.com/question/187511430.html 1 sql(数据定义语言) 和PL/Sql的区别:答:SQL是结构化查询语言,比较接近自然语言 ...
- MongoDB 1: NoSQL 和 SQL的区别
导读:本篇博客,主要是结合自己在项目中的使用,简单的阐述一下NoSQL和SQL的区别.那么,根据自己的应用,NoSQL这边,选择的是MongoDB(Redis虽然也是,但属于内存存储,这里不予说明). ...
- 为什么使用Nosql:Nosql和SQL的区别
1.概念: SQL(Structured Query Language)数据库,指关系型数据库.主要代表:SQL Server.Oracle.MySQL.PostgreSQL. NoSQL(Not O ...
- My SQL 和SQL Server区别
MySQL 与SQL Server区别 今天了解了二者区别,整理网上查阅资料,总结列举如下: MSSQL == SQL server 是sybase与微软合作时期的产物. 对于程序开发人员而言,目前使 ...
- 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 ...
- 86标准SQL与92标准SQL用法区别
86标准SQL与92标准SQL用法区别 在开发Oracle 9i时, 数据库还时间了ANSL SQL/92标准的链接语法, 在书中建议在使用Oracle 9i及更高版本时,应该使用SQL/92标准的语 ...
- HQL和SQL的区别
1.hql与sql的区别 sql 面向数据库表查询 hql 面向对象查询 hql : from 后面跟的 类名+类对象 where 后 用 对象的属性做条件 sql: from 后面跟的是表名 ...
- SQL和PL/SQL的区别
SQL和PL/SQL的区别 1. SQL是结构化查询语言,比较接近自然语言,使用SQL,只需要说干什么,不需要说怎么干.由数据定义语言.数据操纵语言.数据控制语言构成,它不面向过程,即前一条语句与后一 ...
- Unity3D C#中使用LINQ查询(与 SQL的区别)
学过SQL的一看就懂 LINQ代码很直观 但是,LINQ却又跟SQL完全不同 首先来看一下调用LINQ的代码 int[] badgers = {36,5,91,3,41,69,8}; var skun ...
随机推荐
- JQ 操作 radio、checkbox 、select
MXS&Vincene ─╄OvЁ &0000026─╄OvЁ MXS&Vincene MXS&Vincene ─╄OvЁ:今天很残酷,明天更残酷,后天很美好, ...
- 函数柯里化(Currying)示例
”函数柯里化”是指将多变量函数拆解为单变量的多个函数的依次调用, 可以从高元函数动态地生成批量的低元的函数.可以看成一个强大的函数工厂,结合函数式编程,可以叠加出很BT的能力.下面给出了两个示例,说明 ...
- Lucene学习总结
在使用Lucene前,我们先大致熟悉下Lucene的几个核心类. 核心索引类: public class IndexWriter 索引过程的中心组件,把它想象成一个可以对索引进行写操作的对象. pub ...
- linux下配置redis
安装redis 1.下载文件 wget http://download.redis.io/releases/redis-2.8.12.tar.gz 2.解压文件 tar zxvf redis-2.8 ...
- CentOS6.5 本地源搭建Ceph
拓扑图 OS: CentOS X86_64,desktop -免密码登录 -修改/etc/sysconfig/network --hostname -修改/etc/hosts/ -关闭iptabl ...
- sqlite创建表
create table bike (id ) primary key, password ));
- java使用split切割字符串的时候,注意转义字符
今天在做项目的时候发现一个奇怪的问题 File file = new File("d:\\a.txt"); BufferedReader br = new BufferedRead ...
- jquery mobile 和phonegap开发总结之三跨域加载页面
跨域加载 一要进行一定的配置见下面 $( document ).bind( "mobileinit", function() { // Make your jQuery Mobil ...
- Python之SQLAlchemy学习
alchemy 英[ˈælkəmi] 美[ˈælkəmi] n. 炼金术; 炼丹术; (改变事物.物质的)魔力(或方法) ; (事物.物质的) 神秘变化; SQLAlchemy是Python中最有名的 ...
- openfire源码修改聊天消息发送内容
/** * $RCSfile: MessageRouter.java,v $ * $Revision: 3007 $ * $Date: 2005-10-31 13:29:25 -0300 (Mon, ...