8ae482b8bbdfe4de555e837be3984a8280aa2874,tests/integration_tests/flows/test_clickhouse.py,,query_ch,#Any#,26

Before Change



def query_ch(query):
    config = Config(set_get_config_path())
    if "CREATE " not in query.upper() and "INSERT " not in query.upper():
        query += " FORMAT JSON"

    connect_string = "http://{}:{}".format(
        config["integrations"]["default_clickhouse"]["host"],
        config["integrations"]["default_clickhouse"]["port"]
    )

After Change



def query_ch(query):
    config = Config(set_get_config_path())
    query = query.lower()
    add = "format json"
    for ele in ["drop ", "create ","insert "]:
        if ele in query:
            add = ""
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: mindsdb/mindsdb
Commit Name: 8ae482b8bbdfe4de555e837be3984a8280aa2874
Time: 2020-07-08
Author: george@cerebralab.com
File Name: tests/integration_tests/flows/test_clickhouse.py
Class Name:
Method Name: query_ch


Project Name: hls-fpga-machine-learning/hls4ml
Commit Name: 05579f2830ff46f6015913510e2243ad652ef9bc
Time: 2020-07-27
Author: sioni.summers10@imperial.ac.uk
File Name: hls4ml/model/hls_layers.py
Class Name: Softmax
Method Name: initialize


Project Name: rusty1s/pytorch_geometric
Commit Name: 3706e1a3e790d6afc3d813df48a0016a11909f3f
Time: 2020-02-20
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/datasets/citation_full.py
Class Name: CitationFull
Method Name: __init__


Project Name: OpenNMT/OpenNMT-tf
Commit Name: d97a73f8ea19e52166702dd448dea03e3a6be95b
Time: 2019-03-27
Author: guillaume.klein@systrangroup.com
File Name: opennmt/models/sequence_classifier.py
Class Name: SequenceClassifier
Method Name: __init__