Skip to content

Conversation

@jshmchenxi
Copy link
Contributor

By default the catalog cache is enabled. In one spark-sql session, same sql over a changing iceberg table will return the same result even if the table has changed. The reason is that loadTable method is cached and we couldn't get latest snapshots of the table. If we turn off the cache, we can always get the latest result within one session.

So I think the cache-enabled property should be in the docs as it is an important configuration.

@kbendick
Copy link
Contributor

kbendick commented Jun 4, 2021

This PR is related to this one: #2659

Though I'm not sure if cache-enabled is supported in Flink (I might be wrong).

@jshmchenxi
Copy link
Contributor Author

jshmchenxi commented Jun 5, 2021

@kbendick Yes, there is also a cache-enabled option in FlinkCatalogFactory

| spark.sql.catalog._catalog-name_.default-namespace | default | The default current namespace for the catalog |
| spark.sql.catalog._catalog-name_.uri | thrift://host:port | Metastore connect URI; default from `hive-site.xml` |
| spark.sql.catalog._catalog-name_.warehouse | hdfs://nn:8020/warehouse/path | Base path for the warehouse directory |
| spark.sql.catalog._catalog-name_.warehouse.cache-enabled | `true` or `false` | Whether to enable catalog cache, default value is `true` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it should include warehouse.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that was a mistake.

@rdblue rdblue merged commit a6b0f42 into apache:master Jun 15, 2021
@rdblue
Copy link
Contributor

rdblue commented Jun 15, 2021

Looks great. Thanks @jshmchenxi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants