odps/mars_extension/legacy/dataframe/datasource.py [980:1021]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    if isinstance(chunk_size, (list, tuple)):
        if len(chunk_size) == 1:
            chunk_size = chunk_size[0]
        if len(chunk_size) > 1:
            raise ValueError("Only support split on rows")

    if chunk_bytes is not None:
        chunk_bytes = int(parse_readable_size(chunk_bytes)[0])
    cols = table.table_schema.columns if append_partitions else table.table_schema.simple_columns
    table_columns = [c.name for c in cols]
    table_types = [c.type for c in cols]
    df_types = [
        df_type_to_np_type(odps_type_to_df_type(type), use_arrow_dtype=use_arrow_dtype)
        for type in table_types
    ]

    if isinstance(index_columns, str):
        index_columns = [index_columns]
    if index_columns and columns is None:
        index_col_set = set(index_columns)
        columns = [c for c in table_columns if c not in index_col_set]

    if not index_columns:
        index_dtypes = None
    else:
        table_index_types = [
            df_types[table_columns.index(col)] for col in index_columns
        ]
        index_dtypes = pd.Series(table_index_types, index=index_columns)

    if columns is not None:
        table_col_set = set(columns)
        if any(col in table_col_set for col in index_columns):
            raise ValueError("Index columns and columns shall not overlap.")

        # reorder columns
        new_columns = [c for c in table_columns if c in columns]
        df_types = [df_types[table_columns.index(col)] for col in new_columns]
        table_columns = new_columns
        columns = new_columns

    dtypes = pd.Series(df_types, index=table_columns)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



odps/mars_extension/oscar/dataframe/datasource.py [832:873]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    if isinstance(chunk_size, (list, tuple)):
        if len(chunk_size) == 1:
            chunk_size = chunk_size[0]
        if len(chunk_size) > 1:
            raise ValueError("Only support split on rows")

    if chunk_bytes is not None:
        chunk_bytes = int(parse_readable_size(chunk_bytes)[0])
    cols = table.table_schema.columns if append_partitions else table.table_schema.simple_columns
    table_columns = [c.name for c in cols]
    table_types = [c.type for c in cols]
    df_types = [
        df_type_to_np_type(odps_type_to_df_type(type), use_arrow_dtype=use_arrow_dtype)
        for type in table_types
    ]

    if isinstance(index_columns, str):
        index_columns = [index_columns]
    if index_columns and columns is None:
        index_col_set = set(index_columns)
        columns = [c for c in table_columns if c not in index_col_set]

    if not index_columns:
        index_dtypes = None
    else:
        table_index_types = [
            df_types[table_columns.index(col)] for col in index_columns
        ]
        index_dtypes = pd.Series(table_index_types, index=index_columns)

    if columns is not None:
        table_col_set = set(columns)
        if any(col in table_col_set for col in index_columns):
            raise ValueError("Index columns and columns shall not overlap.")

        # reorder columns
        new_columns = [c for c in table_columns if c in columns]
        df_types = [df_types[table_columns.index(col)] for col in new_columns]
        table_columns = new_columns
        columns = new_columns

    dtypes = pd.Series(df_types, index=table_columns)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



