Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix metadata views, incorrect query #1436

Merged
merged 2 commits into from
May 19, 2020
Merged

Conversation

beltran
Copy link
Contributor

@beltran beltran commented Apr 29, 2020

Fixes #1435

@beltran beltran force-pushed the fix_metadata_views branch from 12f1612 to 66c3cb0 Compare April 29, 2020 21:33
@beltran beltran force-pushed the fix_metadata_views branch from 66c3cb0 to 3b25a11 Compare April 29, 2020 23:14
@jorgebay
Copy link
Contributor

jorgebay commented May 8, 2020

I didn't have time to check it earlier, I'll review this on Monday.

FieldTypes []TypeInfo
Keyspace string
Name string
BaseTableId UUID
Copy link
Contributor

@mpenick mpenick May 11, 2020

Choose a reason for hiding this comment

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

What do you think about having a pointer to the base table? possibly instead of ID and name?

BaseTable *TableMetadata

One drawback: Views would have be executed in serial order after table metadata.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's a good idea, but it would only replace BaseTableName right? Because TableMetadata doesn't have the BaseTableId.

@jorgebay
Copy link
Contributor

Should we be concerned about breaking existing usage for ViewMetadata (udts)?

We have the option of leaving ViewMetadata as is and introduce a MaterializedViewMetadata for system_schema.views, wdyt?

@beltran
Copy link
Contributor Author

beltran commented May 12, 2020

Hmm, I may not fully understand what you mean, the problem I think it's that a bug that caused a change in the API was introduced. So you are suggesting adding below here a new line MaterializedViews MaterializedViewMetadata and leaving the data in Views as it is? Couldn't users get confused when they see both fields?

@jorgebay
Copy link
Contributor

Yeah, I understand that it may cause confusion to new users (we can document the behaviour. Introducing a new map+struct and leave the existing functionality as it is will avoid breaking usages of views as udts.

@beltran beltran force-pushed the fix_metadata_views branch 3 times, most recently from c1efbba to 706056f Compare May 16, 2020 20:52
@beltran beltran force-pushed the fix_metadata_views branch from 706056f to 314cfa8 Compare May 16, 2020 21:51
@beltran
Copy link
Contributor Author

beltran commented May 17, 2020

@jorgebay thank you for the feedback! I think this is ready for another looks. There's a failing test in one of the runs, but seems unrelated:

--- FAIL: TestPolicyConnPoolSSL (0.12s)
    conn_test.go:1191: write tcp 127.0.0.1:34668->127.0.0.1:34356: use of closed network connection

Copy link
Contributor

@jorgebay jorgebay left a comment

Choose a reason for hiding this comment

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

Looks great!

@jorgebay jorgebay merged commit 7990610 into apache:master May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Materialized views metadata is not populated correctly
3 participants