1.presto 表连接查询的连接条件中不支持使用函数

比如下面的脚本在presto中运行会报错

select t1.period_start_date, t2.statistic_date
from
(select
        distinct calendar_date as period_start_date, calendar_date as period_end_date
        from
            edw_public.dim_esf_edw_pub_date
        where  calendar_date >= '${开始时间}' and calendar_date <= '${结束时间}'
) t1
left join
(select
 statistic_date
,xf_agent_id	as agent_id
  from
      edw_agents.adm_xf_edw_agents_performance_daily_report_edw_001_di
      where 1=1
 ) t2 on date(statistic_date) <= period_start_date and date(statistic_date) <= period_end_date

但是只要把连接条件中的date函数去掉则可以正常运行

select t1.period_start_date, t2.statistic_date
from
(select
        distinct calendar_date as period_start_date, calendar_date as period_end_date
        from
            edw_public.dim_esf_edw_pub_date
        where  calendar_date >= '${开始时间}' and calendar_date <= '${结束时间}'
) t1
left join
(select
 statistic_date
,xf_agent_id	as agent_id
  from
      edw_agents.adm_xf_edw_agents_performance_daily_report_edw_001_di
      where 1=1
 ) t2 on statistic_date <= period_start_date and statistic_date <= period_end_date

Presto 学习和使用笔记的更多相关文章

  1. hadoop2.5.2学习及实践笔记(二)—— 编译源代码及导入源码至eclipse

    生产环境中hadoop一般会选择64位版本,官方下载的hadoop安装包中的native库是32位的,因此运行64位版本时,需要自己编译64位的native库,并替换掉自带native库. 源码包下的 ...

  2. Python学习的个人笔记(基础语法)

    Python学习的个人笔记 题外话: 我是一个大二的计算机系的学生,这份python学习个人笔记是趁寒假这一周在慕课网,w3cschool,还有借鉴了一些博客,资料整理出来的,用于自己方便的时候查阅, ...

  3. 开始记录学习java的笔记

    今天开始记录学习java的笔记,加油

  4. 菜鸟教程之学习Shell script笔记(上)

    菜鸟教程之学习Shell script笔记 以下内容是,学习菜鸟shell教程整理的笔记 菜鸟教程之shell教程:http://www.runoob.com/linux/linux-shell.ht ...

  5. Presto 学习参考资料

    Presto 文档资料: 0.1版:Presto 0.100 Documentation 0.213版:Presto 0.213 Documentation 阿里云 presto 学习资料:https ...

  6. Presto 学习

    Presto 基础知识与概念学习可以参考这些博客: presto 0.166概述 https://www.cnblogs.com/sorco/p/7060166.html Presto学习-prest ...

  7. hadoop2.5.2学习及实践笔记(四)—— namenode启动过程源码概览

    对namenode启动时的相关操作及相关类有一个大体了解,后续深入研究时,再对本文进行补充 >实现类 HDFS启动脚本为$HADOOP_HOME/sbin/start-dfs.sh,查看star ...

  8. 深度学习Keras框架笔记之AutoEncoder类

    深度学习Keras框架笔记之AutoEncoder类使用笔记 keras.layers.core.AutoEncoder(encoder, decoder,output_reconstruction= ...

  9. 深度学习Keras框架笔记之TimeDistributedDense类

    深度学习Keras框架笔记之TimeDistributedDense类使用方法笔记 例: keras.layers.core.TimeDistributedDense(output_dim,init= ...

随机推荐

  1. 理解Python的双下划线命名(转)

    add by zhj:今天在学习SimpleHTTPServer的源代码时,看到了Python标准库SocketServer模块中有个BaseServer类,该类的__init__方法定义如下 def ...

  2. 【托业】托业(TOEIC)成绩 & 等级划分以及评分标准

    托业(TOEIC)成绩 & 等级划分以及评分标准 TOEIC全称:Test of English for International Communication(国际交流英语测评) 已通行全球 ...

  3. MongoDB的客户端管理工具--nosqlbooster 连接MongoDB服务器

    nosqlbooster的官网地址为https://nosqlbooster.com.大家如果想直接下载,可以登入下载网址https://nosqlbooster.com/downloads. 下载w ...

  4. blockdev命令 blkid命令 lsblk命令

    blockdev命令  blkid命令  lsblk命令 http://www.jb51.net/LINUXjishu/310389.html block相关的命令 这篇文章主要介绍了Linux bl ...

  5. JDBC和hibernate,mybatis的比较

    在学习使用mybatis之前,先比较下jdbc编程和hibernate编程各自的优缺点. JDBC: 我们平时使用jdbc进行编程,大致需要下面几个步骤: 1,使用jdbc编程需要连接数据库,注册驱动 ...

  6. C++ 常用算法

    http://blog.csdn.net/jgzquanquan/article/details/77185711

  7. Cartographer源码阅读(3):程序逻辑结构

    Cartographer早期的代码在进行3d制图的时候使用了UKF方法,查看现有的tag版本,可以转到0.1.0和0.2.0查看,包含kalman_filter文件夹. 文件夹中的pose_track ...

  8. 282A

    #include <iostream> #include <string> using namespace std; int main() { int n, plus, sub ...

  9. Linux 环境配置 网络端口进程命令

    网络通信命令ping 命令路径:/bin/ping 执行权限:所有用户作用:测试网络的连通性语法:ping 选项 IP地址  -c 指定发送次数    ping 命令使用的是icmp协议,不占用端口e ...

  10. Python几种数据结构内置方法的时间复杂度

    参考:https://blog.csdn.net/baoli1008/article/details/48059623 注:下文中,’n’代表容器中元素的数量,’k’代表参数的值,或者参数的数量. 1 ...