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. ef codefirst 模型字段类型与sqlserver表字段类型对应概要

    1.sqlserver中nvarchar(50),对应EF中: [MaxLength(, ErrorMessage = "最大长度为{1}")] public string Nam ...

  2. python安装talib库

    简便安装方法 最简单的安装方式: $ pip install TA-Lib 用setup.py的方式自己安装一个源文件 $ python setup.py install 有可能遇到的问题 func. ...

  3. Delphi避免重复打开窗体

    取消自动创建窗体 Form1关键代码 implementation uses Unit2; {$R *.dfm} procedure TForm1.Button1Click(Sender: TObje ...

  4. Java中的boxing和unboxing(转)

    测试代码: System.out.println(0L == 0);//true System.out.println(((Long)0L).equals(0));//false Integer i1 ...

  5. (转)spring计划任务,springMvc计划任务,Spring@Scheduled,spring定时任务

    一.计划任务实现类 1.用@Component注解标识计划任务类,这样spring可以自动扫描 2.在方法中使用注解标识要执行的方法:@Scheduled(cron="*/30 * * * ...

  6. react 嵌套组件的通信

    在react中经常会用到的组件嵌套,如下: 图中 parent本身是一个自定义的组件,然后内部又加入了 child的自定义组件,那么这种情况,父子之间如何通信 react中在父组件里面有一个 this ...

  7. .Net拾忆:Asp.net请求管道

    w3wp.exe应该很熟悉,调试应用时候附加到进程就是这个服务:w3wp.exe和应用池相关联,每个应用池会有一个w3wp; 一.Http请求到iis应用池 IIS 5.x iis运行在inetinf ...

  8. C++ 解析json串

    首先, C++ 解析json串,需要用到第三方库(json_vc71_libmtd.lib).然后,VS2010,创建项目json_read,配置项目属性.最后,拷贝下面的代码就可以看到效果了. #i ...

  9. JavaScript-年月日转换12小时制

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  10. html2pdf后逐页固定位置盖公章

    需要通过NuGet添加Html2Pdf引用 #region 通过Html来生成pdf,测试Html样式 /// <summary> /// 通过Html来生成pdf,测试Html样式 // ...