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 ...
随机推荐
- 报表控件NCReport教程:集成NCReport到Qt应用程序中
NCReport是一款轻量级.快速.多平台.简单易用的基于Qt toolkit的C++编写的报表解决方案,目前主要包括报表渲染库和报表设计器GUI应用程序. 但是好多使用NCReport控件的朋友都不 ...
- UBIFS 文件系统分析1 - 磁盘结构【转】
转自:http://blog.csdn.net/kickxxx/article/details/7109662 版权声明:本文为博主原创文章,未经博主允许不得转载. ubifs磁盘结构 UBIFS文件 ...
- Android中AIDL通信机制分析
一.背景 ·1.AIDL出现的原因 在android系统中,每一个程序都是运行在自己的进程中,进程之间无法进行通讯,为了在Android平台,一个进程通常不能访问另一个进程的内存空间,所以要想对话,需 ...
- Dynamics AX 2012 R2 报表部署权限错误
今天,Reinhard在 Deploy AX Reporting时,发生权限错误. 配置 ID: HOSTMSSQLSERVER 描述: HOST@MSSQLSERVER 默认值: True 报表服务 ...
- php,js清除cookie
目的通过控制cookie中的是否有莫个值实现是否跳转重定向 http方式 <?php if ($_COOKIE['test'] == 1) { echo 'have cookie test'; ...
- Uva 11090 在环中
题目链接:http://vjudge.net/contest/143318#problem/A 题意: 求平均权值最小的回路. 分析: 平均权值不可能超过最大边,二分查,然后,由于是平均权值,就可以转 ...
- CyclicBarrier和CountDownLatch的差别
CyclicBarrier和CountDownLatch都用多个线程之间的同步,共同点:同时有N个线程在 CyclicBarrier(CountDownLatch) 等待上等待时,CyclicBarr ...
- R语言基础:数组&列表&向量&矩阵&因子&数据框
R语言基础:数组和列表 数组(array) 一维数据是向量,二维数据是矩阵,数组是向量和矩阵的直接推广,是由三维或三维以上的数据构成的. 数组函数是array(),语法是:array(dadta, d ...
- HTML表格与列表
HTML表格 表格其实就是很多的小单元格,而这些小单元格很有次序的排列着,它们有很多行,很多列.这些很多行列组成的东西,就叫表格,表格是<table>标签来定义的.而<table&g ...
- python_way ,day25 CMDB_models (数据库设计)
from django.db import models from django.contrib.auth.models import User # Create your models here. ...