You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by jo...@apache.org on 2018/06/07 18:15:01 UTC

[1/2] incubator-airflow git commit: [AIRFLOW-2573] Cast BigQuery TIMESTAMP field to float

Repository: incubator-airflow
Updated Branches:
  refs/heads/master 1c8e5808d -> 016c0665d


[AIRFLOW-2573] Cast BigQuery TIMESTAMP field to float


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/f51db193
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/f51db193
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/f51db193

Branch: refs/heads/master
Commit: f51db193c37a7caadae56885bd0bca5045e33711
Parents: b8487cd
Author: Hongyi Wang <ho...@wepay.com>
Authored: Wed Jun 6 14:26:20 2018 -0700
Committer: Hongyi Wang <ho...@wepay.com>
Committed: Wed Jun 6 14:26:20 2018 -0700

----------------------------------------------------------------------
 airflow/contrib/hooks/bigquery_hook.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/f51db193/airflow/contrib/hooks/bigquery_hook.py
----------------------------------------------------------------------
diff --git a/airflow/contrib/hooks/bigquery_hook.py b/airflow/contrib/hooks/bigquery_hook.py
index bddc2ef..3fc0b37 100644
--- a/airflow/contrib/hooks/bigquery_hook.py
+++ b/airflow/contrib/hooks/bigquery_hook.py
@@ -1450,9 +1450,9 @@ def _bq_cast(string_field, bq_type):
     """
     if string_field is None:
         return None
-    elif bq_type == 'INTEGER' or bq_type == 'TIMESTAMP':
+    elif bq_type == 'INTEGER':
         return int(string_field)
-    elif bq_type == 'FLOAT':
+    elif bq_type == 'FLOAT' or bq_type == 'TIMESTAMP':
         return float(string_field)
     elif bq_type == 'BOOLEAN':
         assert string_field in set(['true', 'false'])


[2/2] incubator-airflow git commit: Merge pull request #3471 from whynick1/master

Posted by jo...@apache.org.
Merge pull request #3471 from whynick1/master


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/016c0665
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/016c0665
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/016c0665

Branch: refs/heads/master
Commit: 016c0665d7d987c9d146594c38e8e05072fde897
Parents: 1c8e580 f51db19
Author: Joy Gao <Jo...@apache.org>
Authored: Thu Jun 7 11:14:50 2018 -0700
Committer: Joy Gao <Jo...@apache.org>
Committed: Thu Jun 7 11:14:50 2018 -0700

----------------------------------------------------------------------
 airflow/contrib/hooks/bigquery_hook.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------