-
Notifications
You must be signed in to change notification settings - Fork 31
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
Refactor Sink Writer to accept blocks inplace of bytes #86
Conversation
Looks like we need to fix some tests |
Fix test cases in merge package
Fix all test cases
Tests are fixed. |
* Add yaml inline tag to BaseSink * Add inline tag to BaseSink * Revert sample yaml configuration
Fixed |
There's a few conflicts @tardunge |
will fix. |
* Add yaml inline tag to BaseSink * Add inline tag to BaseSink * Revert sample yaml configuration * fix conflict
* Add yaml inline tag to BaseSink * Add inline tag to BaseSink * Revert sample yaml configuration * fix conflict * add contributors in readme
) | ||
|
||
// FromBlockBy creates and returns a list of new block.Row for a block. | ||
func FromBlockBy(blk Block, schema typeof.Schema) ([]Row, error) { |
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 this should be a method on a block instead?
@@ -33,6 +35,30 @@ type Block struct { | |||
schema typeof.Schema `binary:"-"` // The cached schema of the block | |||
} | |||
|
|||
// Create a base block for testing purpose | |||
func Base() ([]Block, error) { |
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.
Do we need this function exported or we can move it to a test file itself?
if err != nil { | ||
return err | ||
} | ||
// buffer, err := s.merge(blocks, schema) |
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.
Why this is commented out?
@@ -16,7 +19,20 @@ import ( | |||
) | |||
|
|||
// ToParquet merges multiple blocks together and outputs a key and merged Parquet data | |||
func ToParquet(blocks []block.Block, schema typeof.Schema) ([]byte, error) { | |||
func ToParquet(input interface{}) ([]byte, error) { |
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.
I'm a bit wary of removing schema. Semantically taking a schema from the first block is different from providing a schema to the function itself. Why do we need to remove schema?
@tardunge please address comments in a separate PR(s) |
Sure. |
This MR introduced an issue that the Azure writer would not initiate. @tardunge |
Can you create an issue and post the error or behaviour you are encountering and also the expected behaviour? |
No description provided.