- 
                Notifications
    
You must be signed in to change notification settings  - Fork 119
 
feat: Add the in-commit timestamp field to CommitInfo #581
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
          
     Merged
      
      
    
  
     Merged
                    Changes from 10 commits
      Commits
    
    
            Show all changes
          
          
            13 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      a513a09
              
                Add ict and tests
              
              
                OussamaSaoudi-db bc3ff0c
              
                Update docs for ICT
              
              
                OussamaSaoudi-db db5e301
              
                Assert selection vector
              
              
                OussamaSaoudi-db c57c645
              
                wip ict impl
              
              
                OussamaSaoudi-db 64efb75
              
                add tmp ict fixup for writes
              
              
                OussamaSaoudi-db e2f44b9
              
                remove non_ict schema
              
              
                OussamaSaoudi-db acac33c
              
                fix commit
              
              
                OussamaSaoudi-db f52b5fc
              
                Remove cdf changes for ict
              
              
                OussamaSaoudi-db ae2b7d1
              
                remove unused imports
              
              
                OussamaSaoudi-db f8909ba
              
                Add clarifying comment for inCommitTimestamp
              
              
                OussamaSaoudi-db fb1ff2f
              
                Add documentation for ICT
              
              
                OussamaSaoudi-db 7258611
              
                Merge branch 'main' into cdf_ict
              
              
                OussamaSaoudi-db d37a191
              
                Merge branch 'main' into cdf_ict
              
              
                OussamaSaoudi File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -315,6 +315,12 @@ fn generate_commit_info( | |
| .get_mut("operationParameters") | ||
| .ok_or_else(|| Error::missing_column("operationParameters"))? | ||
| .data_type = hack_data_type; | ||
| 
     | 
||
| // Since writing in-commit timestamps is not supported, we remove the field so it is not | ||
| // written to the log | ||
| commit_info_data_type | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @zachschuermann just flagging this comment and approach to writing ICT. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems fine :) can we add an issue link/todo so we are tracking this?  | 
||
| .fields | ||
| .shift_remove("inCommitTimestamp"); | ||
| commit_info_field.data_type = DataType::Struct(commit_info_data_type); | ||
| 
     | 
||
| let commit_info_evaluator = engine.get_expression_handler().get_evaluator( | ||
| 
          
            
          
           | 
    ||
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe also note that (when enabled) it requires that
commitInfobe the first action in the commit?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While that's technically what the protocol says, delta-spark doesn't check that this is true. It simply extracts the CommitInfo if present.
I think the error handling would be more code and let us capture fewer tables than delta spark, and commitInfo being the first action doesn't seem to impact us much in this scenario.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delta-spark doesn't check, but it also does stop looking after the first line of json. So if the commit info is not first it will appear to not exist at all. Sometimes that causes an error downstream, and sometimes it would cause a silent wrong behavior.
I would prefer to check strictly unless/until we see a need to do otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scovich Do you recommend that we error, or just ignore the ICT