소스 검색

[beeswax] Handle case where a PartitionKey includes extra ','s or ':'s

Erick Tryzelaar 11 년 전
부모
커밋
653ea10
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      apps/beeswax/src/beeswax/server/hive_server2_lib.py

+ 4 - 4
apps/beeswax/src/beeswax/server/hive_server2_lib.py

@@ -676,10 +676,10 @@ class PartitionKeyCompatible:
 
   def __init__(self, partition):
     # Parses: ['name:datehour, type:int, comment:null']
-    name, type, comment = partition.split(', ')
-    self.name = name.split(':')[1]
-    self.type = type.split(':')[1]
-    self.comment = comment.split(':')[1]
+    name, type, comment = partition.split(', ', 2)
+    self.name = name.split(':', 1)[1]
+    self.type = type.split(':', 1)[1]
+    self.comment = comment.split(':', 1)[1]
 
 
 class PartitionValueCompatible: