def get_column_info()

in backend/lambdas/tasks/generate_queries.py [0:0]


def get_column_info(col, table, is_partition):
    table_columns = (
        table["PartitionKeys"]
        if is_partition
        else table["StorageDescriptor"]["Columns"]
    )
    col_array = col.split(".")
    serialized_cols = list(map(column_mapper, table_columns))
    found = None
    for col_segment in col_array:
        found = next((x for x in serialized_cols if x["Name"] == col_segment), None)
        if not found:
            return None, False
        serialized_cols = found["Children"] if "Children" in found else []
    return found["Type"], found["CanBeIdentifier"]