| 684 | |
| 685 | |
| 686 | class ImpalaNestedTypesProfile(DefaultProfile): |
| 687 | |
| 688 | def __init__(self): |
| 689 | super(ImpalaNestedTypesProfile, self).__init__() |
| 690 | self._probabilities['OPTIONAL_QUERY_CLAUSES']['WITH'] = 0.3 |
| 691 | self._probabilities['MISC']['INLINE_VIEW'] = 0.3 |
| 692 | |
| 693 | def use_lateral_join(self): |
| 694 | return random() < 0.5 |
| 695 | |
| 696 | def use_boolean_expr_for_lateral_join(self): |
| 697 | return random() < 0.2 |
| 698 | |
| 699 | def get_num_boolean_exprs_for_lateral_join(self): |
| 700 | if random() < 0.8: |
| 701 | return 0 |
| 702 | result = 1 |
| 703 | while random() < 0.6: |
| 704 | result += 1 |
| 705 | return result |
| 706 | |
| 707 | def get_table_count(self): |
| 708 | num = 1 |
| 709 | while random() < (0.85 ** num): |
| 710 | num += 1 |
| 711 | return num |
| 712 | |
| 713 | |
| 714 | # This profile was added for ad-hoc testing. |
no outgoing calls
no test coverage detected