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 ...
随机推荐
- maven常见错误
摘要: 1.Java-maven异常-cannot be cast to javax.servlet.Filter 报错 tomcat 启动后先将tomcat/lib目录下的jar包全部读入内存,如 ...
- 自己封装的 recyclerView的 BaseAdapter,带item点击和长按事件。
第一种是把创建viewholder的步骤给子类来做. 第二种是参照陈宇明的博客,试着只暴露给子类设置holder属性的方法.(还未测试条目中控件的点击事件能否成功) 代码如下: /** * Creat ...
- 简单了解.net
.NET是 Microsoft XML Web services 平台.XML Web services 允许应用程序通过 Internet 进行通讯和共享数据,而不管所采用的是哪种操作系统.设备或编 ...
- lipo 合并target为Simulator和Device编译的静态库
进入项目对应的Build目录后,以下指令: $lipo -create Debug-iphoneos/libSalamaDeveloper.a Debug-iphonesimulator/libSal ...
- [问题2014A02] 复旦高等代数 I(14级)每周一题(第四教学周)
[问题2014A02] 求下列 \(n\) 阶行列式的值, 其中 \(a_i\neq 0\,(i=1,2,\cdots,n)\): \[ |A|=\begin{vmatrix} 0 & a_ ...
- XML与JSON的转换
-(void)test { //XML文本范例 NSString *testXMLString = @"Cake0.55RegularChocolateBluebe ...
- vs2012编译Qwt
主题:vs2012编译Qwt ------------------------------------------------------------------------- 参照网络地址: htt ...
- 基于gulp 的前端自动化构建方案总结
一,基础篇 先安装nodejs 使用淘宝镜像安装tnpm 安装 cnpm 插件:npm install -g cnpm --registry=https://registry.npm.taobao.o ...
- zoj3430Detect the Virus(ac自动机)
链接 解码之后是跟普通的自动机求解一下的,只不过解码比较恶心,512=>N>=0 ,所以不能用字符串来存,需要转换成整数来做. #include <iostream> #inc ...
- RMAN的恢复篇
Oracle 数据库的恢复实际上包含了两个概念:数据库修复(RESTORE)与数据库恢复(RECOVER): 数据库修复:是指利用备份的数据库文件来替换已经损坏的数据库文件或者将其恢复到一个新的位置. ...