clojure,pigpen,无法访问函数参数

rqdpfwrv  于 2021-06-25  发布在  Pig
关注(0)|答案(0)|浏览(153)

在pig/map函数中访问函数参数时遇到问题。这里有一个例子

(defn date-interval
  ([start end] (date-interval start end []))
  ([start end interval]
   (if (co/after? start end)
     interval
     (recur (co/plus start (co/days 1)) end (concat interval [start])))))

(defn open-date [start end close-date]
  (->> close-date
   (pig/map (fn [x]
              {:toto (:toto x)
               :open-date (remove (:close-date x) (date-interval start end))}))))

我想执行

(open-date start end close-date)

我们亲密的约会是Pig的工作和我得到的结果

Caused by: java.lang.RuntimeException: Unable to resolve symbol: start in this context

我不明白为什么我不能达到那个特定的值。
谢谢你的帮助
编辑
我通过改变开始和结束格式来解决问题。从org.joda.time.datetime到string。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题