Skip to content

airframe-sql: Fix full qualified column name handling#2803

Merged
xerial merged 1 commit intowvlet:masterfrom
takezoe:sql-full-qualified-column-name
Mar 22, 2023
Merged

airframe-sql: Fix full qualified column name handling#2803
xerial merged 1 commit intowvlet:masterfrom
takezoe:sql-full-qualified-column-name

Conversation

@takezoe
Copy link
Copy Markdown
Member

@takezoe takezoe commented Mar 22, 2023

No description provided.

@github-actions github-actions Bot added the bug label Mar 22, 2023
// TODO Should we handle quotation in the name or just reject such strings?
fullName.split("\\.").toList match {
case List(db, t, c) if db == contextDatabase =>
case List(db, t, c) =>
Copy link
Copy Markdown
Member Author

@takezoe takezoe Mar 22, 2023

Choose a reason for hiding this comment

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

To be honest, I'm not sure if this fix is correct. 🤔

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah. This fix itself should be ok.

I think Attribute.matched(ColmnPath) function needs to be implemented properly to check the context (or specified) database properly.

def matched(columnPath: ColumnPath): Option[Attribute] = {
. This can be fixed in another PR.

Copy link
Copy Markdown
Member Author

@takezoe takezoe Mar 23, 2023

Choose a reason for hiding this comment

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

It can wrongly match in the current implementation because it doesn't check the database name? Hmm, that's terrible...

@takezoe takezoe requested a review from xerial March 22, 2023 13:26
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 22, 2023

Codecov Report

Merging #2803 (a44d5b1) into master (d4c2958) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2803      +/-   ##
==========================================
- Coverage   82.43%   82.42%   -0.01%     
==========================================
  Files         337      337              
  Lines       14241    14240       -1     
  Branches     2315     2361      +46     
==========================================
- Hits        11739    11738       -1     
  Misses       2502     2502              
Impacted Files Coverage Δ
...in/scala/wvlet/airframe/sql/model/Expression.scala 75.52% <ø> (-0.08%) ⬇️
...ala/wvlet/airframe/sql/analyzer/TypeResolver.scala 93.64% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2c4fd4...a44d5b1. Read the comment docs.

@xerial xerial merged commit 3f7df88 into wvlet:master Mar 22, 2023
@takezoe takezoe deleted the sql-full-qualified-column-name branch March 23, 2023 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants