bigquery_migration 0.2.0.pre1 → 0.2.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 619d8bcaa5756501fbe6e9a07726343024ff0bc5
4
- data.tar.gz: 931f57eb0f381ad91a1cd2ab6c39c9fe645aad35
3
+ metadata.gz: c8e9acd181e25a8e935168d4a99213c52bca11c9
4
+ data.tar.gz: a5f4f71c2a04fbc453656bff29b9b961d56b16dd
5
5
  SHA512:
6
- metadata.gz: cfd6a985186c5cb426a3f09796764cfda1697aeeb21a531260062ec37b38b3ed835460d9ecf07abda544ddd7edc072252efbf1e79281d5c8ba8a2e4e0a9f0c2c
7
- data.tar.gz: 789b6000dc10f4ea0554243bbff1158505831768595b1e6bd85b9226731f3e950ff61bc431ac404293589b8c3b962ad4e7e0affbbee1d4eba863e0bd88af0bb3
6
+ metadata.gz: d4cbc58db0ca399e5edae6fc21d9fab708db9edebf0e9fadb8f3fdf7f3098d595de662fb92355bbea0bebffa1ffab0e426f89fc7708226917ede3832378572f4
7
+ data.tar.gz: 3fa2a4a0313eebca630b9648e8a8c5b747ea596ccfc57aa5e477ad5cbb935bb32c626128df8b1f71d9b7a09752ee5f18c02e7e86032eaea6c39894947321c97a
@@ -32,8 +32,8 @@ class BigqueryMigration
32
32
  # This method called recursively.
33
33
  # So, rows must be a hash and hash has key f:.
34
34
  private def calculate_repeated_count(columns: nil, rows: nil)
35
- logger.info { "calculate_repeated_count(columns: #{columns}, rows: #{rows})" }
36
- return [1] if rows.nil?
35
+ # logger.info { "calculate_repeated_count(columns: #{columns}, rows: #{rows})" }
36
+ return [1] if (rows.nil? || rows.empty?)
37
37
  validate_rows!(rows)
38
38
  rows[:f].zip(columns).map do |row, column|
39
39
  if column[:type] == 'RECORD'
@@ -63,9 +63,9 @@ class BigqueryMigration
63
63
  # This method called recursively.
64
64
  # So, rows must be a hash and hash has key f:.
65
65
  private def generate_value(columns: nil, rows: nil, count: nil)
66
- logger.info { "generate_value(columns: #{columns}, rows: #{rows}, count: #{count})" }
66
+ # logger.info { "generate_value(columns: #{columns}, rows: #{rows}, count: #{count})" }
67
67
  value = []
68
- return value if rows.nil?
68
+ return [nil] if (rows.nil? || rows.empty?)
69
69
  validate_rows!(rows)
70
70
  rows[:f].zip(columns).each do |row, column|
71
71
  if column[:type] == 'RECORD'
@@ -1,3 +1,3 @@
1
1
  class BigqueryMigration
2
- VERSION = "0.2.0.pre1"
2
+ VERSION = "0.2.0.pre2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigquery_migration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.pre1
4
+ version: 0.2.0.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-03 00:00:00.000000000 Z
11
+ date: 2016-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client